The number of blocks is defined in the lower bits [15:0] Signed-off-by: Cédric Le Goater <c...@kaod.org> --- hw/sd/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c index a73d80661a10..a2553a502edc 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -1358,7 +1358,7 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, SDRequest req) } switch (sd->state) { case sd_transfer_state: - sd->multi_blk_cnt = req.arg; + sd->multi_blk_cnt = req.arg & 0xFFFF; return sd_r1; default: -- 2.31.1