All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"linux-renesas-soc@vger.kernel.org"
	<linux-renesas-soc@vger.kernel.org>,
	Simon Horman <horms@verge.net.au>
Subject: RE: [PATCH] mmc: core: check also R1 response for stop commands
Date: Wed, 15 Mar 2017 02:54:06 +0000	[thread overview]
Message-ID: <PS1PR06MB1692B56C7B571EBB02EB23C1D8270@PS1PR06MB1692.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <20170314104904.4ig62cy2w6fkpqzm@ninjato>

Hi Wolfram-san, 

> From: Wolfram Sang, Sent: Tuesday, March 14, 2017 7:49 PM
> 
> > > So, since I got no complaints about the RFC, I'll declare it a PATCH now :)
> > > Shimoda-san, is it possible for you to test it with the SD tester you once had
> > > access to? I could only test it by setting the ECC bit in the driver manually.
> >
> > Sure. I am able to bring the SD tester from other department tomorrow.
> > So, I will check this patch tomorrow.
> 
> Good news, thank you very much!

I tested this patch with the SD tester. After I applied this patch, when the R1_CARD_ECC_FAILED
is set, the following message appeared:

mmcblk1: error -5 sending stop command, original cmd response 0x900, card status 0x900

However, I have a question about "ecc_err" in both mmc_blk_err_check() and mmc_blk_cmd_recovery().
Anyway, I tested this patch. And the mmc core said some error happened.
I think this is suitable behavior. So,

Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

< Question >
In mmc_blk_cmd_recovery(), if "brq->stop.resp[0] & R1_CARD_ECC_FAILED" is true, ecc_err is set to true.
However, in mmc_blk_err_check(), ecc_err is only referred when brq->data.error is true.
So, I guess we need a patch like below as another patch. What do you think?

diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
index 0e838b0..99c937b 100644
--- a/drivers/mmc/core/block.c
+++ b/drivers/mmc/core/block.c
@@ -1374,7 +1374,7 @@ static enum mmc_blk_status mmc_blk_err_check(struct mmc_ca
                return MMC_BLK_RETRY;
        }

-       if (brq->data.error) {
+       if (brq->data.error || ecc_err) {
                if (need_retune && !brq->retune_retry_done) {
                        pr_debug("%s: retrying because a re-tune was needed\n",
                                 req->rq_disk->disk_name);

After that, the mmc core also output the following message:

mmcblk1: error 0 transferring data, sector 0, nr 128, cmd response 0x900, card status 0x200b00
mmcblk1: retrying using single block read

Best regards,
Yoshihiro Shimoda

  reply	other threads:[~2017-03-15  2:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-14 10:15 [PATCH] mmc: core: check also R1 response for stop commands Wolfram Sang
2017-03-14 10:41 ` Yoshihiro Shimoda
2017-03-14 10:49   ` Wolfram Sang
2017-03-15  2:54     ` Yoshihiro Shimoda [this message]
2017-03-16 11:33       ` Wolfram Sang

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=PS1PR06MB1692B56C7B571EBB02EB23C1D8270@PS1PR06MB1692.apcprd06.prod.outlook.com \
    --to=yoshihiro.shimoda.uh@renesas.com \
    --cc=horms@verge.net.au \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=wsa@the-dreams.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.