From: Peter Maydell Date: Sun, 18 Dec 2011 20:37:53 +0000 (+0100) Subject: hw/sd.c: On CRC error, set CRC error status bit rather than clearing it X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=abda1f37eed86f3501db2e5439c1a7b97171ea22;p=qemu.git hw/sd.c: On CRC error, set CRC error status bit rather than clearing it 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 Signed-off-by: Andrzej Zaborowski --- diff --git a/hw/sd.c b/hw/sd.c index 245b6c3046..e57852e19d 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; }