Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298081
b: refs/heads/master
c: 8544331
h: refs/heads/master
i:
  298079: 3c6eebb
v: v3
  • Loading branch information
Brian Norris authored and David Woodhouse committed Mar 26, 2012
1 parent d89064c commit 8d18b1c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cdbec0508699e3346052bf098c5c330a711a86a9
refs/heads/master: 85443319989bb91814504608a6e11d880e156828
12 changes: 8 additions & 4 deletions trunk/drivers/mtd/nand/nand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,13 +430,17 @@ static int nand_default_block_markbad(struct mtd_info *mtd, loff_t ofs)
/*
* Write to first two pages if necessary. If we write to more
* than one location, the first error encountered quits the
* procedure. We write two bytes per location, so we dont have
* to mess with 16 bit access.
* procedure.
*/
ops.len = ops.ooblen = 2;
ops.datbuf = NULL;
ops.oobbuf = buf;
ops.ooboffs = chip->badblockpos & ~0x01;
ops.ooboffs = chip->badblockpos;
if (chip->options & NAND_BUSWIDTH_16) {
ops.ooboffs &= ~0x01;
ops.len = ops.ooblen = 2;
} else {
ops.len = ops.ooblen = 1;
}
ops.mode = MTD_OPS_PLACE_OOB;
do {
ret = nand_do_write_oob(mtd, ofs, &ops);
Expand Down

0 comments on commit 8d18b1c

Please sign in to comment.