On Mon, Jul 20, 2026 at 5:19 AM Bernhard Beschow <[email protected]> wrote: > > In commit 468fa450a7e0 ("hw/sd: Switch read/write primitive to > buf+len"), `sd_read_byte()` changed its contract to return the read size > rather than the read value (and was renamed to `sd_read_data()` > accordingly). In an error case, however, `sd_read_data()` returns 0 by > means of `dummy_byte` which is the code for the old contract. Moreover, > `sdbus_read_data()` asserts the virtual method `read_data()` (and thus > `sd_read_data()`) to return a non-zero size, i.e. to make progress and > not loop forever. Fix the code to behave like the "DAT read illegal for > command" case. > > Fixes: 468fa450a7e0 ("hw/sd: Switch read/write primitive to buf+len")
Missing SoB ... > > --- > cc: Christian Speich <[email protected]> > --- > hw/sd/sd.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > Other than that, Reviewed-by: Bin Meng <[email protected]>
