[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] sd: mmc: Fix SET_BLOCK_COUNT command argument
From: |
Cédric Le Goater |
Subject: |
[PATCH] sd: mmc: Fix SET_BLOCK_COUNT command argument |
Date: |
Wed, 23 Jun 2021 10:30:04 +0200 |
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
- [PATCH] sd: mmc: Fix SET_BLOCK_COUNT command argument,
Cédric Le Goater <=