diff options
author | Koen Vandeputte <koen.vandeputte@ncentric.com> | 2018-05-23 16:44:09 +0200 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2018-05-24 08:58:17 +0200 |
commit | 467b07e00c5ead98848587b8e06db61f7b33d3a8 (patch) | |
tree | 6d9b1bf52932e5824299ecff4528759a0630f502 /target/linux/ipq806x/patches-4.14/0047-mtd-nand-Create-a-BBT-flag-to-access-bad-block-marke.patch | |
parent | 82cf3c7c6199d5da88ff6872f288ec7f97afe184 (diff) | |
download | upstream-467b07e00c5ead98848587b8e06db61f7b33d3a8.tar.gz upstream-467b07e00c5ead98848587b8e06db61f7b33d3a8.tar.bz2 upstream-467b07e00c5ead98848587b8e06db61f7b33d3a8.zip |
kernel: bump 4.14 to 4.14.43
Refreshed all patches
Compile-tested on: cns3xxx, imx6, x86_64
Runtime-tested on: cns3xxx, imx6, x86_64
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Michael Yartys <michael.yartys@protonmail.com>
Diffstat (limited to 'target/linux/ipq806x/patches-4.14/0047-mtd-nand-Create-a-BBT-flag-to-access-bad-block-marke.patch')
-rw-r--r-- | target/linux/ipq806x/patches-4.14/0047-mtd-nand-Create-a-BBT-flag-to-access-bad-block-marke.patch | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/target/linux/ipq806x/patches-4.14/0047-mtd-nand-Create-a-BBT-flag-to-access-bad-block-marke.patch b/target/linux/ipq806x/patches-4.14/0047-mtd-nand-Create-a-BBT-flag-to-access-bad-block-marke.patch index 4c271d71fa..fe98980766 100644 --- a/target/linux/ipq806x/patches-4.14/0047-mtd-nand-Create-a-BBT-flag-to-access-bad-block-marke.patch +++ b/target/linux/ipq806x/patches-4.14/0047-mtd-nand-Create-a-BBT-flag-to-access-bad-block-marke.patch @@ -28,38 +28,38 @@ Signed-off-by: Archit Taneja <architt@codeaurora.org> --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -481,7 +481,11 @@ static int nand_default_block_markbad(st - } else { - ops.len = ops.ooblen = 1; - } + } else { + ops.len = ops.ooblen = 1; + } - ops.mode = MTD_OPS_PLACE_OOB; + + if (unlikely(chip->bbt_options & NAND_BBT_ACCESS_BBM_RAW)) + ops.mode = MTD_OPS_RAW; + else + ops.mode = MTD_OPS_PLACE_OOB; - - /* Write to first/last page(s) if necessary */ - if (chip->bbt_options & NAND_BBT_SCANLASTPAGE) + + /* Write to first/last page(s) if necessary */ + if (chip->bbt_options & NAND_BBT_SCANLASTPAGE) --- a/drivers/mtd/nand/nand_bbt.c +++ b/drivers/mtd/nand/nand_bbt.c @@ -420,7 +420,11 @@ static int scan_block_fast(struct mtd_in - ops.oobbuf = buf; - ops.ooboffs = 0; - ops.datbuf = NULL; + ops.oobbuf = buf; + ops.ooboffs = 0; + ops.datbuf = NULL; - ops.mode = MTD_OPS_PLACE_OOB; + + if (unlikely(bd->options & NAND_BBT_ACCESS_BBM_RAW)) + ops.mode = MTD_OPS_RAW; + else + ops.mode = MTD_OPS_PLACE_OOB; - - for (j = 0; j < numpages; j++) { - /* + + for (j = 0; j < numpages; j++) { + /* --- a/include/linux/mtd/bbm.h +++ b/include/linux/mtd/bbm.h @@ -116,6 +116,12 @@ struct nand_bbt_descr { #define NAND_BBT_NO_OOB_BBM 0x00080000 - + /* + * Force MTD_OPS_RAW mode when trying to access bad block markes from OOB. To + * be used by controllers which can access BBM only when ECC is disabled, i.e, |