Skip to content

Commit a881537

Browse files
fabioestevammiquelraynal
authored andcommitted
Revert "mtd: rawnand: bbt: Skip bad blocks when searching for the BBT 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
1 parent 1df1fc8 commit a881537

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

drivers/mtd/nand/raw/nand_bbt.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,6 @@ static int search_bbt(struct nand_chip *this, uint8_t *buf,
525525
{
526526
u64 targetsize = nanddev_target_size(&this->base);
527527
struct mtd_info *mtd = nand_to_mtd(this);
528-
struct nand_bbt_descr *bd = this->badblock_pattern;
529528
int i, chips;
530529
int startblock, block, dir;
531530
int scanlen = mtd->writesize + mtd->oobsize;
@@ -561,10 +560,6 @@ static int search_bbt(struct nand_chip *this, uint8_t *buf,
561560
int actblock = startblock + dir * block;
562561
loff_t offs = (loff_t)actblock << this->bbt_erase_shift;
563562

564-
/* Check if block is marked bad */
565-
if (scan_block_fast(this, bd, offs, buf))
566-
continue;
567-
568563
/* Read first page */
569564
scan_read(this, buf, offs, mtd->writesize, td);
570565
if (!check_pattern(buf, scanlen, mtd->writesize, td)) {

0 commit comments

Comments
 (0)