linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jaehoon Chung <jh80.chung@samsung.com>
To: Vincent Whitchurch <vincent.whitchurch@axis.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>, kernel <kernel@axis.com>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mmc: dw_mmc: Fix hang on data CRC error
Date: Thu, 15 Jul 2021 06:46:34 +0900	[thread overview]
Message-ID: <5c025295-fa14-d363-89a2-e96e3b278419@samsung.com> (raw)
In-Reply-To: <20210714114921.GA22706@axis.com>

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
> 


  reply	other threads:[~2021-07-14 21:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20210630102240epcas1p33bbdffb5eb553a49badaffab756d482c@epcas1p3.samsung.com>
2021-06-30 10:22 ` [PATCH] mmc: dw_mmc: Fix hang on data CRC error Vincent Whitchurch
2021-06-30 22:06   ` Jaehoon Chung
2021-07-14 11:49     ` Vincent Whitchurch
2021-07-14 21:46       ` Jaehoon Chung [this message]
2021-07-14 21:48       ` Jaehoon Chung
2021-07-25 21:42   ` Jaehoon Chung
2021-08-04 11:34   ` Ulf Hansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5c025295-fa14-d363-89a2-e96e3b278419@samsung.com \
    --to=jh80.chung@samsung.com \
    --cc=kernel@axis.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=vincent.whitchurch@axis.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).