linux/drivers/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
..
chips mtd: Remove obsolete <mtd/compatmac.h> include 2010-08-08 21:19:42 +01:00
devices mtd/m25p80: fix test for end of loop 2010-08-12 12:31:39 +01:00
lpddr mtd: change struct flchip_shared spinlock locking into mutex 2010-08-06 09:22:16 +01:00
maps of: fix missing headers for of_address_to_resource() in MTD and SysACE drivers 2010-08-17 13:16:47 -06:00
nand mtd: nand: expand nand_ecc_layout, deprecate ioctl ECCGETLAYOUT 2010-10-24 23:37:24 +01:00
onenand mtd: OneNAND: Fix loop hang when DMA error at Samsung SoCs 2010-09-13 08:49:45 +01:00
tests mtd: tests: return -1 if verify failed 2010-08-02 09:06:20 +01:00
ubi UBI: do not oops when erroneous PEB is scheduled for scrubbing 2010-08-30 13:32:31 +03:00
Kconfig mtd: update description on sm_ftl 2010-08-06 09:21:40 +01:00
Makefile Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2010-05-10 14:32:46 +01:00
afs.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
ar7part.c [MTD] mtdpart: Make all partition parsers return allocated array 2009-03-20 18:55:17 +00:00
cmdlinepart.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
ftl.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
inftlcore.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
inftlmount.c mtd: Remove obsolete <mtd/compatmac.h> include 2010-08-08 21:19:42 +01:00
mtd_blkdevs.c Merge branch 'for-2.6.36' of git://git.kernel.dk/linux-2.6-block 2010-08-10 15:22:42 -07:00
mtdblock.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
mtdblock_ro.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
mtdchar.c mtd: nand: expand nand_ecc_layout, deprecate ioctl ECCGETLAYOUT 2010-10-24 23:37:24 +01:00
mtdconcat.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
mtdcore.c mtd: Remove obsolete <mtd/compatmac.h> include 2010-08-08 21:19:42 +01:00
mtdcore.h mtd: Replace static array of devices with an idr structure 2010-02-25 11:55:14 +00:00
mtdoops.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
mtdpart.c mtd: Remove obsolete <mtd/compatmac.h> include 2010-08-08 21:19:42 +01:00
mtdsuper.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
nftlcore.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
nftlmount.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
ofpart.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
redboot.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
rfd_ftl.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
sm_ftl.c bitops: rename for_each_bit() to for_each_set_bit(): mtd 2010-04-08 09:42:41 +01:00
sm_ftl.h mtd: Add new SmartMedia/xD FTL 2010-02-26 19:06:50 +00:00
ssfdc.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00