From: Ulf Hansson <ulf.hansson@stericsson.com>
To: yongd <yongd@marvell.com>
Cc: "cjb@laptop.org" <cjb@laptop.org>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
"stefan.xk.nilsson@stericsson.com"
<stefan.xk.nilsson@stericsson.com>,
"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
"svenkatr@ti.com" <svenkatr@ti.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mmc:sdio:retry CMD52/53 when error happens
Date: Mon, 14 May 2012 14:57:58 +0200 [thread overview]
Message-ID: <4FB10156.2080900@stericsson.com> (raw)
In-Reply-To: <1336984792-13956-1-git-send-email-yongd@marvell.com>
Hi Yongd,
From my perspective I don't think this patch is wanted.
A retry mechanism is likely very much hw-SDIO device dependent. Upper
layers (SDIO func driver) is thus the only software that is able to
handle retries correctly.
Kind regards
Ulf Hansson
On 05/14/2012 10:39 AM, yongd wrote:
> 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 */
next prev parent reply other threads:[~2012-05-14 12:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2012-05-15 3:14 ` Yong Ding
2012-05-15 7:15 ` 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=4FB10156.2080900@stericsson.com \
--to=ulf.hansson@stericsson.com \
--cc=cjb@laptop.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=stefan.xk.nilsson@stericsson.com \
--cc=svenkatr@ti.com \
--cc=yongd@marvell.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.