[RFC PATCH 2/2] mtd: nand: always request data transfer for parameter page

Stefan Agner stefan at agner.ch
Thu Jan 11 15:50:37 PST 2018


To make sure the controller actually transfers data add a
DATA_IN op even if len is 0.

Signed-off-by: Stefan Agner <stefan at agner.ch>
---
 drivers/mtd/nand/nand_base.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 96c97588e1ba..26bbf54e125b 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -1510,10 +1510,6 @@ static int nand_read_param_page_op(struct nand_chip *chip, u8 page, void *buf,
 		};
 		struct nand_operation op = NAND_OPERATION(instrs);
 
-		/* Drop the DATA_IN instruction if len is set to 0. */
-		if (!len)
-			op.ninstrs--;
-
 		return nand_exec_op(chip, &op);
 	}
 
-- 
2.15.1




More information about the linux-mtd mailing list