android_kernel_xiaomi_sm8350/drivers/mtd
Artem Bityutskiy 49dc08eeda [MTD] [OneNAND] fix numerous races
This patch make the OneNAND driver much less racy. It fixes
our "onenand_wait: read timeout!" heisenbugs. The reason of
these bugs was that the driver did not lock the chip when
accessing OTP, and it screwed up OneNAND state when the OTP
was read while JFFS2 was doing FS checking.

This patch also fixes other races I spotted:
1. BBT was not protected
2. Access to ecc_stats was not protected

Now the chip is locked when BBT is accessed.

To fix all of these I basically split all interface functions
on 'function()' and 'function_nolock()' parts.

I tested this patch on N800 hardware - it fixes our problems.
But I tested a little different version because our OneNAND
codebase is slightly out-of-date. But it should be OK.

This patch also includes the prin fixes I posted before.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-09-23 19:58:52 +01:00
..
chips [MTD] fix CFI point method for discontiguous maps 2007-09-23 18:40:49 +01:00
devices Revert "[MTD] Driver for AT26Fxxx dataflash devices" 2007-08-03 23:02:02 +01:00
maps [MTD] map driver for NOR flash on the Intel Vermilion Range chipset 2007-09-23 18:51:25 +01:00
nand [MTD] [NAND] nandsim: avoid deadlocking FS 2007-09-06 10:16:22 +01:00
onenand [MTD] [OneNAND] fix numerous races 2007-09-23 19:58:52 +01:00
ubi [UBI] drivers/mtd/ubi/scan.c: kmalloc + memset conversion to kzalloc 2007-08-01 11:04:05 +01:00
afs.c
cmdlinepart.c
ftl.c
inftlcore.c
inftlmount.c [MTD] drivers/mtd/inftlmount.c: kmalloc + memset conversion to kcalloc 2007-08-01 11:02:40 +01:00
Kconfig [MTD] oops and panic message logging to MTD device 2007-06-28 20:18:02 +01: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 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2007-07-23 10:20:10 +01:00
mtdblock_ro.c
mtdblock.c
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 do_div() type warning in mtdconcat 2007-07-23 13:07:06 +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 printk warning fixes 2007-08-22 12:43:13 +01:00
mtdpart.c [MTD] Makefile fix for mtdsuper 2007-08-03 12:42:40 +01:00
mtdsuper.c [MTD] Fix error checking after get_mtd_device() in get_sb_mtd functions 2007-06-01 19:21:59 +01:00
nftlcore.c PCI: Cleanup the includes of <linux/pci.h> 2007-05-02 19:02:35 -07:00
nftlmount.c
redboot.c
rfd_ftl.c [MTD] Fix potential leak in rfd_ftl_add_mtd 2007-08-02 21:44:10 +01:00
ssfdc.c