Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298079
b: refs/heads/master
c: 0091842
h: refs/heads/master
i:
  298077: 4c305c9
  298075: eff7582
  298071: 5082b9c
  298063: d36b6bb
  298047: 1093d32
v: v3
  • Loading branch information
Brian Norris authored and David Woodhouse committed Mar 26, 2012
1 parent 145ab62 commit 3c6eebb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 152b861622d55f7b17cb6069bd0b275fb559c29a
refs/heads/master: 009184296d957d864d6fa9ac2dd192d29e069878
11 changes: 11 additions & 0 deletions trunk/drivers/mtd/nand/nand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,17 @@ static int nand_default_block_markbad(struct mtd_info *mtd, loff_t ofs)
uint8_t buf[2] = { 0, 0 };
int block, ret, i = 0;

if (!(chip->bbt_options & NAND_BBT_USE_FLASH)) {
struct erase_info einfo;

/* Attempt erase before marking OOB */
memset(&einfo, 0, sizeof(einfo));
einfo.mtd = mtd;
einfo.addr = ofs;
einfo.len = 1 << chip->phys_erase_shift;
nand_erase_nand(mtd, &einfo, 0);
}

if (chip->bbt_options & NAND_BBT_SCANLASTPAGE)
ofs += mtd->erasesize - mtd->writesize;

Expand Down

0 comments on commit 3c6eebb

Please sign in to comment.