aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/pending-4.9
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2018-05-12 23:12:32 +0200
committerRafał Miłecki <rafal@milecki.pl>2018-05-12 23:14:07 +0200
commit070693477a26a40fdf5de2316bc72073dc9930c1 (patch)
treedb8071cc5729875696f356c1da9b18cfe63cda71 /target/linux/generic/pending-4.9
parenta3096b4b33dcc5fcc07b229346ef337aa5962019 (diff)
downloadupstream-070693477a26a40fdf5de2316bc72073dc9930c1.tar.gz
upstream-070693477a26a40fdf5de2316bc72073dc9930c1.tar.bz2
upstream-070693477a26a40fdf5de2316bc72073dc9930c1.zip
kernel: backport mtd patch for minor partitioning cleanup
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/generic/pending-4.9')
-rw-r--r--target/linux/generic/pending-4.9/161-mtd-part-add-generic-parsing-of-linux-part-probe.patch8
-rw-r--r--target/linux/generic/pending-4.9/400-mtd-add-rootfs-split-support.patch6
-rw-r--r--target/linux/generic/pending-4.9/401-mtd-add-support-for-different-partition-parser-types.patch2
-rw-r--r--target/linux/generic/pending-4.9/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch6
-rw-r--r--target/linux/generic/pending-4.9/404-mtd-add-more-helper-functions.patch4
-rw-r--r--target/linux/generic/pending-4.9/411-mtd-partial_eraseblock_write.patch2
6 files changed, 14 insertions, 14 deletions
diff --git a/target/linux/generic/pending-4.9/161-mtd-part-add-generic-parsing-of-linux-part-probe.patch b/target/linux/generic/pending-4.9/161-mtd-part-add-generic-parsing-of-linux-part-probe.patch
index 5f0fa3a418..e2a0e4887d 100644
--- a/target/linux/generic/pending-4.9/161-mtd-part-add-generic-parsing-of-linux-part-probe.patch
+++ b/target/linux/generic/pending-4.9/161-mtd-part-add-generic-parsing-of-linux-part-probe.patch
@@ -114,7 +114,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
#include <linux/err.h>
#include <linux/of.h>
-@@ -856,6 +857,42 @@ void deregister_mtd_parser(struct mtd_pa
+@@ -843,6 +844,42 @@ void deregister_mtd_parser(struct mtd_pa
EXPORT_SYMBOL_GPL(deregister_mtd_parser);
/*
@@ -157,8 +157,8 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* Do not forget to update 'parse_mtd_partitions()' kerneldoc comment if you
* are changing this array!
*/
-@@ -999,6 +1036,13 @@ int parse_mtd_partitions(struct mtd_info
- {
+@@ -983,6 +1020,13 @@ int parse_mtd_partitions(struct mtd_info
+ struct mtd_partitions pparts = { };
struct mtd_part_parser *parser;
int ret, err = 0;
+ const char *const *types_of = NULL;
@@ -171,7 +171,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
if (!types)
types = default_mtd_part_types;
-@@ -1035,6 +1079,7 @@ int parse_mtd_partitions(struct mtd_info
+@@ -1023,6 +1067,7 @@ int parse_mtd_partitions(struct mtd_info
if (ret < 0 && !err)
err = ret;
}
diff --git a/target/linux/generic/pending-4.9/400-mtd-add-rootfs-split-support.patch b/target/linux/generic/pending-4.9/400-mtd-add-rootfs-split-support.patch
index ef7a6df3ea..10be7a16ab 100644
--- a/target/linux/generic/pending-4.9/400-mtd-add-rootfs-split-support.patch
+++ b/target/linux/generic/pending-4.9/400-mtd-add-rootfs-split-support.patch
@@ -60,7 +60,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/*
* Given a pointer to the MTD object in the mtd_part structure, we can retrieve
* the pointer to that structure.
-@@ -679,6 +683,7 @@ int mtd_add_partition(struct mtd_info *p
+@@ -666,6 +670,7 @@ int mtd_add_partition(struct mtd_info *p
mutex_unlock(&mtd_partitions_mutex);
add_mtd_device(&new->mtd);
@@ -68,7 +68,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
mtd_add_partition_attrs(new);
-@@ -757,6 +762,35 @@ int mtd_del_partition(struct mtd_info *m
+@@ -744,6 +749,35 @@ int mtd_del_partition(struct mtd_info *m
}
EXPORT_SYMBOL_GPL(mtd_del_partition);
@@ -104,7 +104,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/*
* This function, given a master MTD object and a partition table, creates
* and registers slave MTD objects which are bound to the master according to
-@@ -788,6 +822,7 @@ int add_mtd_partitions(struct mtd_info *
+@@ -775,6 +809,7 @@ int add_mtd_partitions(struct mtd_info *
mutex_unlock(&mtd_partitions_mutex);
add_mtd_device(&slave->mtd);
diff --git a/target/linux/generic/pending-4.9/401-mtd-add-support-for-different-partition-parser-types.patch b/target/linux/generic/pending-4.9/401-mtd-add-support-for-different-partition-parser-types.patch
index 54cfcb0c36..63affd7eed 100644
--- a/target/linux/generic/pending-4.9/401-mtd-add-support-for-different-partition-parser-types.patch
+++ b/target/linux/generic/pending-4.9/401-mtd-add-support-for-different-partition-parser-types.patch
@@ -9,7 +9,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
-@@ -1134,6 +1134,62 @@ void mtd_part_parser_cleanup(struct mtd_
+@@ -1122,6 +1122,62 @@ void mtd_part_parser_cleanup(struct mtd_
}
}
diff --git a/target/linux/generic/pending-4.9/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch b/target/linux/generic/pending-4.9/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
index 9b406d4688..10d8551482 100644
--- a/target/linux/generic/pending-4.9/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
+++ b/target/linux/generic/pending-4.9/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
@@ -10,7 +10,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
-@@ -762,6 +762,36 @@ int mtd_del_partition(struct mtd_info *m
+@@ -749,6 +749,36 @@ int mtd_del_partition(struct mtd_info *m
}
EXPORT_SYMBOL_GPL(mtd_del_partition);
@@ -47,7 +47,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
#ifdef CONFIG_MTD_SPLIT_FIRMWARE_NAME
#define SPLIT_FIRMWARE_NAME CONFIG_MTD_SPLIT_FIRMWARE_NAME
#else
-@@ -770,6 +800,7 @@ EXPORT_SYMBOL_GPL(mtd_del_partition);
+@@ -757,6 +787,7 @@ EXPORT_SYMBOL_GPL(mtd_del_partition);
static void split_firmware(struct mtd_info *master, struct mtd_part *part)
{
@@ -55,7 +55,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
}
void __weak arch_split_mtd_part(struct mtd_info *master, const char *name,
-@@ -784,6 +815,12 @@ static void mtd_partition_split(struct m
+@@ -771,6 +802,12 @@ static void mtd_partition_split(struct m
if (rootfs_found)
return;
diff --git a/target/linux/generic/pending-4.9/404-mtd-add-more-helper-functions.patch b/target/linux/generic/pending-4.9/404-mtd-add-more-helper-functions.patch
index a08f46c317..076ec314b2 100644
--- a/target/linux/generic/pending-4.9/404-mtd-add-more-helper-functions.patch
+++ b/target/linux/generic/pending-4.9/404-mtd-add-more-helper-functions.patch
@@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
-@@ -792,6 +792,17 @@ run_parsers_by_type(struct mtd_part *sla
+@@ -779,6 +779,17 @@ run_parsers_by_type(struct mtd_part *sla
return nr_parts;
}
@@ -29,7 +29,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
#ifdef CONFIG_MTD_SPLIT_FIRMWARE_NAME
#define SPLIT_FIRMWARE_NAME CONFIG_MTD_SPLIT_FIRMWARE_NAME
#else
-@@ -1244,6 +1255,24 @@ int mtd_is_partition(const struct mtd_in
+@@ -1232,6 +1243,24 @@ int mtd_is_partition(const struct mtd_in
}
EXPORT_SYMBOL_GPL(mtd_is_partition);
diff --git a/target/linux/generic/pending-4.9/411-mtd-partial_eraseblock_write.patch b/target/linux/generic/pending-4.9/411-mtd-partial_eraseblock_write.patch
index 9a585214ed..e925983b30 100644
--- a/target/linux/generic/pending-4.9/411-mtd-partial_eraseblock_write.patch
+++ b/target/linux/generic/pending-4.9/411-mtd-partial_eraseblock_write.patch
@@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (instr->fail_addr != MTD_FAIL_ADDR_UNKNOWN)
instr->fail_addr -= part->offset;
-@@ -591,19 +660,22 @@ static struct mtd_part *allocate_partiti
+@@ -578,19 +647,22 @@ static struct mtd_part *allocate_partiti
remainder = do_div(tmp, wr_alignment);
if ((slave->mtd.flags & MTD_WRITEABLE) && remainder) {
/* Doesn't start on a boundary of major erase size */