* [PATCH] MMCI: don't read command response when invalid
[not found] <20110111163502.GJ11039@n2100.arm.linux.org.uk>
@ 2011-01-11 16:35 ` Russell King - ARM Linux
2011-01-11 23:20 ` Chris Ball
0 siblings, 1 reply; 6+ messages in thread
From: Russell King - ARM Linux @ 2011-01-11 16:35 UTC (permalink / raw)
To: linux-arm-kernel
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) {
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] MMCI: don't read command response when invalid
2011-01-11 16:35 ` [PATCH] MMCI: don't read command response when invalid Russell King - ARM Linux
@ 2011-01-11 23:20 ` Chris Ball
2011-01-27 12:19 ` Russell King - ARM Linux
0 siblings, 1 reply; 6+ messages in thread
From: Chris Ball @ 2011-01-11 23:20 UTC (permalink / raw)
To: linux-arm-kernel
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] MMCI: don't read command response when invalid
2011-01-11 23:20 ` Chris Ball
@ 2011-01-27 12:19 ` Russell King - ARM Linux
2011-01-27 15:33 ` Chris Ball
0 siblings, 1 reply; 6+ messages in thread
From: Russell King - ARM Linux @ 2011-01-27 12:19 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jan 11, 2011 at 11:20:26PM +0000, Chris Ball wrote:
> 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.
FYI, I've now merged this into the ARM devel tree for the time being so
it doesn't get forgotten - which means it'll appear in linux-next at some
point if it isn't already there. (Mainly so I don't have to keep on
adding the patch.)
Once you push it into mainline, I'll drop my copy.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] MMCI: don't read command response when invalid
2011-01-27 12:19 ` Russell King - ARM Linux
@ 2011-01-27 15:33 ` Chris Ball
2011-01-27 21:28 ` Chris Ball
0 siblings, 1 reply; 6+ messages in thread
From: Chris Ball @ 2011-01-27 15:33 UTC (permalink / raw)
To: linux-arm-kernel
Hi Russell,
On Thu, Jan 27, 2011 at 12:19:01PM +0000, Russell King - ARM Linux wrote:
> FYI, I've now merged this into the ARM devel tree for the time being so
> it doesn't get forgotten - which means it'll appear in linux-next at some
> point if it isn't already there. (Mainly so I don't have to keep on
> adding the patch.)
>
> Once you push it into mainline, I'll drop my copy.
Okay. Sent this to Linus yesterday, just waiting for him to pull.
(It's been in linux-next for the last two weeks.)
Thanks,
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] MMCI: don't read command response when invalid
2011-01-27 15:33 ` Chris Ball
@ 2011-01-27 21:28 ` Chris Ball
2011-01-27 21:40 ` Russell King - ARM Linux
0 siblings, 1 reply; 6+ messages in thread
From: Chris Ball @ 2011-01-27 21:28 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Jan 27, 2011 at 03:33:32PM +0000, Chris Ball wrote:
> Hi Russell,
>
> On Thu, Jan 27, 2011 at 12:19:01PM +0000, Russell King - ARM Linux wrote:
> > FYI, I've now merged this into the ARM devel tree for the time being so
> > it doesn't get forgotten - which means it'll appear in linux-next at some
> > point if it isn't already there. (Mainly so I don't have to keep on
> > adding the patch.)
> >
> > Once you push it into mainline, I'll drop my copy.
>
> Okay. Sent this to Linus yesterday, just waiting for him to pull.
> (It's been in linux-next for the last two weeks.)
It's present in mainline now.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] MMCI: don't read command response when invalid
2011-01-27 21:28 ` Chris Ball
@ 2011-01-27 21:40 ` Russell King - ARM Linux
0 siblings, 0 replies; 6+ messages in thread
From: Russell King - ARM Linux @ 2011-01-27 21:40 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Jan 27, 2011 at 09:28:14PM +0000, Chris Ball wrote:
> On Thu, Jan 27, 2011 at 03:33:32PM +0000, Chris Ball wrote:
> > Hi Russell,
> >
> > On Thu, Jan 27, 2011 at 12:19:01PM +0000, Russell King - ARM Linux wrote:
> > > FYI, I've now merged this into the ARM devel tree for the time being so
> > > it doesn't get forgotten - which means it'll appear in linux-next at some
> > > point if it isn't already there. (Mainly so I don't have to keep on
> > > adding the patch.)
> > >
> > > Once you push it into mainline, I'll drop my copy.
> >
> > Okay. Sent this to Linus yesterday, just waiting for him to pull.
> > (It's been in linux-next for the last two weeks.)
>
> It's present in mainline now.
Thanks, dropped from my tree now.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-01-27 21:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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 23:20 ` Chris Ball
2011-01-27 12:19 ` Russell King - ARM Linux
2011-01-27 15:33 ` Chris Ball
2011-01-27 21:28 ` Chris Ball
2011-01-27 21:40 ` Russell King - ARM Linux
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).