diff options
author | Anatolij Gustschin <agust@denx.de> | 2011-02-10 16:01:46 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2011-03-11 14:22:46 +0000 |
commit | 13ce77f46c79a3839e4c2ff9722c9416c165f498 (patch) | |
tree | db584a38edc5478ffdd6326afbffddf7f9158dd5 /drivers/mtd/chips/cfi_cmdset_0002.c | |
parent | d8f90b2c9d521500bcd4a1ecdcdb283bfdd2186f (diff) | |
download | kernel_i9300_mainline-13ce77f46c79a3839e4c2ff9722c9416c165f498.zip kernel_i9300_mainline-13ce77f46c79a3839e4c2ff9722c9416c165f498.tar.gz kernel_i9300_mainline-13ce77f46c79a3839e4c2ff9722c9416c165f498.tar.bz2 |
mtd: cfi: fix writebufsize initialization
When initializing mtd->writebufsize, we must take into account
possible flash chip interleaving. Wrong writebufsize initialization
caused UBIFS recovery issues resulting in unmountable UBIFS file
system on NOR flash partitions.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Guillaume LECERF <glecerf@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/chips/cfi_cmdset_0002.c')
-rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0002.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index f072fcf..7e9c4e9 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c @@ -440,7 +440,7 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) mtd->flags = MTD_CAP_NORFLASH; mtd->name = map->name; mtd->writesize = 1; - mtd->writebufsize = 1 << cfi->cfiq->MaxBufWriteSize; + mtd->writebufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize; DEBUG(MTD_DEBUG_LEVEL3, "MTD %s(): write buffer size %d\n", __func__, mtd->writebufsize); |