From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aB9Fc-0003Ym-Ap for qemu-devel@nongnu.org; Mon, 21 Dec 2015 17:48:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aB9FX-0005WH-Rc for qemu-devel@nongnu.org; Mon, 21 Dec 2015 17:48:20 -0500 Received: from mail-by2on0110.outbound.protection.outlook.com ([207.46.100.110]:13696 helo=na01-by2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aB9FX-0005Vq-Lm for qemu-devel@nongnu.org; Mon, 21 Dec 2015 17:48:15 -0500 From: Andrew Baumann Date: Mon, 21 Dec 2015 14:47:48 -0800 Message-ID: <1450738069-18664-3-git-send-email-Andrew.Baumann@microsoft.com> In-Reply-To: <1450738069-18664-1-git-send-email-Andrew.Baumann@microsoft.com> References: <1450738069-18664-1-git-send-email-Andrew.Baumann@microsoft.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH v3 2/3] sdhci: don't raise a command index error for an unexpected response List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Igor Mitsyanko , Andrew Baumann , Sai Pavan Boddu , Peter Crosthwaite , Stefan Hajnoczi 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 Reviewed-by: Peter Crosthwaite --- hw/sd/sdhci.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index bc39d48..dd83e89 100644 --- a/hw/sd/sdhci.c +++ b/hw/sd/sdhci.c @@ -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) { -- 2.5.3