From 5b08bfe2e94c7b1ce39aa3b196231c7f30a5defd Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Sun, 18 Dec 2011 21:37:57 +0100 Subject: [PATCH] hw/sd.c: Set ILLEGAL_COMMAND for ACMDs in invalid state App commands in an invalid state should set ILLEGAL_COMMAND, not merely return a zero response. Signed-off-by: Peter Maydell Signed-off-by: Andrzej Zaborowski --- hw/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/sd.c b/hw/sd.c index 9116f67b83..9eebfacd5d 100644 --- a/hw/sd.c +++ b/hw/sd.c @@ -1262,7 +1262,7 @@ static sd_rsp_type_t sd_app_command(SDState *sd, } fprintf(stderr, "SD: ACMD%i in a wrong state\n", req.cmd); - return sd_r0; + return sd_illegal; } static int cmd_valid_while_locked(SDState *sd, SDRequest *req) -- 2.39.5