linux_dsm_epyc7002/drivers/mtd/nand
David Brownell 52ff49df7f [MTD] [NAND] fix "raw" reads with ECC syndrome layouts
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>
2009-03-20 12:27:43 +00:00
..
alauda.c [MTD] [NAND] alauda: use USB API functions rather than constants 2009-01-05 12:59:02 +01:00
ams-delta.c omap drivers: switch to standard GPIO calls 2008-10-16 11:21:40 -07:00
atmel_nand_ecc.h [ARM] 5265/3: [AT91] Add copyright info 2008-09-21 23:01:18 +01:00
atmel_nand.c [ARM] 5400/1: Add support for inverted rdy_busy pin for Atmel nand device controller 2009-02-16 21:40:39 +00:00
au1550nd.c [MTD] [NAND] au1550nd.c: remove unused #include <version.h> 2008-08-25 12:20:53 +01:00
autcpu12.c [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
bf5xx_nand.c [MTD] [NAND] Blackfin NFC Driver: drop pointless casts with set_dma_callback() 2009-03-20 12:18:04 +00:00
cafe_nand.c [MTD] [NAND] add cmdline parsing (mtdparts=) support to cafe_nand 2009-01-09 12:27:13 +00:00
cmx270_nand.c [ARM] 5282/1: pxa: add CM-X255 support 2008-10-07 12:05:07 +01:00
cs553x_nand.c [MTD] [NAND] Fix compilation warnings in drivers/mtd/nand/cs553x_nand.c 2008-10-18 12:39:17 +01:00
diskonchip.c [MTD] [NAND] diskonchip.c fix sparse endian warnings 2008-08-01 15:34:16 +01:00
edb7312.c [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
excite_nandflash.c [MTD] [NAND] excite_nandflash: simplify code using ARRAY_SIZE() macro. 2008-06-04 17:28:03 +01:00
fsl_elbc_nand.c powerpc: More printing warning fixes for the l64 to ll64 conversion 2009-01-28 17:15:52 +11:00
fsl_upm.c [MTD] struct device - replace bus_id with dev_name(), dev_set_name() 2008-12-23 10:00:14 +00:00
gpio.c [MTD] [NAND] GPIO NAND flash driver 2008-10-18 12:48:42 +01:00
h1910.c [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
Kconfig [MTD] [NAND] ndfc driver 2009-01-05 16:42:44 +00:00
Makefile [MTD] [NAND] GPIO NAND flash driver 2008-10-18 12:48:42 +01:00
mxc_nand.c [MTD] [NAND] Freescale i.MX2 NAND driver 2008-09-02 22:35:36 +01:00
nand_base.c [MTD] [NAND] fix "raw" reads with ECC syndrome layouts 2009-03-20 12:27:43 +00:00
nand_bbt.c [MTD] update internal API to support 64-bit device size 2008-12-10 13:37:21 +00:00
nand_ecc.c [MTD] [NAND] nand_ecc.c: adding support for 512 byte ecc 2008-08-25 12:23:36 +01:00
nand_ids.c MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
nandsim.c [MTD] [NAND] fix nandsim sched.h references 2009-01-05 12:59:32 +01:00
ndfc.c [MTD] [NAND] ndfc driver 2009-01-05 16:42:44 +00:00
orion_nand.c [ARM] fix lots of ARM __devexit sillyness 2009-03-03 21:04:04 +00:00
pasemi_nand.c powerpc: More printing warning fixes for the l64 to ll64 conversion 2009-01-28 17:15:52 +11:00
plat_nand.c [MTD] struct device - replace bus_id with dev_name(), dev_set_name() 2008-12-23 10:00:14 +00:00
ppchameleonevb.c MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
pxa3xx_nand.c [MTD] [NAND] pxa3xx: convert from ns to clock ticks more accurately 2009-01-05 13:03:20 +01:00
rtc_from4.c MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
s3c2410.c Merge branch 's3c-moves2' of git://aeryn.fluff.org.uk/bjdooks/linux into devel 2008-11-29 19:35:07 +00:00
sh_flctl.c [MTD] [NAND] sh_flctl: fix compile error 2008-10-20 09:23:19 +01:00
sharpsl.c [MTD] sharpsl-nand: move registration to board code 2008-10-29 21:08:37 +03:00
spia.c MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
tmio_nand.c [MTD] struct device - replace bus_id with dev_name(), dev_set_name() 2008-12-23 10:00:14 +00:00
ts7250.c [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00