mtd: rawnand: arasan: Avoid overwriting valid data while checking for bitflips during HW-ECC read
commit ad805053942bce13d8f10fd2bcde1097fc1e0d54 from https://github.com/Xilinx/linux-xlnx.git xlnx_rebase_v6.1 In BBT each block is represented with two bits of data, all good blocks are represented as "11b" and all bad blocks are represented as "10b", "01b" or "00b". While reading bad block info from the flash device in HW-ECC mode, the driver was checking bitflips only in BBT page and not in the corresponding ECC data, due to this the driver was overwriting the BBT info with all "0xFF" if the number of bitflips reported with the BBT data is less than bitflips threshold, this results in BBT corruption. Updated the driver to include the ECC bitflips check along with page data while checking for erased ECC data chunk. Fixes: 88ffef1b ("mtd: rawnand: arasan: Support the hardware BCH ECC engine") Signed-off-by:Amit Kumar Mahapatra <amit.kumar-mahapatra@amd.com> State: pending Signed-off-by:
Quanyang Wang <quanyang.wang@windriver.com>
Loading
Please register or sign in to comment