diff options
Diffstat (limited to 'drivers/nand')
-rw-r--r-- | drivers/nand/nand_base.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/nand/nand_base.c b/drivers/nand/nand_base.c index b2cd62e..d91d90b 100644 --- a/drivers/nand/nand_base.c +++ b/drivers/nand/nand_base.c @@ -1724,6 +1724,8 @@ static int nand_write_ecc (struct mtd_info *mtd, loff_t to, size_t len, numpages = min (totalpages, ppblock); page &= this->pagemask; startpage = page; + oob = 0; + this->oobdirty = 1; oobbuf = nand_prepare_oobbuf (mtd, eccbuf, oobsel, autoplace, numpages); /* Check, if we cross a chip boundary */ @@ -2148,13 +2150,14 @@ int nand_erase_nand (struct mtd_info *mtd, struct erase_info *instr, int allowbb instr->state = MTD_ERASING; while (len) { +#ifndef NAND_ALLOW_ERASE_ALL /* Check if we have a bad block, we do not erase bad blocks ! */ if (nand_block_checkbad(mtd, ((loff_t) page) << this->page_shift, 0, allowbbt)) { printk (KERN_WARNING "nand_erase: attempt to erase a bad block at page 0x%08x\n", page); instr->state = MTD_ERASE_FAILED; goto erase_exit; } - +#endif /* Invalidate the page cache, if we erase the block which contains the current cached page */ if (page <= this->pagebuf && this->pagebuf < (page + pages_per_block)) |