RE: [PATCH v2 4/4] mmc: host: tmio: fill in response from auto cmd12

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

> From: Wolfram Sang [mailto:wsa+renesas@xxxxxxxxxxxxxxxxxxxx]
> 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@xxxxxxxxxxxx>
> Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>

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@xxxxxxxxxxx>


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

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux