]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: rawnand: bbt: Skip bad blocks when searching for the BBT in NAND
authorStefan Riedmueller <s.riedmueller@phytec.de>
Thu, 25 Mar 2021 10:23:37 +0000 (11:23 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Sun, 28 Mar 2021 17:34:36 +0000 (19:34 +0200)
commit1b7dc5c3130a3816d10111b399c634265d882393
tree700e230b733a8f81243e32908122f4df415ac1d2
parentf03b51f3d5545c910172afdaa2c8ba942e5d8b6a
mtd: rawnand: bbt: Skip bad blocks when searching for the BBT in NAND

The blocks containing the bad block table can become bad as well. So
make sure to skip any blocks that are marked bad when searching for the
bad block table.

Otherwise in very rare cases where two BBT blocks wear out it might
happen that an obsolete BBT is used instead of a newer available
version.

Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210325102337.481172-1-s.riedmueller@phytec.de
drivers/mtd/nand/raw/nand_bbt.c