kernel-ark/drivers/mtd
Brian Norris 6d77b9d0af mtd: nand: invalidate cache on unaligned reads
In rare cases, we are given an unaligned parameter `from' in
`nand_do_read_ops()'. In such cases, we use the page cache
(chip->buffers->databuf) as an intermediate buffer before dumping to the
client buffer. However, there are also cases where this buffer is not
cleanly reusable. In those cases, we need to make sure that we
explicitly invalidate the cache.

This patch prevents accidental reusage of the page cache, and for me,
this solves some problems I come across when reading a corrupted BBT
from flash (NAND_BBT_USE_FLASH and NAND_BBT_NO_OOB).

Note: the rare "unaligned" case is a result of the extra BBT pattern +
version located in the data area instead of OOB.

Also, this patch disables caching on raw reads, since we are reading
without error correction. This is, obviously, prone to errors and should
not be cached.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
2011-09-21 09:19:08 +03:00
..
chips mtd: cleanup style on pr_debug messages 2011-09-11 15:02:16 +03:00
devices mtd: rename MTD_OOB_* to MTD_OPS_* 2011-09-11 15:28:59 +03:00
lpddr mtd: remove duplicate assignment of chip->state 2011-05-25 02:11:13 +01:00
maps mtd: drop Integrator flash map Kconfig 2011-09-11 16:35:47 +03:00
nand mtd: nand: invalidate cache on unaligned reads 2011-09-21 09:19:08 +03:00
onenand mtd: utilize `mtd_is_*()' functions 2011-09-21 09:19:06 +03:00
tests mtd: utilize `mtd_is_*()' functions 2011-09-21 09:19:06 +03:00
ubi mtd: utilize `mtd_is_*()' functions 2011-09-21 09:19:06 +03:00
afs.c mtd: abstract last MTD partition parser argument 2011-09-11 15:02:10 +03:00
ar7part.c mtd: abstract last MTD partition parser argument 2011-09-11 15:02:10 +03:00
cmdlinepart.c mtd: abstract last MTD partition parser argument 2011-09-11 15:02:10 +03:00
ftl.c mtd: spelling fixes 2011-09-11 15:02:16 +03:00
inftlcore.c mtd: utilize `mtd_is_*()' functions 2011-09-21 09:19:06 +03:00
inftlmount.c mtd: spelling fixes 2011-09-11 15:02:16 +03:00
Kconfig mtd: remove CONFIG_MTD_DEBUG 2011-09-11 15:02:16 +03:00
Makefile mtd: make ofpart buildable as a separate module 2011-09-11 15:02:13 +03:00
mtd_blkdevs.c mtd: mtd_blkdevs: fix error path in blktrans_open 2011-05-25 01:53:45 +01:00
mtdblock_ro.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
mtdblock.c mtd: replace DEBUG() with pr_debug() 2011-09-11 15:02:16 +03:00
mtdchar.c mtd: utilize `mtd_is_*()' functions 2011-09-21 09:19:06 +03:00
mtdconcat.c mtd: utilize `mtd_is_*()' functions 2011-09-21 09:19:06 +03:00
mtdcore.c mtd: check parts pointer before using it 2011-09-11 15:02:18 +03:00
mtdcore.h mtd: hide parse_mtd_partitions 2011-09-11 15:02:13 +03:00
mtdoops.c mtd: utilize `mtd_is_*()' functions 2011-09-21 09:19:06 +03:00
mtdpart.c mtd: utilize `mtd_is_*()' functions 2011-09-21 09:19:06 +03:00
mtdsuper.c mtd: replace DEBUG() with pr_debug() 2011-09-11 15:02:16 +03:00
mtdswap.c mtd: utilize `mtd_is_*()' functions 2011-09-21 09:19:06 +03:00
nftlcore.c mtd: utilize `mtd_is_*()' functions 2011-09-21 09:19:06 +03:00
nftlmount.c mtd: spelling fixes 2011-09-11 15:02:16 +03:00
ofpart.c mtd: ofpart: add ofoldpart alias 2011-09-11 15:02:14 +03:00
redboot.c mtd: abstract last MTD partition parser argument 2011-09-11 15:02:10 +03:00
rfd_ftl.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
sm_ftl.c mtd: utilize `mtd_is_*()' functions 2011-09-21 09:19:06 +03:00
sm_ftl.h mtd: sm_ftl: cosmetic, use bool when possible 2010-10-25 01:33:08 +01:00
ssfdc.c mtd: rename MTD_OOB_* to MTD_OPS_* 2011-09-11 15:28:59 +03:00