On 12.08.2025 19:56, Philippe Mathieu-Daudé wrote:
Commit 1585ab9f1ba ("hw/sd/sdcard: Fill SPI response bits in card code") exposed a bug in the SPI adapter: if no SD card is plugged, we are returning "there is a card with an error". This is wrong, we shouldn't return any particular packet response, but the noise shifted on the MISO line. Return the dummy byte, otherwise we get:qemu-system-riscv64: ../hw/sd/ssi-sd.c:160: ssi_sd_transfer: Assertion `s->arglen > 0' failed. Reported-by: Guenter Roeck <[email protected]> Fixes: 775616c3ae8 ("Partial SD card SPI mode support") Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Tested-by: Guenter Roeck <[email protected]> Reviewed-by: Alex Bennée <[email protected]> Reviewed-by: Gustavo Romero <[email protected]> Tested-by: Alex Bennée <[email protected]>
While the commit which exposed the bug is in 10.1, it looks to me like this is a qemu-stable material (7.2 & 10.0), because the bug is there, it just does not result in qemu assertion failure. Please let me know if it is not. Thanks, /mjt
