[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 12/17] hw/sd: Fix SET_BLOCK_COUNT command argument
From: |
Cédric Le Goater |
Subject: |
[RFC PATCH 12/17] hw/sd: Fix SET_BLOCK_COUNT command argument |
Date: |
Fri, 18 Mar 2022 14:28:19 +0100 |
The number of blocks is defined in the lower bits [15:0].
WIP. This needs to be more precise on the spec version.
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 5d7f04adf5a4..517699c5fc98 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -1406,7 +1406,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.34.1
- [RFC PATCH 00/17] hw/sd: Rework models for eMMC support, Cédric Le Goater, 2022/03/18
- [RFC PATCH 01/17] hw/sd: When card is in wrong state, log which state it is, Cédric Le Goater, 2022/03/18
- [RFC PATCH 02/17] hw/sd: Move proto_name to SDProto structure, Cédric Le Goater, 2022/03/18
- [RFC PATCH 12/17] hw/sd: Fix SET_BLOCK_COUNT command argument,
Cédric Le Goater <=
- [RFC PATCH 17/17] hw/sd: Subtract bootarea size from blk, Cédric Le Goater, 2022/03/18
- [RFC PATCH 07/17] hw/sd: Add sd_cmd_SEND_OP_CMD() handler, Cédric Le Goater, 2022/03/18
- [RFC PATCH 13/17] hw/sd: Update CMD1 definition for MMC, Cédric Le Goater, 2022/03/18
- [RFC PATCH 11/17] hw/sd: Add eMMC support, Cédric Le Goater, 2022/03/18
- [RFC PATCH 14/17] hw/sd: Add CMD21 tuning sequence, Cédric Le Goater, 2022/03/18
- [RFC PATCH 05/17] hw/sd: Add sd_cmd_unimplemented() handler, Cédric Le Goater, 2022/03/18
- [RFC PATCH 04/17] hw/sd: Add sd_cmd_illegal() handler, Cédric Le Goater, 2022/03/18
- [RFC PATCH 03/17] hw/sd: Introduce sd_cmd_handler type, Cédric Le Goater, 2022/03/18