remarkable-linux/drivers/mtd
Brian Norris e47f68587b mtd: check for max_bitflips in mtd_read_oob()
mtd_read_oob() has some unexpected similarities to mtd_read(). For
instance, when ops->datbuf != NULL, nand_base.c might return max_bitflips;
however, when ops->datbuf == NULL, nand_base's code potentially could
return -EUCLEAN (no in-tree drivers do this yet). In any case where the
driver might return max_bitflips, we should translate this into an
appropriate return code using the bitflip_threshold.

Essentially, mtd_read_oob() duplicates the logic from mtd_read().

This prevents users of mtd_read_oob() from receiving a positive return
value (i.e., from max_bitflips) and interpreting it as an unknown error.

Artem: amend comments.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Mike Dunn <mikedunn@newsguy.com>
Reviewed-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-09-29 14:50:50 +01:00
..
chips mtd: cfi_cmdset_0002: Micron M29EW bugfixes as per TN-13-07 2012-07-16 21:37:15 +01:00
devices mtd: m25p80: Fix the Spansion chip detection 2012-09-29 14:50:22 +01:00
lpddr
maps Linux 3.6-rc2 2012-08-22 12:55:43 +01:00
nand mtd: gpmi: change the code for clocks 2012-09-29 14:50:02 +01:00
onenand
tests mtd: tests: use random32 instead of home-brewed generator 2012-07-06 18:17:04 +01:00
ubi UBI: harmonize the update of ubi->beb_rsvd_pebs 2012-07-18 14:30:34 +03:00
afs.c
ar7part.c
bcm63xxpart.c
cmdlinepart.c
ftl.c
inftlcore.c
inftlmount.c
Kconfig mtd: of_parts: fix breakage in Kconfig 2012-06-01 20:06:59 +01:00
Makefile
mtd_blkdevs.c
mtdblock.c
mtdblock_ro.c
mtdchar.c
mtdconcat.c
mtdcore.c mtd: check for max_bitflips in mtd_read_oob() 2012-09-29 14:50:50 +01:00
mtdcore.h
mtdoops.c Linux 3.6-rc2 2012-08-22 12:55:43 +01:00
mtdpart.c
mtdsuper.c VFS: Pass mount flags to sget() 2012-07-14 16:38:34 +04:00
mtdswap.c
nftlcore.c
nftlmount.c
ofpart.c
redboot.c
rfd_ftl.c
sm_ftl.c
sm_ftl.h
ssfdc.c