[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210714114921.GA22706@axis.com>
Date: Wed, 14 Jul 2021 13:49:21 +0200
From: Vincent Whitchurch <vincent.whitchurch@...s.com>
To: Jaehoon Chung <jh80.chung@...sung.com>
CC: Ulf Hansson <ulf.hansson@...aro.org>, kernel <kernel@...s.com>,
"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mmc: dw_mmc: Fix hang on data CRC error
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://lore.kernel.org/linux-mmc/20210701080534.23138-1-vincent.whitchurch@axis.com/
Powered by blists - more mailing lists