mirror_ubuntu-kernels/include/linux/mtd
Brian Norris cc26c3cd3d mtd: nand: expand nand_ecc_layout, deprecate ioctl ECCGETLAYOUT
struct nand_ecclayout is too small for many new chips; OOB regions can be as
large as 448 bytes and may increase more in the future. Thus, copying that
struct to user-space with the ECCGETLAYOUT ioctl is not a good idea; the ioctl
would have to be updated every time there's a change to the current largest
size.

Instead, the old nand_ecclayout is renamed to nand_ecclayout_user and a
new struct nand_ecclayout is created that can accomodate larger sizes and
expand without affecting the user-space. struct nand_ecclayout can still
be used in board drivers without modification -- at least for now.

A new function is provided to convert from the new to the old in order to
allow the deprecated ioctl to continue to work with truncated data. Perhaps
the ioctl, the conversion process, and the struct nand_ecclayout_user can be
removed altogether in the future.

Note: There are comments in nand/davinci_nand.c::nand_davinci_probe()
regarding this issue; this driver (and maybe others) can be updated to
account for extra space. All kernel drivers can use the expanded
nand_ecclayout as a drop-in replacement and ignore its benefits.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2010-10-24 23:37:24 +01:00
..
bbm.h mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
blktrans.h mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
cfi_endian.h mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
cfi.h mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
concat.h mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
doc2000.h mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
flashchip.h mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
ftl.h [MTD] Remove strange u_int32_t types from FTL 2008-12-10 14:06:42 +00:00
gen_probe.h mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
inftl.h mtd: inftl.h: fix spacing errors 2010-10-24 23:27:24 +01:00
map.h mtd: Remove obsolete <mtd/compatmac.h> include 2010-08-08 21:19:42 +01:00
mtd.h mtd: nand: expand nand_ecc_layout, deprecate ioctl ECCGETLAYOUT 2010-10-24 23:37:24 +01:00
mtdram.h mtd: mtdram.h: checkpatch cleanup 2010-05-10 14:11:30 +01:00
nand_ecc.h mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
nand-gpio.h
nand.h mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
ndfc.h
nftl.h mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
onenand_regs.h mtd: OneNAND: multiblock erase support 2009-11-30 09:43:18 +00:00
onenand.h mtd: OneNAND: Introduce chip_probe function 2010-08-04 10:51:47 +01:00
partitions.h mtd: nand: expand nand_ecc_layout, deprecate ioctl ECCGETLAYOUT 2010-10-24 23:37:24 +01:00
pfow.h [MTD] LPDDR PFOW definition 2009-01-05 13:55:58 +01:00
physmap.h mtd-physmap: add support users can assign the probe type in board files 2010-08-08 12:28:15 +01:00
pismo.h mtd: Really add ARM pismo support 2010-01-13 09:04:53 +00:00
plat-ram.h
pmc551.h
qinfo.h [MTD] LPDDR QINFO records definitions 2009-01-05 13:55:54 +01:00
sh_flctl.h mtd/nand/sh_flctl: Move function mtd_to_flctl to fix build failure 2010-05-12 23:24:23 +01:00
sharpsl.h
super.h
ubi.h UBI: Add ubi_open_volume_path 2009-11-24 08:18:54 +02:00
xip.h