From 1199a91095269969ba5256702359fba97c6ada08 Mon Sep 17 00:00:00 2001 From: Stijn Segers Date: Tue, 5 Jun 2018 23:29:31 +0200 Subject: kernel: bump 4.14 to 4.14.48 for 18.06 Refreshed patches. The following patches were upstreamed and have been deleted: * target/linux/lantiq/patches-4.14/0025-MIPS-lantiq-gphy-Remove-reboot-remove-reset-asserts.patch * target/linux/generic/pending-4.14/101-clocksource-mips-gic-timer-fix-clocksource-counter-w.patch * target/linux/generic/pending-4.14/103-MIPS-c-r4k-fix-data-corruption-related-to-cache-coherence.patch * target/linux/generic/pending-4.14/181-net-usb-add-lte-modem-wistron-neweb-d18q1.patch Compile-tested: ramips/mt7621, x86/64 Run-tested: ramips/mt7621 Signed-off-by: Stijn Segers --- ...eate-a-BBT-flag-to-access-bad-block-marke.patch | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'target/linux/ipq806x/patches-4.14/0047-mtd-nand-Create-a-BBT-flag-to-access-bad-block-marke.patch') 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 --- 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, -- cgit v1.2.3