Skip to content

Commit 7db5be6

Browse files
Md Sadre Alamsmb49
authored andcommitted
mtd: rawnand: qcom: Fix read len for onfi param page
BugLink: https://bugs.launchpad.net/bugs/2120812 commit e6031b11544b44966ba020c867fe438bccd3bdfa upstream. 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]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Noah Wager <[email protected]> Signed-off-by: Stefan Bader <[email protected]>
1 parent d52e955 commit 7db5be6

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
@@ -1922,7 +1922,7 @@ static int qcom_param_page_type_exec(struct nand_chip *chip, const struct nand_
19221922
qcom_write_reg_dma(nandc, &nandc->regs->cmd1, NAND_DEV_CMD1, 1, NAND_BAM_NEXT_SGL);
19231923
}
19241924

1925-
nandc->buf_count = len;
1925+
nandc->buf_count = 512;
19261926
memset(nandc->data_buffer, 0xff, nandc->buf_count);
19271927

19281928
config_nand_single_cw_page_read(chip, false, 0);

0 commit comments

Comments
 (0)