* [PATCH] Revert "mtd: rawnand: bbt: Skip bad blocks when searching for the BBT in NAND"
@ 2021-04-19 14:03 Fabio Estevam
2021-04-19 16:11 ` Miquel Raynal
0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2021-04-19 14:03 UTC (permalink / raw)
To: miquel.raynal; +Cc: s.riedmueller, linux-mtd, kernel, Fabio Estevam
This reverts commit bd9c9fe2ad04546940f4a9979d679e62cae6aa51.
Since commit bd9c9fe2ad04 ("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>
---
drivers/mtd/nand/raw/nand_bbt.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/mtd/nand/raw/nand_bbt.c b/drivers/mtd/nand/raw/nand_bbt.c
index 6e25a5ce5ba9..dced32a126d9 100644
--- a/drivers/mtd/nand/raw/nand_bbt.c
+++ b/drivers/mtd/nand/raw/nand_bbt.c
@@ -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;
@@ -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)) {
--
2.25.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Revert "mtd: rawnand: bbt: Skip bad blocks when searching for the BBT in NAND"
2021-04-19 14:03 [PATCH] Revert "mtd: rawnand: bbt: Skip bad blocks when searching for the BBT in NAND" Fabio Estevam
@ 2021-04-19 16:11 ` Miquel Raynal
0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2021-04-19 16:11 UTC (permalink / raw)
To: Fabio Estevam, miquel.raynal; +Cc: s.riedmueller, linux-mtd, kernel
On Mon, 2021-04-19 at 14:03:50 UTC, Fabio Estevam wrote:
> This reverts commit bd9c9fe2ad04546940f4a9979d679e62cae6aa51.
>
> Since commit bd9c9fe2ad04 ("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>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-19 16:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-19 14:03 [PATCH] Revert "mtd: rawnand: bbt: Skip bad blocks when searching for the BBT in NAND" Fabio Estevam
2021-04-19 16:11 ` Miquel Raynal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).