From 147af1cd01e2731ab7974f96a0af1f0eaf46e4d8 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Mon, 23 Jul 2007 16:06:50 +0300 Subject: [PATCH] --- yaml --- r: 68495 b: refs/heads/master c: c0b8ba7bfe7b4c1f11b3356b65520405b005bd33 h: refs/heads/master i: 68493: 75c63235fd79343a5d9a393857086ab5e47e5bf7 68491: 3eac36b5a689dba3b525213adfdedbd7881d2e2c 68487: 34dad00749f53ec6ffd9aa5c05f281e6ce085ea3 68479: 10c9597cf333e6da7b992d8af13909b8127f604c v: v3 --- [refs] | 2 +- trunk/drivers/mtd/nand/nand_base.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 1ba7f6d6d987..819dcf6164f4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0bf9733d0d65ebb413d62204ad8e328e0a0b9407 +refs/heads/master: c0b8ba7bfe7b4c1f11b3356b65520405b005bd33 diff --git a/trunk/drivers/mtd/nand/nand_base.c b/trunk/drivers/mtd/nand/nand_base.c index 25673eacdd88..24ac6778b1a8 100644 --- a/trunk/drivers/mtd/nand/nand_base.c +++ b/trunk/drivers/mtd/nand/nand_base.c @@ -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 @@ -360,6 +361,7 @@ 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; @@ -367,9 +369,11 @@ static int nand_default_block_markbad(struct mtd_info *mtd, loff_t ofs) 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; }