diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2018-07-10 14:02:00 +0200 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2018-07-10 14:11:15 +0200 |
commit | 5a40fad22a398f86d4900d391e00948df09fcde0 (patch) | |
tree | d2d00c3ce4517304f30b172cfeb02e538334e22c | |
parent | b84a07b3803bd39d0a1eb1b040718a023b8f7971 (diff) | |
download | upstream-5a40fad22a398f86d4900d391e00948df09fcde0.tar.gz upstream-5a40fad22a398f86d4900d391e00948df09fcde0.tar.bz2 upstream-5a40fad22a398f86d4900d391e00948df09fcde0.zip |
kernel: bcm47xxpart: fix getting user-space data partition name
Partition name is picked by a parser_trx_data_part_name(). It has to
get correct partition offset (taking care of bad blocks) to work
properly.
This fixes UBI support for devices that have kernel flashed on partition
with a bad block.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 7ddba08d873a0ce6d2d32b8f6a1bea550107ca44)
2 files changed, 4 insertions, 2 deletions
diff --git a/target/linux/generic/pending-4.14/431-mtd-bcm47xxpart-check-for-bad-blocks-when-calculatin.patch b/target/linux/generic/pending-4.14/431-mtd-bcm47xxpart-check-for-bad-blocks-when-calculatin.patch index 9299e88671..d54c284c34 100644 --- a/target/linux/generic/pending-4.14/431-mtd-bcm47xxpart-check-for-bad-blocks-when-calculatin.patch +++ b/target/linux/generic/pending-4.14/431-mtd-bcm47xxpart-check-for-bad-blocks-when-calculatin.patch @@ -59,9 +59,10 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com> if (trx.offset[i]) { part = &parts[curr_part++]; - part->name = parser_trx_data_part_name(mtd, trx.offset[i]); +- part->name = parser_trx_data_part_name(mtd, trx.offset[i]); - part->offset = trx.offset[i]; + part->offset = parser_trx_real_offset(mtd, trx.offset[i]); ++ part->name = parser_trx_data_part_name(mtd, part->offset); i++; } diff --git a/target/linux/generic/pending-4.9/431-mtd-bcm47xxpart-check-for-bad-blocks-when-calculatin.patch b/target/linux/generic/pending-4.9/431-mtd-bcm47xxpart-check-for-bad-blocks-when-calculatin.patch index 9299e88671..d54c284c34 100644 --- a/target/linux/generic/pending-4.9/431-mtd-bcm47xxpart-check-for-bad-blocks-when-calculatin.patch +++ b/target/linux/generic/pending-4.9/431-mtd-bcm47xxpart-check-for-bad-blocks-when-calculatin.patch @@ -59,9 +59,10 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com> if (trx.offset[i]) { part = &parts[curr_part++]; - part->name = parser_trx_data_part_name(mtd, trx.offset[i]); +- part->name = parser_trx_data_part_name(mtd, trx.offset[i]); - part->offset = trx.offset[i]; + part->offset = parser_trx_real_offset(mtd, trx.offset[i]); ++ part->name = parser_trx_data_part_name(mtd, part->offset); i++; } |