Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp802419pxv; Wed, 14 Jul 2021 16:16:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOb6LSgTwNQE/wYXWWKcjYDoOo0hCuJtPdk+dUBf64nq8IaZowNLbyzTew4Up0ZwpDBsBX X-Received: by 2002:aa7:c841:: with SMTP id g1mr1014941edt.343.1626304575992; Wed, 14 Jul 2021 16:16:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626304575; cv=none; d=google.com; s=arc-20160816; b=fp9KzHmgiqc5DRUdiOQ/2MmYzqCgZ3t41uXoCBqFF9HSj+sDC3aPG4p5TiooeFgKi7 l2x3DSJYv2oMyhhj687z2OPwCFcvP04e0OUnWowbgzxEWTT66w3r4kCTxL/k7UTbEyR8 cgSh7tL3fsUVUakygxV7osBpqQO8SsqHKMbDxq1oJPHWHBoySsoVdmeLyTR48XkM+RAq 4wvl9kEukdcxHOpEAOF/FN+T1Pa7jCOfLHHXyu2hXbrR1hbJzpoLi1HC9v9PyzgR2jU9 nimq1OPen06g178ws6ahjhZEVFxoOlldH0WS4//nh/KpReKSvdu3Ko/bjRPWpraiN0Bc dxyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type :content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:cc:to:subject:dkim-signature :dkim-filter; bh=Hk8XY5Qw0DnsZL6Vhvi4dqC+Go+d089gtAq84ur/LYg=; b=q2cJXMDvyKsJNBu697LQxzlq6VzRnavT3raSlGHpFEdmmV3alJumZI8rR59AQIRD6s z6EgQjvEa2uRFfKg7DZlZAAHsGt7cIvvpsodDdwzy/V0dqiB0PZd+8hPDx9hMLLl9YUY SHakjRvFEuEegNzJIcZ01wn8NyM7v6HwBn664/bq3dFrD7r1GJq2zdB9M/xIgBpiKrTp UrqlSNrQctuvcWqvh1SK0DDzauOR9A0BUAeGB9yE9sM8LwyUQM4WVAxOke5bjxP2Y0CT dR2QbKdNWrzkaBc+wyYlUMS0qMx6MLN6Am4YRI6Ps1smC5a2W54sz02fGrE8cDmNy+ts vYZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=oDgchS+x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x30si4094404edy.146.2021.07.14.16.15.52; Wed, 14 Jul 2021 16:16:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=oDgchS+x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230352AbhGNVsk (ORCPT + 99 others); Wed, 14 Jul 2021 17:48:40 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:46901 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230026AbhGNVsj (ORCPT ); Wed, 14 Jul 2021 17:48:39 -0400 Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20210714214546epoutp025391adaeedd8cb5149ae12e4d83e802c~RxnT0rQfU1551115511epoutp02i for ; Wed, 14 Jul 2021 21:45:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20210714214546epoutp025391adaeedd8cb5149ae12e4d83e802c~RxnT0rQfU1551115511epoutp02i DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1626299146; bh=Hk8XY5Qw0DnsZL6Vhvi4dqC+Go+d089gtAq84ur/LYg=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=oDgchS+xYYzxdthJV0K4Zmf7TILhIKKa+jpISXh0ATmH3dQMMVZyUYKGZ4bvUy1MW HhxT+wLYVxcxVnazFuK2QG0T0B8D9jGRzutoJa2OVWby9wuxsI4nZskTDrHlrgGJn4 Iog4KXdbSZ3Nanshwm3F7Q4t3Ri7xdeEBWw15RrU= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20210714214545epcas1p1cb8576ffe6c5e7094890cd264e543dd5~RxnTARsjY1177911779epcas1p1J; Wed, 14 Jul 2021 21:45:45 +0000 (GMT) Received: from epsmges1p1.samsung.com (unknown [182.195.40.153]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4GQ9zW0dgbz4x9Pt; Wed, 14 Jul 2021 21:45:43 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p1.samsung.com (Symantec Messaging Gateway) with SMTP id EC.98.09952.60B5FE06; Thu, 15 Jul 2021 06:45:42 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas1p2.samsung.com (KnoxPortal) with ESMTPA id 20210714214541epcas1p26debc79a3994d74058acaec507447dd4~RxnP_BmOy0323503235epcas1p2n; Wed, 14 Jul 2021 21:45:41 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20210714214541epsmtrp2f5c2e1571a712e28a1c94345cc330d26~RxnP9SDEJ2448924489epsmtrp2O; Wed, 14 Jul 2021 21:45:41 +0000 (GMT) X-AuditID: b6c32a35-447ff700000026e0-37-60ef5b0630d9 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 2A.4E.08394.50B5FE06; Thu, 15 Jul 2021 06:45:41 +0900 (KST) Received: from [10.113.113.235] (unknown [10.113.113.235]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20210714214541epsmtip17b5905f0ce96e26b00edf2af3fb11714~RxnPo1AN-0598805988epsmtip1E; Wed, 14 Jul 2021 21:45:41 +0000 (GMT) Subject: Re: [PATCH] mmc: dw_mmc: Fix hang on data CRC error To: Vincent Whitchurch Cc: Ulf Hansson , kernel , "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" From: Jaehoon Chung Message-ID: <5c025295-fa14-d363-89a2-e96e3b278419@samsung.com> Date: Thu, 15 Jul 2021 06:46:34 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210714114921.GA22706@axis.com> Content-Language: en-US Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpgk+LIzCtJLcpLzFFi42LZdlhTX5c9+n2CQVeIxacWVYvLu+awWRz5 389ocXxtuMX5bf4OrB7X1wV43Lm2h83j8ya5AOaobJuM1MSU1CKF1Lzk/JTMvHRbJe/geOd4 UzMDQ11DSwtzJYW8xNxUWyUXnwBdt8wcoG1KCmWJOaVAoYDE4mIlfTubovzSklSFjPziElul 1IKUnALLAr3ixNzi0rx0veT8XCtDAwMjU6DChOyMltaYggdcFVv3HWFtYPzL0cXIySEhYCJx 8WQfaxcjF4eQwA5GiQNvuqCcT4wSDy9uY4JwvjFKTF/0kxGmZdGhOywQib2MEhvu3WSGcN4z Smw+fpsNpEpYwEbi4r0rYLYIUMe2ya/A5jIL7GOUOL+3nRUkwSagI7H923EmEJtXwE7i+rcG sAYWAVWJ3oM7wdaJCkRKnN+9gAWiRlDi5MwnYDangJ7E0pVfmEFsZgFxiVtP5jNB2PIS29/O Abt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EJU7OfMICYnMK6EksXfmFGcRmFlCX+DPv EpQtLnHryXwmCFteYvvbOcwTGIVmIWmfhaRlFpKWWUhaFjCyrGKUTC0ozk3PLTYsMMxLLdcr TswtLs1L10vOz93ECI4DLc0djNtXfdA7xMjEwXiIUYKDWUmEd6nR2wQh3pTEyqrUovz4otKc 1OJDjNIcLErivBe6TsYLCaQnlqRmp6YWpBbBZJk4OKUamA4vW3yrJ+PbSuOpEYt2fw67sUmo /b6kX4vsjfRo7oe224IqZvff8Cv5sd75ahyL16GVwmeeN3Jvz3Vaus2ML+OnZXDxJi3rF/8O ZjwPS/uTF/Hj8ZxfqQItxbwii3aHSzc6HDnYe1PR2V9SzLd8G9O2Pf6WTh25TZ1Xp0s8VOHg Cz+pmjg1KftSjZqSkZys45Pm3dpZ2kf+7JBMExAKi+44vPHSgbTUX1Zfp7lc4Y0/71IxcYe2 feWpvfOXLwt3UIkNd1Cbtp7vgH2r48zDn7a1Re8LlDo/TSzj/32tY++8n+/Zujr+SNiri/WB 4j9DkiRtLKrs3U8ll3D8iD0zbfWa3+IGjA3Wy4tNiqqUlViKMxINtZiLihMB2Wt+Z/ICAAA= X-CMS-MailID: 20210714214541epcas1p26debc79a3994d74058acaec507447dd4 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210630102240epcas1p33bbdffb5eb553a49badaffab756d482c References: <20210630102232.16011-1-vincent.whitchurch@axis.com> <81c1b56d-e1be-b3fb-6b44-fc8054f1dd8b@samsung.com> <20210714114921.GA22706@axis.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/14/21 8:49 PM, Vincent Whitchurch wrote: > On Thu, Jul 01, 2021 at 12:06:31AM +0200, Jaehoon Chung wrote: >> On 6/30/21 7:22 PM, Vincent Whitchurch wrote: >>> When a Data CRC interrupt is received, the driver disables the DMA, then >>> sends the stop/abort command and then waits for Data Transfer Over. >>> >>> However, sometimes, when a data CRC error is received in the middle of a >>> multi-block write transfer, the Data Transfer Over interrupt is never >>> received, and the driver hangs and never completes the request. >>> >>> The driver sets the BMOD.SWR bit (SDMMC_IDMAC_SWRESET) when stopping the >>> DMA, but according to the manual CMD.STOP_ABORT_CMD should be programmed >>> "before assertion of SWR". Do these operations in the recommended >>> order. With this change the Data Transfer Over is always received >>> correctly in my tests. >> >> I will check with your patch. I didn't see any CRC error on my targets before. > > Have you had a chance to check it? You can use the fault-injection > patch if you want to trigger aborted transfers without getting real CRC > errors: > > https://protect2.fireeye.com/v1/url?k=96c33914-c958001f-96c2b25b-002590f5b904-9a89d187f33934b7&q=1&e=308eae3a-44b8-43d7-be54-24e9b850f4ad&u=https%3A%2F%2Flore.kernel.org%2Flinux-mmc%2F20210701080534.23138-1-vincent.whitchurch%40axis.com%2F >