]> git.proxmox.com Git - mirror_qemu.git/commitdiff
hw/sd.c: Set ILLEGAL_COMMAND for ACMDs in invalid state
authorPeter Maydell <peter.maydell@linaro.org>
Sun, 18 Dec 2011 20:37:57 +0000 (21:37 +0100)
committerAndrzej Zaborowski <andrew.zaborowski@intel.com>
Wed, 21 Dec 2011 04:01:39 +0000 (05:01 +0100)
App commands in an invalid state should set ILLEGAL_COMMAND, not
merely return a zero response.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
hw/sd.c

diff --git a/hw/sd.c b/hw/sd.c
index 9116f67b83921b8760e0f3e7ca77fa2f2718eeda..9eebfacd5d6b92ab05e682ca8d442e589bff07d3 100644 (file)
--- 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)