All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sd: mmc: Fix SET_BLOCK_COUNT command argument
@ 2021-06-23  8:30 Cédric Le Goater
  2021-06-23  8:39 ` Bin Meng
  0 siblings, 1 reply; 9+ messages in thread
From: Cédric Le Goater @ 2021-06-23  8:30 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Bin Meng, qemu-devel, qemu-block, Cédric Le Goater

The number of blocks is defined in the lower bits [15:0]

Signed-off-by: Cédric Le Goater <clg@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



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-06-23 11:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-23  8:30 [PATCH] sd: mmc: Fix SET_BLOCK_COUNT command argument Cédric Le Goater
2021-06-23  8:39 ` Bin Meng
2021-06-23  8:52   ` Philippe Mathieu-Daudé
2021-06-23  8:57     ` Cédric Le Goater
2021-06-23  9:11     ` Bin Meng
2021-06-23 11:01       ` Philippe Mathieu-Daudé
2021-06-23  8:55   ` Cédric Le Goater
2021-06-23  9:12     ` Bin Meng
2021-06-23  9:16       ` Cédric Le Goater

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.