Skip to content

Commit 318207f

Browse files
Md Sadre Alammiquelraynal
authored andcommitted
mtd: rawnand: qcom: Clear buf_count and buf_start in raw read
Initialize buf_count and buf_start to 0 before starting the raw read. If we will not initialize then read staus will get updated with wrong value and we will see failure for even successful raw read transaction. Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com> Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20230818145101.23825-3-quic_mdalam@quicinc.com
1 parent b9e002a commit 318207f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/mtd/nand/raw/qcom_nandc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,6 +1471,9 @@ qcom_nandc_read_cw_raw(struct mtd_info *mtd, struct nand_chip *chip,
14711471
int raw_cw = cw;
14721472

14731473
nand_read_page_op(chip, page, 0, NULL, 0);
1474+
nandc->buf_count = 0;
1475+
nandc->buf_start = 0;
1476+
clear_read_regs(nandc);
14741477
host->use_ecc = false;
14751478

14761479
if (nandc->props->qpic_v2)

0 commit comments

Comments
 (0)