All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>
Cc: "linux-renesas-soc@vger.kernel.org"
	<linux-renesas-soc@vger.kernel.org>,
	Simon Horman <horms+renesas@verge.net.au>
Subject: RE: [PATCH v2 4/4] mmc: host: tmio: fill in response from auto cmd12
Date: Tue, 14 Feb 2017 10:06:47 +0000	[thread overview]
Message-ID: <HK2PR06MB05484A4141A1A9AC8BE54E00D8580@HK2PR06MB0548.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <20170213180342.26172-5-wsa+renesas@sang-engineering.com>

Hi,

> From: Wolfram Sang [mailto:wsa+renesas@sang-engineering.com]
> Sent: Tuesday, February 14, 2017 3:04 AM
> 
> After we received the dataend interrupt, R1 response register carries
> the value from the automatically generated stop command. Report that
> info back to the MMC block layer, so we will be notified in case of e.g.
> ECC errors which happened during the last transfer.
> 
> Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

I tested this patch with a SD tester (SGDK320).
As the commit log, this patch could pass the R1 response. So,

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


However, I think the MMC block layer should check the brq->stop.resp[0]
because brq->stop.error should be zero in this case and mmc_blk_cmd_recovery()
is not called in mmc_blk_err_check().

Best regards,
Yoshihiro Shimoda

> ---
>  drivers/mmc/host/tmio_mmc_pio.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
> index b47dd9195fe3fe..a08db28b0100d6 100644
> --- a/drivers/mmc/host/tmio_mmc_pio.c
> +++ b/drivers/mmc/host/tmio_mmc_pio.c
> @@ -557,6 +557,9 @@ void tmio_mmc_do_data_irq(struct tmio_mmc_host *host)
>  			dev_err(&host->pdev->dev, "unsupported stop: CMD%u,0x%x. We did CMD12,0\n",
>  				stop->opcode, stop->arg);
> 
> +		/* fill in response from auto CMD12 */
> +		stop->resp[0] = sd_ctrl_read16_and_16_as_32(host, CTL_RESPONSE);
> +
>  		sd_ctrl_write16(host, CTL_STOP_INTERNAL_ACTION, 0);
>  	}
> 
> --
> 2.11.0

  reply	other threads:[~2017-02-14 10:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-13 18:03 [PATCH v2 0/4] mmc: host: tmio: properly report status from autocmd12 Wolfram Sang
2017-02-13 18:03 ` [PATCH v2 1/4] mmc: host: tmio: use defines for CTL_STOP_INTERNAL_ACTION values Wolfram Sang
2017-02-13 18:03 ` [PATCH v2 2/4] mmc: host: tmio: fix minor typos in comments Wolfram Sang
2017-02-16 15:03   ` Simon Horman
2017-02-13 18:03 ` [PATCH v2 3/4] mmc: host: tmio: don't BUG on unsupported stop commands Wolfram Sang
2017-02-13 18:03 ` [PATCH v2 4/4] mmc: host: tmio: fill in response from auto cmd12 Wolfram Sang
2017-02-14 10:06   ` Yoshihiro Shimoda [this message]
2017-02-14 10:52     ` Wolfram Sang
2017-02-15 10:19       ` Ulf Hansson
2017-02-15 15:02         ` Wolfram Sang
2017-02-16  7:57           ` Ulf Hansson
2017-02-16  8:37             ` Wolfram Sang
2017-02-16  8:57               ` 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=HK2PR06MB05484A4141A1A9AC8BE54E00D8580@HK2PR06MB0548.apcprd06.prod.outlook.com \
    --to=yoshihiro.shimoda.uh@renesas.com \
    --cc=horms+renesas@verge.net.au \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=wsa+renesas@sang-engineering.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 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.