mtd: OneNAND: Fix multi block erase support at 4KiB pagesize
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Thu Jan 6 10:59:02 EST 2011
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=d983c54ebd875f5f6fd37c154195c1c456a7af70
Commit: d983c54ebd875f5f6fd37c154195c1c456a7af70
Parent: beda1d49941765c0765e0f3cb95b4a86de67745d
Author: Kyungmin Park <kyungmin.park at samsung.com>
AuthorDate: Mon Dec 6 09:05:18 2010 +0900
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Thu Jan 6 15:16:39 2011 +0000
mtd: OneNAND: Fix multi block erase support at 4KiB pagesize
Original 4KiB pagesize chip (SLC) doesn't support Multi block erase at Spec.
Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/onenand/onenand_base.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index c38bf9c..88f23e3 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -2492,7 +2492,8 @@ static int onenand_erase(struct mtd_info *mtd, struct erase_info *instr)
/* Grab the lock and see if the device is available */
onenand_get_device(mtd, FL_ERASING);
- if (region || instr->len < MB_ERASE_MIN_BLK_COUNT * block_size) {
+ if (ONENAND_IS_4KB_PAGE(this) || region ||
+ instr->len < MB_ERASE_MIN_BLK_COUNT * block_size) {
/* region is set for Flex-OneNAND (no mb erase) */
ret = onenand_block_by_block_erase(mtd, instr,
region, block_size);
More information about the linux-mtd-cvs
mailing list