public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc:sdio:retry CMD52/53 when error happens
@ 2012-05-14  8:39 yongd
  2012-05-14 11:57 ` S, Venkatraman
  2012-05-14 12:57 ` Ulf Hansson
  0 siblings, 2 replies; 5+ messages in thread
From: yongd @ 2012-05-14  8:39 UTC (permalink / raw)
  To: cjb, linux-mmc
  Cc: stefan.xk.nilsson, linus.walleij, ulf.hansson, svenkatr,
	linux-kernel, yongd

  Set sdio CMD52/53's retry time as MMC_CMD_RETRIES. As a result,
sdio might benefit from core-internal CMD retry mechanism when
some errors happen(CRC, etc).

Signed-off-by: yongd <yongd@marvell.com>
---
 drivers/mmc/core/sdio_ops.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/core/sdio_ops.c b/drivers/mmc/core/sdio_ops.c
index d29e206..884c27e 100644
--- a/drivers/mmc/core/sdio_ops.c
+++ b/drivers/mmc/core/sdio_ops.c
@@ -86,7 +86,7 @@ static int mmc_io_rw_direct_host(struct mmc_host *host, int write, unsigned fn,
 	cmd.arg |= in;
 	cmd.flags = MMC_RSP_SPI_R5 | MMC_RSP_R5 | MMC_CMD_AC;
 
-	err = mmc_wait_for_cmd(host, &cmd, 0);
+	err = mmc_wait_for_cmd(host, &cmd, MMC_CMD_RETRIES);
 	if (err)
 		return err;
 
@@ -147,6 +147,7 @@ int mmc_io_rw_extended(struct mmc_card *card, int write, unsigned fn,
 	else
 		cmd.arg |= 0x08000000 | blocks;		/* block mode */
 	cmd.flags = MMC_RSP_SPI_R5 | MMC_RSP_R5 | MMC_CMD_ADTC;
+	cmd.retries = MMC_CMD_RETRIES;
 
 	data.blksz = blksz;
 	/* Code in host drivers/fwk assumes that "blocks" always is >=1 */
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-05-15  7:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-14  8:39 [PATCH] mmc:sdio:retry CMD52/53 when error happens yongd
2012-05-14 11:57 ` S, Venkatraman
2012-05-14 12:57 ` Ulf Hansson
2012-05-15  3:14   ` Yong Ding
2012-05-15  7:15     ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox