提交 abda1f37 编写于 作者: P Peter Maydell 提交者: Andrzej Zaborowski

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: NPeter Maydell <peter.maydell@linaro.org>
Signed-off-by: NAndrzej Zaborowski <andrew.zaborowski@intel.com>
上级 b8d334c8
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册