aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2011-12-18 21:37:57 +0100
committerAndrzej Zaborowski <andrew.zaborowski@intel.com>2011-12-21 05:01:39 +0100
commit5b08bfe2e94c7b1ce39aa3b196231c7f30a5defd (patch)
tree32c66bfcdc226b57e176800dc2ee73e49d56c93b
parentb1f517ed4311da719d7584d1be36a4f21127b0f1 (diff)
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 <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
-rw-r--r--hw/sd.c2
1 files changed, 1 insertions, 1 deletions
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)