OSDN Git Service

mtd: rawnand: qcom: Fix DMA sync on FLASH_STATUS register read
authorPraveenkumar I <ipkumar@codeaurora.org>
Fri, 9 Oct 2020 08:07:52 +0000 (13:37 +0530)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 10 Dec 2020 21:37:31 +0000 (22:37 +0100)
commitbc3686021122de953858a5be4cbf6e3f1d821e79
treeabd8778a7ca75613acff2e8cfd2ec1248ed6117b
parentefd50ff127b59d9a0f5f41ebf842d0d6ae8e4f6d
mtd: rawnand: qcom: Fix DMA sync on FLASH_STATUS register read

After each codeword NAND_FLASH_STATUS is read for possible operational
failures. But there is no DMA sync for CPU operation before reading it
and this leads to incorrect or older copy of DMA buffer in reg_read_buf.

This patch adds the DMA sync on reg_read_buf for CPU before reading it.

Fixes: 5bc36b2bf6e2 ("mtd: rawnand: qcom: check for operation errors in case of raw read")
Cc: stable@vger.kernel.org
Signed-off-by: Praveenkumar I <ipkumar@codeaurora.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/1602230872-25616-1-git-send-email-ipkumar@codeaurora.org
drivers/mtd/nand/raw/qcom_nandc.c