qemu/hw/sd
Philippe Mathieu-Daudé 4cc833ec3f hw/sd/ssi-sd: Return noise (dummy byte) when no card connected
Commit 1585ab9f1b ("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 <linux@roeck-us.net>
Fixes: 775616c3ae ("Partial SD card SPI mode support")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Gustavo Romero <gustavo.romero@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20250812140415.70153-2-philmd@linaro.org>
(cherry picked from commit e262646e12)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2025-08-13 09:15:28 +03:00
..
allwinner-sdhost.c hw/arm: Mark Allwinner Technology devices as little-endian 2025-02-16 14:41:46 +01:00
aspeed_sdhci.c include/hw/qdev-properties: Remove DEFINE_PROP_END_OF_LIST 2024-12-19 19:36:37 +01:00
bcm2835_sdhost.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
cadence_sdhci.c hw: Use device_class_set_legacy_reset() instead of opencoding 2024-09-13 15:31:44 +01:00
core.c hw/sd/sdcard: Extract TYPE_SDMMC_COMMON from TYPE_SD_CARD 2024-07-05 23:55:02 +02:00
Kconfig hw/sd: Add Cadence SDHCI emulation 2020-09-09 15:54:18 -07:00
meson.build hw/sd: Remove pxa2xx_mmci.c 2024-10-01 14:25:29 +01:00
npcm7xx_sdhci.c hw: Use device_class_set_legacy_reset() instead of opencoding 2024-09-13 15:31:44 +01:00
omap_mmc.c hw/sd/omap_mmc: Untabify 2025-01-31 19:36:44 +01:00
pl181.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
sd.c hw/sd: Remove unused SDState::enable 2025-01-31 19:36:44 +01:00
sdhci-internal.h hw: Make class data 'const' 2025-02-16 14:26:07 +01:00
sdhci-pci.c hw/sd/sdhci: free irq on exit 2025-03-31 21:32:43 +02:00
sdhci.c hw/sd/sdhci: Remove need for SDHCI_VENDOR_IMX definition 2025-03-12 11:11:42 +01:00
sdmmc-internal.h hw/sd/sdcard: Extract TYPE_SDMMC_COMMON from TYPE_SD_CARD 2024-07-05 23:55:02 +02:00
ssi-sd.c hw/sd/ssi-sd: Return noise (dummy byte) when no card connected 2025-08-13 09:15:28 +03:00
trace-events hw/sd: Remove pxa2xx_mmci.c 2024-10-01 14:25:29 +01:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00