[OpenWrt-Devel] [PATCH] kernel: drop downstream support for mtd unaligned writes
Tomasz Maciej Nowak
tomek_n at o2.pl
Thu Mar 12 12:32:35 EDT 2020
Hi Rafał.
W dniu 09.03.2020 o 12:43, Rafał Miłecki pisze:
> From: Rafał Miłecki <rafal at milecki.pl>
>
> This code was developed 10+ years ago to support few specific devices.
> It doesn't match current mtd architecture and is probably/hopefully not
> needed anymore.
Unfortunately it is needed for currently supported devices if we want to
provide sysupgrade images. The popular example would be Ubiquiti RouterStation
(Pro). It has "FIS directory" partition and "RedBoot config" on one erase
block. Also greping the tree reveals that other target use RedBoot, ath25,
bcm63xx and gemini. If that issue affects them? I don't know, since RedBoot can
be compiled with both of these partitions on one erase block or separate.
>
> Problems of this code with recent kernels:
> 1. It assumes that parent mtd boundaries always allow accessing whole
> block data. It was true only for master MTD device and non-tree
> partitions.
> 2. MTD_ERASE_PARTIAL affects all partition blocks - even those fully
> accessible in a standard way. This code was probably designed for
> tiny partitions only.
> 3. It seems broken with subpartitions. Unintended usage of this code
> triggered by run_parsers_by_type() rewrite caused in erasing content
> of some unrelated partitions. It may be caused by incorrect offsets
> calculation.
This is probably the cause of FS#2428[1] bug. Because of it I disabled
sysupgrade images[2]. I'm fine with dropping these patches, since now they
cause only problems. Would be nice if someone could write newer/better
implementation of that feature, gladly will test any implementation.
1. https://bugs.openwrt.org/index.php?do=details&task_id=2428
2. https://git.openwrt.org/cc5256a8bfa0bd5fff5ff42e6b2febea011e1c59
--
TMN
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list