From: Philippe Mathieu-Daudé Date: Mon, 7 Jun 2021 15:24:58 +0000 (+0200) Subject: hw/sd/sdcard: When card is in wrong state, log which state it is X-Git-Tag: v6.1.0-rc0~24^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c60b292106132f72c1a5afbbd9c55dbc341d1620;p=thirdparty%2Fqemu.git 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é Reviewed-by: Bin Meng Message-Id: <20210624142209.1193073-2-f4bug@amsat.org> Reviewed-by: Alexander Bulekov --- diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 282d39a7042..d8fdf84f4db 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; }