From f98fde2db4b3a6953c937e4fa8599da20e875b4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Mon, 3 Dec 2018 15:47:06 +0100 Subject: Revert "kernel: use add_mtd_partitions() helper when using OpenWrt parsers" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 7e88753ace0022bd56f77a7a647894f2936cf17b. Using subpartitions (hierarchical layout) resulted in calling MTD ops of parent partition instead of master device ops. That was expected and should work but testing revealed some bugs. Apparently the way MTD_ERASE_PARTIAL is implemented in the OpenWrt breaks something and using parent partition ops triggers using that code. On SmartRG SR400ac it was resulting in: [ 225.487519] jffs2: Erase at 0x01ac0000 failed immediately: errno -22 on the second boot (for some reason erasing was starting over) and it was breaking flash access in a long term. Signed-off-by: Rafał Miłecki --- .../linux/generic/pending-4.14/404-mtd-add-more-helper-functions.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target/linux/generic/pending-4.14/404-mtd-add-more-helper-functions.patch') diff --git a/target/linux/generic/pending-4.14/404-mtd-add-more-helper-functions.patch b/target/linux/generic/pending-4.14/404-mtd-add-more-helper-functions.patch index 663c9a300f..94c59df01d 100644 --- a/target/linux/generic/pending-4.14/404-mtd-add-more-helper-functions.patch +++ b/target/linux/generic/pending-4.14/404-mtd-add-more-helper-functions.patch @@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c -@@ -1227,6 +1227,24 @@ int mtd_is_partition(const struct mtd_in +@@ -1235,6 +1235,24 @@ int mtd_is_partition(const struct mtd_in } EXPORT_SYMBOL_GPL(mtd_is_partition); -- cgit v1.2.3