diff options
author | Thomas Gleixner <tglx@cruncher.tec.linutronix.de> | 2006-05-23 06:37:31 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@cruncher.tec.linutronix.de> | 2006-05-23 06:37:31 -0400 |
commit | 4cbb9b80e171107c6c34116283fe38e5a396c68b (patch) | |
tree | 9463f2e4774f14752cf4bb52431e14e569256f72 /drivers/mtd/nand/diskonchip.c | |
parent | 6dfc6d250d0b7ebaa6423c44dcd09fcfe68deabd (diff) | |
parent | 9fe4854cd1f60273f9a3ece053f4789605f58a5e (diff) |
Merge branch 'master' of /home/tglx/work/kernel/git/mtd-2.6/
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/mtd/nand/diskonchip.c')
-rw-r--r-- | drivers/mtd/nand/diskonchip.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c index 128c937af32f..b771608ef84e 100644 --- a/drivers/mtd/nand/diskonchip.c +++ b/drivers/mtd/nand/diskonchip.c | |||
@@ -761,9 +761,9 @@ static void doc2001plus_command(struct mtd_info *mtd, unsigned command, int colu | |||
761 | if (command == NAND_CMD_SEQIN) { | 761 | if (command == NAND_CMD_SEQIN) { |
762 | int readcmd; | 762 | int readcmd; |
763 | 763 | ||
764 | if (column >= mtd->oobblock) { | 764 | if (column >= mtd->writesize) { |
765 | /* OOB area */ | 765 | /* OOB area */ |
766 | column -= mtd->oobblock; | 766 | column -= mtd->writesize; |
767 | readcmd = NAND_CMD_READOOB; | 767 | readcmd = NAND_CMD_READOOB; |
768 | } else if (column < 256) { | 768 | } else if (column < 256) { |
769 | /* First 256 bytes --> READ0 */ | 769 | /* First 256 bytes --> READ0 */ |
@@ -1093,8 +1093,8 @@ static int __init find_media_headers(struct mtd_info *mtd, u_char *buf, const ch | |||
1093 | size_t retlen; | 1093 | size_t retlen; |
1094 | 1094 | ||
1095 | for (offs = 0; offs < mtd->size; offs += mtd->erasesize) { | 1095 | for (offs = 0; offs < mtd->size; offs += mtd->erasesize) { |
1096 | ret = mtd->read(mtd, offs, mtd->oobblock, &retlen, buf); | 1096 | ret = mtd->read(mtd, offs, mtd->writesize, &retlen, buf); |
1097 | if (retlen != mtd->oobblock) | 1097 | if (retlen != mtd->writesize) |
1098 | continue; | 1098 | continue; |
1099 | if (ret) { | 1099 | if (ret) { |
1100 | printk(KERN_WARNING "ECC error scanning DOC at 0x%x\n", offs); | 1100 | printk(KERN_WARNING "ECC error scanning DOC at 0x%x\n", offs); |
@@ -1118,8 +1118,8 @@ static int __init find_media_headers(struct mtd_info *mtd, u_char *buf, const ch | |||
1118 | /* Only one mediaheader was found. We want buf to contain a | 1118 | /* Only one mediaheader was found. We want buf to contain a |
1119 | mediaheader on return, so we'll have to re-read the one we found. */ | 1119 | mediaheader on return, so we'll have to re-read the one we found. */ |
1120 | offs = doc->mh0_page << this->page_shift; | 1120 | offs = doc->mh0_page << this->page_shift; |
1121 | ret = mtd->read(mtd, offs, mtd->oobblock, &retlen, buf); | 1121 | ret = mtd->read(mtd, offs, mtd->writesize, &retlen, buf); |
1122 | if (retlen != mtd->oobblock) { | 1122 | if (retlen != mtd->writesize) { |
1123 | /* Insanity. Give up. */ | 1123 | /* Insanity. Give up. */ |
1124 | printk(KERN_ERR "Read DiskOnChip Media Header once, but can't reread it???\n"); | 1124 | printk(KERN_ERR "Read DiskOnChip Media Header once, but can't reread it???\n"); |
1125 | return 0; | 1125 | return 0; |
@@ -1139,7 +1139,7 @@ static inline int __init nftl_partscan(struct mtd_info *mtd, struct mtd_partitio | |||
1139 | unsigned blocks, maxblocks; | 1139 | unsigned blocks, maxblocks; |
1140 | int offs, numheaders; | 1140 | int offs, numheaders; |
1141 | 1141 | ||
1142 | buf = kmalloc(mtd->oobblock, GFP_KERNEL); | 1142 | buf = kmalloc(mtd->writesize, GFP_KERNEL); |
1143 | if (!buf) { | 1143 | if (!buf) { |
1144 | printk(KERN_ERR "DiskOnChip mediaheader kmalloc failed!\n"); | 1144 | printk(KERN_ERR "DiskOnChip mediaheader kmalloc failed!\n"); |
1145 | return 0; | 1145 | return 0; |
@@ -1247,7 +1247,7 @@ static inline int __init inftl_partscan(struct mtd_info *mtd, struct mtd_partiti | |||
1247 | if (inftl_bbt_write) | 1247 | if (inftl_bbt_write) |
1248 | end -= (INFTL_BBT_RESERVED_BLOCKS << this->phys_erase_shift); | 1248 | end -= (INFTL_BBT_RESERVED_BLOCKS << this->phys_erase_shift); |
1249 | 1249 | ||
1250 | buf = kmalloc(mtd->oobblock, GFP_KERNEL); | 1250 | buf = kmalloc(mtd->writesize, GFP_KERNEL); |
1251 | if (!buf) { | 1251 | if (!buf) { |
1252 | printk(KERN_ERR "DiskOnChip mediaheader kmalloc failed!\n"); | 1252 | printk(KERN_ERR "DiskOnChip mediaheader kmalloc failed!\n"); |
1253 | return 0; | 1253 | return 0; |