mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 06:56:46 +07:00
52ff49df7f
The syndrome based page read/write routines store ECC, and possibly other "OOB" data, right after each chunk of ECC'd data. With ECC chunk size of 512 bytes and a large page (2KiB) NAND, the layout is: data-0 OOB-0 data-1 OOB-1 data-2 OOB-2 data-3 OOB-3 OOB-leftover Where OOBx is (prepad, ECC, postpad). However, the current "raw" routines use a traditional layout -- data OOB, disregarding the prepad and postpad values -- so when they're used with that type of ECC hardware, those calls mix up the data and OOB. Which means, in particular, that bad block tables won't be found on startup, with data corruption and related chaos ensuing. The current syndrome-based drivers in mainline all seem to use one chunk per page; presumably they haven't noticed such bugs. Fix this, by adding read/write page_raw_syndrome() routines as siblings of the existing non-raw routines; "raw" just means to bypass the ECC computations, not change data and OOB layout. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> |
||
---|---|---|
.. | ||
alauda.c | ||
ams-delta.c | ||
atmel_nand_ecc.h | ||
atmel_nand.c | ||
au1550nd.c | ||
autcpu12.c | ||
bf5xx_nand.c | ||
cafe_nand.c | ||
cmx270_nand.c | ||
cs553x_nand.c | ||
diskonchip.c | ||
edb7312.c | ||
excite_nandflash.c | ||
fsl_elbc_nand.c | ||
fsl_upm.c | ||
gpio.c | ||
h1910.c | ||
Kconfig | ||
Makefile | ||
mxc_nand.c | ||
nand_base.c | ||
nand_bbt.c | ||
nand_ecc.c | ||
nand_ids.c | ||
nandsim.c | ||
ndfc.c | ||
orion_nand.c | ||
pasemi_nand.c | ||
plat_nand.c | ||
ppchameleonevb.c | ||
pxa3xx_nand.c | ||
rtc_from4.c | ||
s3c2410.c | ||
sh_flctl.c | ||
sharpsl.c | ||
spia.c | ||
tmio_nand.c | ||
ts7250.c |