From: Chris Ball <cjb@laptop.org>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] MMCI: don't read command response when invalid
Date: Tue, 11 Jan 2011 23:20:26 +0000 [thread overview]
Message-ID: <20110111232025.GA25752@void.printf.net> (raw)
In-Reply-To: <20110111163556.GA18746@n2100.arm.linux.org.uk>
Hi,
On Tue, Jan 11, 2011 at 04:35:56PM +0000, Russell King - ARM Linux wrote:
> Don't read the command response from the registers when either the
> command timed out (because there was no response from the card) or
> the checksum on the response was invalid.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
> drivers/mmc/host/mmci.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
> index 5630228..040de4f 100644
> --- a/drivers/mmc/host/mmci.c
> +++ b/drivers/mmc/host/mmci.c
> @@ -394,15 +394,15 @@ mmci_cmd_irq(struct mmci_host *host, struct mmc_command *cmd,
>
> host->cmd = NULL;
>
> - cmd->resp[0] = readl(base + MMCIRESPONSE0);
> - cmd->resp[1] = readl(base + MMCIRESPONSE1);
> - cmd->resp[2] = readl(base + MMCIRESPONSE2);
> - cmd->resp[3] = readl(base + MMCIRESPONSE3);
> -
> if (status & MCI_CMDTIMEOUT) {
> cmd->error = -ETIMEDOUT;
> } else if (status & MCI_CMDCRCFAIL && cmd->flags & MMC_RSP_CRC) {
> cmd->error = -EILSEQ;
> + } else {
> + cmd->resp[0] = readl(base + MMCIRESPONSE0);
> + cmd->resp[1] = readl(base + MMCIRESPONSE1);
> + cmd->resp[2] = readl(base + MMCIRESPONSE2);
> + cmd->resp[3] = readl(base + MMCIRESPONSE3);
> }
>
> if (!cmd->data || cmd->error) {
Thanks, pushed to mmc-next and queued as a .38 fix.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
WARNING: multiple messages have this Message-ID (diff)
From: cjb@laptop.org (Chris Ball)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] MMCI: don't read command response when invalid
Date: Tue, 11 Jan 2011 23:20:26 +0000 [thread overview]
Message-ID: <20110111232025.GA25752@void.printf.net> (raw)
In-Reply-To: <20110111163556.GA18746@n2100.arm.linux.org.uk>
Hi,
On Tue, Jan 11, 2011 at 04:35:56PM +0000, Russell King - ARM Linux wrote:
> Don't read the command response from the registers when either the
> command timed out (because there was no response from the card) or
> the checksum on the response was invalid.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
> drivers/mmc/host/mmci.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
> index 5630228..040de4f 100644
> --- a/drivers/mmc/host/mmci.c
> +++ b/drivers/mmc/host/mmci.c
> @@ -394,15 +394,15 @@ mmci_cmd_irq(struct mmci_host *host, struct mmc_command *cmd,
>
> host->cmd = NULL;
>
> - cmd->resp[0] = readl(base + MMCIRESPONSE0);
> - cmd->resp[1] = readl(base + MMCIRESPONSE1);
> - cmd->resp[2] = readl(base + MMCIRESPONSE2);
> - cmd->resp[3] = readl(base + MMCIRESPONSE3);
> -
> if (status & MCI_CMDTIMEOUT) {
> cmd->error = -ETIMEDOUT;
> } else if (status & MCI_CMDCRCFAIL && cmd->flags & MMC_RSP_CRC) {
> cmd->error = -EILSEQ;
> + } else {
> + cmd->resp[0] = readl(base + MMCIRESPONSE0);
> + cmd->resp[1] = readl(base + MMCIRESPONSE1);
> + cmd->resp[2] = readl(base + MMCIRESPONSE2);
> + cmd->resp[3] = readl(base + MMCIRESPONSE3);
> }
>
> if (!cmd->data || cmd->error) {
Thanks, pushed to mmc-next and queued as a .38 fix.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
next prev parent reply other threads:[~2011-01-11 23:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20110111163502.GJ11039@n2100.arm.linux.org.uk>
2011-01-11 16:35 ` [PATCH] MMCI: don't read command response when invalid Russell King - ARM Linux
2011-01-11 16:35 ` Russell King - ARM Linux
2011-01-11 23:20 ` Chris Ball [this message]
2011-01-11 23:20 ` Chris Ball
2011-01-27 12:19 ` Russell King - ARM Linux
2011-01-27 12:19 ` Russell King - ARM Linux
2011-01-27 15:33 ` Chris Ball
2011-01-27 15:33 ` Chris Ball
2011-01-27 21:28 ` Chris Ball
2011-01-27 21:28 ` Chris Ball
2011-01-27 21:40 ` Russell King - ARM Linux
2011-01-27 21:40 ` Russell King - ARM Linux
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=20110111232025.GA25752@void.printf.net \
--to=cjb@laptop.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
/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.