Revert "kernel: use add_mtd_partitions() helper when using OpenWrt parsers"
authorRafał Miłecki <rafal@milecki.pl>
Mon, 3 Dec 2018 14:47:06 +0000 (15:47 +0100)
committerRafał Miłecki <rafal@milecki.pl>
Mon, 3 Dec 2018 14:50:26 +0000 (15:50 +0100)
commitf98fde2db4b3a6953c937e4fa8599da20e875b4b
treeef5f7a9cac1d8cc16dec6b3b14d9da03f03a424b
parente9a9b7d1ed76c88e097d5bc4dabf38735312558b
Revert "kernel: use add_mtd_partitions() helper when using OpenWrt parsers"

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 <rafal@milecki.pl>
target/linux/generic/pending-4.14/401-mtd-add-support-for-different-partition-parser-types.patch
target/linux/generic/pending-4.14/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
target/linux/generic/pending-4.14/404-mtd-add-more-helper-functions.patch