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: stable@vger.kernel.org Fixes: 89550be ("mtd: rawnand: qcom: Implement exec_op()") Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Tested-by: Lakshmi Sowjanya D <quic_laksd@quicinc.com> Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
1 parent 47bddab commit e6031b1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)