Skip to contentSkip to conversation

cmd: mtd: Add total length of read operation

PATCH Superseded Leo Yu 1 participant 1 message Nov 2, 2022

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Leo Yu

author
#0 lore raw

PATCH 3/5 cmd: mtd: Add total length of read operation

This patch bypasses the limitation of length for read operations in MTD test module. Thus, the total length of a read operation can be passed down to the continuous read operation in SPI NAND layer.

---
 cmd/mtd.c | 2 ++
 1 file changed, 2 insertions(+)
cmd/mtd.c +2 -0
index ad5cc9827d..0b601e08a3 100644
@@ -335,6 +335,8 @@ static int do_mtd_io(struct cmd_tbl *cmdtp, int flag, int argc,
 	io_op.ooblen = woob ? mtd->oobsize : 0;
 	io_op.datbuf = buf;
 	io_op.oobbuf = woob ? &buf[len] : NULL;
+	/* Total length of this read operation passed by user */
+	io_op.totallen = len;
 
 	/* Search for the first good block after the given offset */
 	off = start_off;

--
2.17.1