[RFC] write bad block marker even with BBT
Artem Bityutskiy
dedekind1 at gmail.com
Mon Oct 25 04:05:45 EDT 2010
> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> index ddffe76..71052d0 100644
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -409,7 +409,10 @@ static int nand_default_block_markbad(struct mtd_info *mtd, loff_t ofs)
> /* Do we have a flash based bad block table ? */
> if (chip->options & NAND_USE_FLASH_BBT)
> ret = nand_update_bbt(mtd, ofs);
> - else {
> + /* put also the bad block marker in case we loose BBT or
> + the bootloader doesn't support reading it
> + */
Nitpick: please, use kernel commenting style:
/*
* Multi-line
* comment
*/
> + {
> nand_get_device(chip, mtd, FL_WRITING);
I think this makes sense, but this may break some setups, so this should
be yet another chip->option.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
More information about the linux-mtd
mailing list