mirror of https://gitee.com/openkylin/qemu.git
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>
This commit is contained in:
parent
b1f517ed43
commit
5b08bfe2e9
2
hw/sd.c
2
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);
|
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)
|
static int cmd_valid_while_locked(SDState *sd, SDRequest *req)
|
||||||
|
|
Loading…
Reference in New Issue