armbian_build/patch/kernel/archive/sunxi-5.17/patches.armbian/drv-mtd-nand-disable-badblock-check-for-migration.patch
The-going 0f7200c793
Sunxi 5.17 (#3613)
* The initial state of a series of patches for sunxi-5.17

tag orange-pi-5.17-20220323-1423

* DEBUG for sunxi-5.17

* Add Armbian patches to 5.17

* Fix duplicate nodes for sun50i-h5-orangepi-pc2

* Fix reg_ahci_5v to status okay for bananapro board

* Remove an unused patch for an unsupported sun50i-h6-tanix-tx6 board
2022-03-31 20:32:04 +03:00

50 lines
1.3 KiB
Diff

From 8a7801275c05cec3a0ea29e1952059deedf1761c Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Wed, 9 Feb 2022 16:50:43 +0300
Subject: [PATCH] drv:mtd:nand: disable badblock check for migration
---
drivers/mtd/nand/raw/nand_base.c | 19 ++-----------------
1 file changed, 2 insertions(+), 17 deletions(-)
diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
index d5a2110eb..ed440edda 100644
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -623,10 +623,7 @@ static int nand_block_isreserved(struct mtd_info *mtd, loff_t ofs)
static int nand_block_checkbad(struct nand_chip *chip, loff_t ofs, int allowbbt)
{
/* Return info from the table */
- if (chip->bbt)
- return nand_isbad_bbt(chip, ofs, allowbbt);
-
- return nand_isbad_bbm(chip, ofs);
+ return 0;
}
/**
@@ -4583,19 +4580,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;
}
/**
--
2.34.1