mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-06 11:02:25 -10:00
Commit1585ab9f1b("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:775616c3ae("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]> Message-Id: <[email protected]>