armbian_build/patch/kernel/archive/sunxi-5.13/nand-disable-badblock-check-for-migration.patch
Igor Pečovnik e21e82b546
Upgrading sunxi, sunxi64, imx6, jetson-nano, mvebu and mvebu64 EDGE to 5.13 (#3042)
* Upgrading sunxi and sunxi64 EDGE to 5.13

Both variants tested for building

* Bump imx6 to 5.13.y

Tested

* Bump Jetson nano kernel to 5.13.y

* Move mvebu and mvebu64 edge to 5.13.y
2021-07-21 00:46:51 +02:00

38 lines
913 B
Diff

diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
index 71050a0..5f36704 100644
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -460,10 +460,7 @@ static int nand_block_checkbad(struct mtd_info *mtd, loff_t ofs, int allowbbt)
struct nand_chip *chip = mtd_to_nand(mtd);
/* Return info from the table */
- if (chip->bbt)
- return nand_isbad_bbt(chip, ofs, allowbbt);
-
- return nand_isbad_bbm(chip, ofs);
+ return 0;
}
/**
@@ -4283,19 +4283,7 @@ static int nand_block_isbad(struct mtd_info *mtd, loff_t offs)
int chipnr = (int)(offs >> chip->chip_shift);
int ret;
- /* Select the NAND device */
- ret = nand_get_device(chip);
- if (ret)
- return ret;
-
- nand_select_target(chip, chipnr);
-
- ret = nand_block_checkbad(chip, offs, 0);
-
- nand_deselect_target(chip);
- nand_release_device(chip);
-
- return ret;
+ return 0;
}
/**