linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vincent Whitchurch <vincent.whitchurch@axis.com>
To: Jaehoon Chung <jh80.chung@samsung.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: Wed, 14 Jul 2021 13:49:21 +0200	[thread overview]
Message-ID: <20210714114921.GA22706@axis.com> (raw)
In-Reply-To: <81c1b56d-e1be-b3fb-6b44-fc8054f1dd8b@samsung.com>

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/

  reply	other threads:[~2021-07-14 11:49 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 [this message]
2021-07-14 21:46       ` Jaehoon Chung
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=20210714114921.GA22706@axis.com \
    --to=vincent.whitchurch@axis.com \
    --cc=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 \
    /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).