Skip to content
Commit 0024622f authored by Amit Kumar Mahapatra's avatar Amit Kumar Mahapatra Committed by Quanyang Wang
Browse files

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: default avatarAmit Kumar Mahapatra <amit.kumar-mahapatra@amd.com>
State: pending
Signed-off-by: default avatarQuanyang Wang <quanyang.wang@windriver.com>
parent 6701401b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment