From: Russell King - ARM Linux Date: Tue, 11 Jan 2011 16:35:56 +0000 (+0000) Subject: mmc: mmci: don't read command response when invalid X-Git-Tag: v2.6.38-rc3~28^2~3 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=9047b435a0b43952f5d1f7eb15a9b63a36efc7f2;p=~emulex%2Finfiniband.git mmc: mmci: don't read command response when invalid 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 Signed-off-by: Chris Ball --- diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 2de12fe155d..4b8dcd5b2a0 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -342,15 +342,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) {