aboutsummaryrefslogtreecommitdiff
path: root/hw/sd
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2021-06-07 17:24:58 +0200
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>2021-07-12 12:27:38 +0200
commitc60b292106132f72c1a5afbbd9c55dbc341d1620 (patch)
tree5bf00d77dafeb69c06d1141614442ee1e76258ff /hw/sd
parentd1987c8114921eb30859854de664f879b5626da7 (diff)
downloadqemu-c60b292106132f72c1a5afbbd9c55dbc341d1620.zip
qemu-c60b292106132f72c1a5afbbd9c55dbc341d1620.tar.gz
qemu-c60b292106132f72c1a5afbbd9c55dbc341d1620.tar.bz2
hw/sd/sdcard: When card is in wrong state, log which state it is
We report the card is in an inconsistent state, but don't precise in which state it is. Add this information, as it is useful when debugging problems. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Message-Id: <20210624142209.1193073-2-f4bug@amsat.org> Reviewed-by: Alexander Bulekov <alxndr@bu.edu>
Diffstat (limited to 'hw/sd')
-rw-r--r--hw/sd/sd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 282d39a..d8fdf84 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -1504,7 +1504,8 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, SDRequest req)
return sd_illegal;
}
- qemu_log_mask(LOG_GUEST_ERROR, "SD: CMD%i in a wrong state\n", req.cmd);
+ qemu_log_mask(LOG_GUEST_ERROR, "SD: CMD%i in a wrong state: %s\n",
+ req.cmd, sd_state_name(sd->state));
return sd_illegal;
}