On 13/8/25 08:16, Michael Tokarev wrote:
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 <li...@roeck-us.net>
Fixes: 775616c3ae8 ("Partial SD card SPI mode support")
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
Tested-by: Guenter Roeck <li...@roeck-us.net>
Reviewed-by: Alex Bennée <alex.ben...@linaro.org>
Reviewed-by: Gustavo Romero <gustavo.rom...@linaro.org>
Tested-by: Alex Bennée <alex.ben...@linaro.org>
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.
You are correct!