Skip to content

Commit e6031b1

Browse files
Md Sadre Alammiquelraynal
authored andcommitted
mtd: rawnand: qcom: Fix read len for onfi param page
The minimum size to fetch the data from device to QPIC buffer is 512-bytes. If size is less than 512-bytes the data will not be protected by ECC as per QPIC standard. So while reading onfi parameter page from NAND device set nandc->buf_count = 512. Cc: [email protected] Fixes: 89550be ("mtd: rawnand: qcom: Implement exec_op()") Reviewed-by: Manivannan Sadhasivam <[email protected]> Tested-by: Lakshmi Sowjanya D <[email protected]> Signed-off-by: Md Sadre Alam <[email protected]> Signed-off-by: Miquel Raynal <[email protected]>
1 parent 47bddab commit e6031b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mtd/nand/raw/qcom_nandc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1930,7 +1930,7 @@ static int qcom_param_page_type_exec(struct nand_chip *chip, const struct nand_
19301930
qcom_write_reg_dma(nandc, &nandc->regs->cmd1, NAND_DEV_CMD1, 1, NAND_BAM_NEXT_SGL);
19311931
}
19321932

1933-
nandc->buf_count = len;
1933+
nandc->buf_count = 512;
19341934
memset(nandc->data_buffer, 0xff, nandc->buf_count);
19351935

19361936
config_nand_single_cw_page_read(chip, false, 0);

0 commit comments

Comments
 (0)