Skip to content

Commit

Permalink
Revert "mtd: rawnand: bbt: Skip bad blocks when searching for the BBT…
Browse files Browse the repository at this point in the history
… in NAND"

This reverts commit bd9c9fe.

Since commit bd9c9fe ("mtd: rawnand: bbt: Skip bad blocks when
searching for  the BBT in NAND") the bad block table cannot be found
on a imx27-phytec-phycard-s-rdk board:

Bad block table not found for chip 0
Bad block table not found for chip 0

Revert it for now, until a better solution can be found.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210419140350.809853-1-festevam@gmail.com
  • Loading branch information
Fabio Estevam authored and Miquel Raynal committed Apr 19, 2021
1 parent 1df1fc8 commit a881537
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/mtd/nand/raw/nand_bbt.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,6 @@ static int search_bbt(struct nand_chip *this, uint8_t *buf,
{
u64 targetsize = nanddev_target_size(&this->base);
struct mtd_info *mtd = nand_to_mtd(this);
struct nand_bbt_descr *bd = this->badblock_pattern;
int i, chips;
int startblock, block, dir;
int scanlen = mtd->writesize + mtd->oobsize;
Expand Down Expand Up @@ -561,10 +560,6 @@ static int search_bbt(struct nand_chip *this, uint8_t *buf,
int actblock = startblock + dir * block;
loff_t offs = (loff_t)actblock << this->bbt_erase_shift;

/* Check if block is marked bad */
if (scan_block_fast(this, bd, offs, buf))
continue;

/* Read first page */
scan_read(this, buf, offs, mtd->writesize, td);
if (!check_pattern(buf, scanlen, mtd->writesize, td)) {
Expand Down

0 comments on commit a881537

Please sign in to comment.