[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 1/4] hw/sd/sdcard: When card is in wrong state, log which state it
|
From: |
Philippe Mathieu-Daudé |
|
Subject: |
[PULL 1/4] hw/sd/sdcard: When card is in wrong state, log which state it is |
|
Date: |
Sun, 11 Jul 2021 23:10:54 +0200 |
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>
---
hw/sd/sd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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;
}
--
2.31.1
- [PULL 0/4] SD/MMC patches for 2021-07-11, Philippe Mathieu-Daudé, 2021/07/11
- [PULL 1/4] hw/sd/sdcard: When card is in wrong state, log which state it is,
Philippe Mathieu-Daudé <=
- [PULL 2/4] hw/sd/sdcard: Extract address_in_range() helper, log invalid accesses, Philippe Mathieu-Daudé, 2021/07/11
- [PULL 3/4] hw/sd/sdcard: Check for valid address range in SEND_WRITE_PROT (CMD30), Philippe Mathieu-Daudé, 2021/07/11
- [PULL 4/4] hw/sd: sdhci: Enable 64-bit system bus capability in the default SD/MMC host controller, Philippe Mathieu-Daudé, 2021/07/11
- Re: [PULL 0/4] SD/MMC patches for 2021-07-11, Philippe Mathieu-Daudé, 2021/07/12