From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43022) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RcNUt-0005NR-4I for qemu-devel@nongnu.org; Sun, 18 Dec 2011 15:38:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RcNUq-0006zP-TT for qemu-devel@nongnu.org; Sun, 18 Dec 2011 15:38:14 -0500 Received: from mnementh.archaic.org.uk ([81.2.115.146]:38904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RcNUq-0006yK-LC for qemu-devel@nongnu.org; Sun, 18 Dec 2011 15:38:12 -0500 From: Peter Maydell Date: Sun, 18 Dec 2011 20:37:53 +0000 Message-Id: <1324240680-26905-4-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1324240680-26905-1-git-send-email-peter.maydell@linaro.org> References: <1324240680-26905-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 03/10] hw/sd.c: On CRC error, set CRC error status bit rather than clearing it List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: patches@linaro.org If we fail to validate the CRC for an SD command we should be setting COM_CRC_ERROR, not clearing it. (This bug actually has no effect currently because sd_req_crc_validate() always returns success.) Signed-off-by: Peter Maydell --- hw/sd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/sd.c b/hw/sd.c index 245b6c3..e57852e 100644 --- a/hw/sd.c +++ b/hw/sd.c @@ -1300,7 +1300,7 @@ int sd_do_command(SDState *sd, SDRequest *req, } if (sd_req_crc_validate(req)) { - sd->card_status &= ~COM_CRC_ERROR; + sd->card_status |= COM_CRC_ERROR; return 0; } -- 1.7.5.4