Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 68495
b: refs/heads/master
c: c0b8ba7
h: refs/heads/master
i:
  68493: 75c6323
  68491: 3eac36b
  68487: 34dad00
  68479: 10c9597
v: v3
  • Loading branch information
Artem Bityutskiy authored and David Woodhouse committed Jul 23, 2007
1 parent 225f6a7 commit 147af1c
Show file tree
Hide file tree
Showing 2 changed files with 5 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: 0bf9733d0d65ebb413d62204ad8e328e0a0b9407
refs/heads/master: c0b8ba7bfe7b4c1f11b3356b65520405b005bd33
4 changes: 4 additions & 0 deletions trunk/drivers/mtd/nand/nand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* if we have HW ecc support.
* The AG-AND chips have nice features for speed improvement,
* which are not supported yet. Read / program 4 pages in one go.
* BBT table is not serialized, has to be fixed
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
Expand Down Expand Up @@ -360,16 +361,19 @@ static int nand_default_block_markbad(struct mtd_info *mtd, loff_t ofs)
/* We write two bytes, so we dont have to mess with 16 bit
* access
*/
nand_get_device(chip, mtd, FL_WRITING);
ofs += mtd->oobsize;
chip->ops.len = chip->ops.ooblen = 2;
chip->ops.datbuf = NULL;
chip->ops.oobbuf = buf;
chip->ops.ooboffs = chip->badblockpos & ~0x01;

ret = nand_do_write_oob(mtd, ofs, &chip->ops);
nand_release_device(mtd);
}
if (!ret)
mtd->ecc_stats.badblocks++;

return ret;
}

Expand Down

0 comments on commit 147af1c

Please sign in to comment.