android_kernel_motorola_sm6225/drivers/mtd
Artem Bityutskiy 2362a53ec5 UBI: fix error code in ubi_io_read()
When NAND detects an ECC error, it returns -EBADMSG. It does not
stop reading requested data if one page has an ECC error, it keeps
going and reads all the requested data. If it fails to read all
the data, it does not return -EBADMSG, but returns the error code
which reflects the reason of the failure.

But some drivers may have bugs (e.g., OneNAND had) and stop reading
after the first ECC error, so it returns -EBADMSG. In turn, UBI
propagates this up to the caller. The caller will treat this as
"all the requested data was read, but there was an ECC error".

So we change the error code to -EIO if it is -EBADMSG and the read
length is less then the requested length. We also add an assertion,
so if UBI debugging is enabled, UBI will bug.

Pointed-to-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26 19:15:13 +02:00
..
chips [MTD] [NOR] Attempt to clean up the JEDEC unlock address confusion 2007-12-03 13:01:21 +00:00
devices [MTD] mtd_dataflash: Incorrect compare-after-write check 2007-11-28 11:55:32 +00:00
maps [MTD] fix CONFIG_MTD_SHARP_SL if CONFIG_MTD=m 2007-11-28 11:56:19 +00:00
nand [MTD] [NAND] Marvell Orion device bus NAND controller 2007-12-03 13:03:46 +00:00
onenand [MTD] [OneNAND] Do not stop reading for ECC errors 2007-11-26 13:16:29 +00:00
ubi UBI: fix error code in ubi_io_read() 2007-12-26 19:15:13 +02:00
afs.c [MTD] replace kmalloc+memset with kzalloc 2006-11-28 23:47:21 +00:00
cmdlinepart.c [MTD] replace kmalloc+memset with kzalloc 2006-11-28 23:47:21 +00:00
ftl.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
inftlcore.c [MTD] replace kmalloc+memset with kzalloc 2006-11-28 23:47:21 +00:00
inftlmount.c [MTD] drivers/mtd/inftlmount.c: kmalloc + memset conversion to kcalloc 2007-08-01 11:02:40 +01:00
Kconfig [MTD] mtdoops: Document usage in Kconfig 2007-12-03 14:00:06 +00:00
Makefile Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2007-08-23 10:43:14 +01:00
mtd_blkdevs.c [MTD] Always initialise mutex in new mtd_blktrans_dev. 2007-12-03 12:46:12 +00:00
mtdblock.c [MTD] replace kmalloc+memset with kzalloc 2006-11-28 23:47:21 +00:00
mtdblock_ro.c [MTD] replace kmalloc+memset with kzalloc 2006-11-28 23:47:21 +00:00
mtdchar.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2007-08-23 10:43:14 +01:00
mtdconcat.c [MTD] fix mtdconcat for subpage-write NAND 2007-10-14 13:38:02 +01:00
mtdcore.c [MTD] mtdcore.c: share syms with mtd_blkdev.c 2007-06-28 20:24:50 +01:00
mtdcore.h [MTD] mtdcore.c: share syms with mtd_blkdev.c 2007-06-28 20:24:50 +01:00
mtdoops.c [MTD] mtdoops cleanup 2007-12-03 14:00:16 +00:00
mtdpart.c [MTD] Makefile fix for mtdsuper 2007-08-03 12:42:40 +01:00
mtdsuper.c [MTD] Initialise s_flags in get_sb_mtd_aux() 2007-09-02 18:18:46 +01:00
nftlcore.c PCI: Cleanup the includes of <linux/pci.h> 2007-05-02 19:02:35 -07:00
nftlmount.c [MTD] Rework the out of band handling completely 2006-05-29 15:06:51 +02:00
redboot.c [MTD] Skip bad blocks when checking for RedBoot partition table 2007-10-28 21:57:02 -04:00
rfd_ftl.c [MTD] Fix potential leak in rfd_ftl_add_mtd 2007-08-02 21:44:10 +01:00
ssfdc.c [MTD] Fix ssfdc blksize typo 2006-12-11 09:43:38 +00:00