aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/patches-4.9/0103-nand_fixes.patch
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2017-02-16 09:53:03 +0100
committerJohn Crispin <john@phrozen.org>2017-02-16 09:53:30 +0100
commit53f5d59fa17049d94a3992d1067ded1fa90f61f8 (patch)
tree5596104b74bfe2a96f1abdb2303314a40c74322b /target/linux/mediatek/patches-4.9/0103-nand_fixes.patch
parentf885edef5a3bfcddcfe85732ee65c1d475c4a8f6 (diff)
downloadupstream-53f5d59fa17049d94a3992d1067ded1fa90f61f8.tar.gz
upstream-53f5d59fa17049d94a3992d1067ded1fa90f61f8.tar.bz2
upstream-53f5d59fa17049d94a3992d1067ded1fa90f61f8.zip
mediatek: bump to v4.9
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/mediatek/patches-4.9/0103-nand_fixes.patch')
-rw-r--r--target/linux/mediatek/patches-4.9/0103-nand_fixes.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/target/linux/mediatek/patches-4.9/0103-nand_fixes.patch b/target/linux/mediatek/patches-4.9/0103-nand_fixes.patch
new file mode 100644
index 0000000000..92f34c5fc2
--- /dev/null
+++ b/target/linux/mediatek/patches-4.9/0103-nand_fixes.patch
@@ -0,0 +1,22 @@
+--- a/drivers/mtd/nand/mtk_nand.c
++++ b/drivers/mtd/nand/mtk_nand.c
+@@ -1017,8 +1017,8 @@ static int mtk_nfc_ooblayout_free(struct
+ if (section >= eccsteps)
+ return -ERANGE;
+
+- oob_region->length = fdm->reg_size - fdm->ecc_size;
+- oob_region->offset = section * fdm->reg_size + fdm->ecc_size;
++ oob_region->length = fdm->reg_size - 1;
++ oob_region->offset = section * fdm->reg_size + 1;
+
+ return 0;
+ }
+@@ -1058,7 +1058,7 @@ static void mtk_nfc_set_fdm(struct mtk_n
+ fdm->reg_size = NFI_FDM_MAX_SIZE;
+
+ /* bad block mark storage */
+- fdm->ecc_size = 1;
++ fdm->ecc_size = fdm->reg_size;
+ }
+
+ static void mtk_nfc_set_bad_mark_ctl(struct mtk_nfc_bad_mark_ctl *bm_ctl,