From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Michael Tokarev <mjt@tls.msk.ru>, qemu-devel@nongnu.org
Cc: "Guenter Roeck" <linux@roeck-us.net>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Gustavo Romero" <gustavo.romero@linaro.org>,
"Bin Meng" <bmeng.cn@gmail.com>,
qemu-block@nongnu.org, qemu-stable <qemu-stable@nongnu.org>
Subject: Re: [PULL 1/2] hw/sd/ssi-sd: Return noise (dummy byte) when no card connected
Date: Wed, 13 Aug 2025 09:22:21 +0200 [thread overview]
Message-ID: <90f3ed96-fd24-4d51-a9af-cc6dd3f0a058@linaro.org> (raw)
In-Reply-To: <92ee0558-81c6-45dc-8942-f344a279d637@tls.msk.ru>
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 <linux@roeck-us.net>
>> Fixes: 775616c3ae8 ("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>
>
> 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!
next prev parent reply other threads:[~2025-08-13 7:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-12 16:56 [PULL 0/2] SD/MMC patches for 2025-08-12 Philippe Mathieu-Daudé
2025-08-12 16:56 ` [PULL 1/2] hw/sd/ssi-sd: Return noise (dummy byte) when no card connected Philippe Mathieu-Daudé
2025-08-13 6:16 ` Michael Tokarev
2025-08-13 7:22 ` Philippe Mathieu-Daudé [this message]
2025-08-12 17:02 ` [PULL 2/2] tests/functional: Test SPI-SD adapter without SD " Philippe Mathieu-Daudé
2025-08-12 23:36 ` [PULL 0/2] SD/MMC patches for 2025-08-12 Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=90f3ed96-fd24-4d51-a9af-cc6dd3f0a058@linaro.org \
--to=philmd@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=bmeng.cn@gmail.com \
--cc=gustavo.romero@linaro.org \
--cc=linux@roeck-us.net \
--cc=mjt@tls.msk.ru \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).