Skip to content

Commit

Permalink
sdhci: don't raise a command index error for an unexpected response
Browse files Browse the repository at this point in the history
This deletes a block of code that raised a command index error if a
command returned response data, but the guest did not set the
appropriate bits in the response register to handle such a response. I
cannot find any documentation that suggests the controller should
behave in this way, the error code doesn't make sense (command index
error is defined for the case where the index in a response does not
match that of the issued command), and in at least one case (CMD23
issued by UEFI on Raspberry Pi 2), actual hardware does not do this.

Signed-off-by: Andrew Baumann <Andrew.Baumann@microsoft.com>
Reviewed-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
Message-id: 1450738069-18664-3-git-send-email-Andrew.Baumann@microsoft.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  • Loading branch information
0xabu authored and stefanhaRH committed Dec 22, 2015
1 parent 6890a69 commit 62d32ec
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions hw/sd/sdhci.c
Expand Up @@ -243,9 +243,6 @@ static void sdhci_send_command(SDHCIState *s)
(s->cmdreg & SDHC_CMD_RESPONSE) == SDHC_CMD_RSP_WITH_BUSY) {
s->norintsts |= SDHC_NIS_TRSCMP;
}
} else if (rlen != 0 && (s->errintstsen & SDHC_EISEN_CMDIDX)) {
s->errintsts |= SDHC_EIS_CMDIDX;
s->norintsts |= SDHC_NIS_ERR;
}

if (s->norintstsen & SDHC_NISEN_CMDCMP) {
Expand Down

0 comments on commit 62d32ec

Please sign in to comment.