/branches/18.06.1/target/linux/generic/pending-4.14/161-mtd-part-add-generic-parsing-of-linux-part-probe.patch |
@@ -6,12 +6,6 @@ |
providing a reference to their device tree node in struct |
mtd_part_parser_data. |
|
THIS METHOD HAS BEEN DEPRECATED |
|
Linux supports "compatible" property in the "partitions" subnode now. It |
should be used to specify partitions format (and trigger proper parser |
usage) if needed. |
|
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> |
--- |
Documentation/devicetree/bindings/mtd/nand.txt | 16 +++++++++ |
@@ -110,13 +104,10 @@ |
#include <linux/err.h> |
#include <linux/of.h> |
|
@@ -844,6 +845,37 @@ void deregister_mtd_parser(struct mtd_pa |
} |
@@ -835,6 +836,32 @@ void deregister_mtd_parser(struct mtd_pa |
EXPORT_SYMBOL_GPL(deregister_mtd_parser); |
|
+#include <linux/version.h> |
+ |
+/* |
/* |
+ * Parses the linux,part-probe device tree property. |
+ * When a non null value is returned it has to be freed with kfree() by |
+ * the caller. |
@@ -139,16 +130,14 @@ |
+ if (count < 0) |
+ return NULL; |
+ |
+ pr_warn("Support for the generic \"linux,part-probe\" has been deprecated and will be removed soon"); |
+ BUILD_BUG_ON(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)); |
+ |
+ return res; |
+} |
+ |
/* |
+/* |
* Do not forget to update 'parse_mtd_partitions()' kerneldoc comment if you |
* are changing this array! |
@@ -993,6 +1025,13 @@ int parse_mtd_partitions(struct mtd_info |
*/ |
@@ -983,6 +1010,13 @@ int parse_mtd_partitions(struct mtd_info |
struct mtd_partitions pparts = { }; |
struct mtd_part_parser *parser; |
int ret, err = 0; |
@@ -162,7 +151,7 @@ |
|
if (!types) |
types = mtd_is_partition(master) ? default_subpartition_types : |
@@ -1034,6 +1073,7 @@ int parse_mtd_partitions(struct mtd_info |
@@ -1024,6 +1058,7 @@ int parse_mtd_partitions(struct mtd_info |
if (ret < 0 && !err) |
err = ret; |
} |
/branches/18.06.1/target/linux/generic/pending-4.14/180-net-phy-at803x-add-support-for-AT8032.patch |
@@ -8,7 +8,7 @@ |
|
--- a/drivers/net/phy/at803x.c |
+++ b/drivers/net/phy/at803x.c |
@@ -62,8 +62,10 @@ |
@@ -62,6 +62,7 @@ |
|
#define ATH8030_PHY_ID 0x004dd076 |
#define ATH8031_PHY_ID 0x004dd074 |
@@ -15,11 +15,8 @@ |
+#define ATH8032_PHY_ID 0x004dd023 |
#define ATH8035_PHY_ID 0x004dd072 |
#define AT803X_PHY_ID_MASK 0xffffffef |
+#define AT8032_PHY_ID_MASK 0xffffffff |
|
MODULE_DESCRIPTION("Atheros 803x PHY driver"); |
MODULE_AUTHOR("Matus Ujhelyi"); |
@@ -256,7 +258,8 @@ static int at803x_probe(struct phy_devic |
@@ -256,7 +257,8 @@ static int at803x_probe(struct phy_devic |
if (!priv) |
return -ENOMEM; |
|
@@ -29,7 +26,7 @@ |
goto does_not_require_reset_workaround; |
|
gpiod_reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); |
@@ -332,7 +335,7 @@ static void at803x_link_change_notify(st |
@@ -332,7 +334,7 @@ static void at803x_link_change_notify(st |
struct at803x_priv *priv = phydev->priv; |
|
/* |
@@ -38,7 +35,7 @@ |
* signalled. This is necessary to circumvent a hardware bug that |
* occurs when the cable is unplugged while TX packets are pending |
* in the FIFO. In such cases, the FIFO enters an error mode it |
@@ -444,6 +447,24 @@ static struct phy_driver at803x_driver[] |
@@ -444,6 +446,24 @@ static struct phy_driver at803x_driver[] |
.aneg_done = at803x_aneg_done, |
.ack_interrupt = &at803x_ack_interrupt, |
.config_intr = &at803x_config_intr, |
@@ -46,7 +43,7 @@ |
+ /* ATHEROS 8032 */ |
+ .phy_id = ATH8032_PHY_ID, |
+ .name = "Atheros 8032 ethernet", |
+ .phy_id_mask = AT8032_PHY_ID_MASK, |
+ .phy_id_mask = 0xffffffef, |
+ .probe = at803x_probe, |
+ .config_init = at803x_config_init, |
+ .link_change_notify = at803x_link_change_notify, |
@@ -63,11 +60,11 @@ |
} }; |
|
module_phy_driver(at803x_driver); |
@@ -451,6 +472,7 @@ module_phy_driver(at803x_driver); |
@@ -451,6 +471,7 @@ module_phy_driver(at803x_driver); |
static struct mdio_device_id __maybe_unused atheros_tbl[] = { |
{ ATH8030_PHY_ID, AT803X_PHY_ID_MASK }, |
{ ATH8031_PHY_ID, AT803X_PHY_ID_MASK }, |
+ { ATH8032_PHY_ID, AT8032_PHY_ID_MASK }, |
+ { ATH8032_PHY_ID, AT803X_PHY_ID_MASK }, |
{ ATH8035_PHY_ID, AT803X_PHY_ID_MASK }, |
{ } |
}; |
/branches/18.06.1/target/linux/generic/pending-4.14/203-kallsyms_uncompressed.patch |
@@ -65,7 +65,7 @@ |
static int absolute_percpu = 0; |
static char symbol_prefix_char = '\0'; |
static int base_relative = 0; |
@@ -458,6 +459,9 @@ static void write_src(void) |
@@ -457,6 +458,9 @@ static void write_src(void) |
|
free(markers); |
|
@@ -75,7 +75,7 @@ |
output_label("kallsyms_token_table"); |
off = 0; |
for (i = 0; i < 256; i++) { |
@@ -516,6 +520,9 @@ static void *find_token(unsigned char *s |
@@ -515,6 +519,9 @@ static void *find_token(unsigned char *s |
{ |
int i; |
|
@@ -85,7 +85,7 @@ |
for (i = 0; i < len - 1; i++) { |
if (str[i] == token[0] && str[i+1] == token[1]) |
return &str[i]; |
@@ -588,6 +595,9 @@ static void optimize_result(void) |
@@ -587,6 +594,9 @@ static void optimize_result(void) |
{ |
int i, best; |
|
@@ -95,7 +95,7 @@ |
/* using the '\0' symbol last allows compress_symbols to use standard |
* fast string functions */ |
for (i = 255; i >= 0; i--) { |
@@ -776,6 +786,8 @@ int main(int argc, char **argv) |
@@ -775,6 +785,8 @@ int main(int argc, char **argv) |
symbol_prefix_char = *p; |
} else if (strcmp(argv[i], "--base-relative") == 0) |
base_relative = 1; |
/branches/18.06.1/target/linux/generic/pending-4.14/308-mips32r2_tune.patch |
@@ -11,12 +11,12 @@ |
|
--- a/arch/mips/Makefile |
+++ b/arch/mips/Makefile |
@@ -161,7 +161,7 @@ cflags-$(CONFIG_CPU_VR41XX) += -march=r4 |
cflags-$(CONFIG_CPU_R4X00) += -march=r4600 -Wa,--trap |
@@ -162,7 +162,7 @@ cflags-$(CONFIG_CPU_R4X00) += -march=r46 |
cflags-$(CONFIG_CPU_TX49XX) += -march=r4600 -Wa,--trap |
cflags-$(CONFIG_CPU_MIPS32_R1) += -march=mips32 -Wa,--trap |
-cflags-$(CONFIG_CPU_MIPS32_R2) += -march=mips32r2 -Wa,--trap |
+cflags-$(CONFIG_CPU_MIPS32_R2) += -march=mips32r2 -mtune=34kc -Wa,--trap |
cflags-$(CONFIG_CPU_MIPS32_R1) += $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \ |
-Wa,-mips32 -Wa,--trap |
-cflags-$(CONFIG_CPU_MIPS32_R2) += $(call cc-option,-march=mips32r2,-mips32r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \ |
+cflags-$(CONFIG_CPU_MIPS32_R2) += $(call cc-option,-march=mips32r2 -mtune=34kc,-mips32r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \ |
-Wa,-mips32r2 -Wa,--trap |
cflags-$(CONFIG_CPU_MIPS32_R6) += -march=mips32r6 -Wa,--trap -modd-spreg |
cflags-$(CONFIG_CPU_MIPS64_R1) += -march=mips64 -Wa,--trap |
cflags-$(CONFIG_CPU_MIPS64_R2) += -march=mips64r2 -Wa,--trap |
cflags-$(CONFIG_CPU_MIPS64_R1) += $(call cc-option,-march=mips64,-mips64 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64) \ |
/branches/18.06.1/target/linux/generic/pending-4.14/341-MIPS-mm-remove-no-op-dma_map_ops-where-possible.patch |
@@ -14,7 +14,7 @@ |
|
--- a/arch/mips/Kconfig |
+++ b/arch/mips/Kconfig |
@@ -221,6 +221,7 @@ config BMIPS_GENERIC |
@@ -220,6 +220,7 @@ config BMIPS_GENERIC |
select BRCMSTB_L2_IRQ |
select IRQ_MIPS_CPU |
select DMA_NONCOHERENT |
@@ -22,7 +22,7 @@ |
select SYS_SUPPORTS_32BIT_KERNEL |
select SYS_SUPPORTS_LITTLE_ENDIAN |
select SYS_SUPPORTS_BIG_ENDIAN |
@@ -346,6 +347,7 @@ config MACH_JAZZ |
@@ -345,6 +346,7 @@ config MACH_JAZZ |
select CSRC_R4K |
select DEFAULT_SGI_PARTITION if CPU_BIG_ENDIAN |
select GENERIC_ISA_DMA |
@@ -30,7 +30,7 @@ |
select HAVE_PCSPKR_PLATFORM |
select IRQ_MIPS_CPU |
select I8253 |
@@ -1131,6 +1133,9 @@ config DMA_NONCOHERENT |
@@ -1127,6 +1129,9 @@ config DMA_NONCOHERENT |
bool |
select NEED_DMA_MAP_STATE |
|
@@ -40,7 +40,7 @@ |
config NEED_DMA_MAP_STATE |
bool |
|
@@ -1655,6 +1660,7 @@ config CPU_R10000 |
@@ -1651,6 +1656,7 @@ config CPU_R10000 |
select CPU_SUPPORTS_64BIT_KERNEL |
select CPU_SUPPORTS_HIGHMEM |
select CPU_SUPPORTS_HUGEPAGES |
@@ -48,7 +48,7 @@ |
help |
MIPS Technologies R10000-series processors. |
|
@@ -1903,9 +1909,11 @@ config SYS_HAS_CPU_MIPS32_R3_5 |
@@ -1899,9 +1905,11 @@ config SYS_HAS_CPU_MIPS32_R3_5 |
bool |
|
config SYS_HAS_CPU_MIPS32_R5 |
@@ -60,7 +60,7 @@ |
bool |
|
config SYS_HAS_CPU_MIPS64_R1 |
@@ -1915,6 +1923,7 @@ config SYS_HAS_CPU_MIPS64_R2 |
@@ -1911,6 +1919,7 @@ config SYS_HAS_CPU_MIPS64_R2 |
bool |
|
config SYS_HAS_CPU_MIPS64_R6 |
/branches/18.06.1/target/linux/generic/pending-4.14/400-mtd-add-rootfs-split-support.patch |
@@ -60,7 +60,7 @@ |
/* |
* Given a pointer to the MTD object in the mtd_part structure, we can retrieve |
* the pointer to that structure. |
@@ -668,6 +672,7 @@ int mtd_add_partition(struct mtd_info *p |
@@ -658,6 +662,7 @@ int mtd_add_partition(struct mtd_info *p |
mutex_unlock(&mtd_partitions_mutex); |
|
add_mtd_device(&new->mtd); |
@@ -68,7 +68,7 @@ |
|
mtd_add_partition_attrs(new); |
|
@@ -746,6 +751,29 @@ int mtd_del_partition(struct mtd_info *m |
@@ -736,6 +741,35 @@ int mtd_del_partition(struct mtd_info *m |
} |
EXPORT_SYMBOL_GPL(mtd_del_partition); |
|
@@ -82,6 +82,11 @@ |
+{ |
+} |
+ |
+void __weak arch_split_mtd_part(struct mtd_info *master, const char *name, |
+ int offset, int size) |
+{ |
+} |
+ |
+static void mtd_partition_split(struct mtd_info *master, struct mtd_part *part) |
+{ |
+ static int rootfs_found = 0; |
@@ -89,16 +94,17 @@ |
+ if (rootfs_found) |
+ return; |
+ |
+ if (IS_ENABLED(CONFIG_MTD_SPLIT_FIRMWARE) && |
+ !strcmp(part->mtd.name, SPLIT_FIRMWARE_NAME) && |
+ !of_find_property(mtd_get_of_node(&part->mtd), "compatible", NULL)) |
+ if (!strcmp(part->mtd.name, SPLIT_FIRMWARE_NAME) && |
+ IS_ENABLED(CONFIG_MTD_SPLIT_FIRMWARE)) |
+ split_firmware(master, part); |
+ |
+ arch_split_mtd_part(master, part->mtd.name, part->offset, |
+ part->mtd.size); |
+} |
+ |
/* |
* 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 |
@@ -777,6 +805,7 @@ int add_mtd_partitions(struct mtd_info * |
@@ -767,6 +801,7 @@ int add_mtd_partitions(struct mtd_info * |
mutex_unlock(&mtd_partitions_mutex); |
|
add_mtd_device(&slave->mtd); |
@@ -106,3 +112,13 @@ |
mtd_add_partition_attrs(slave); |
/* Look for subpartitions */ |
parse_mtd_partitions(&slave->mtd, parts[i].types, NULL); |
--- a/include/linux/mtd/partitions.h |
+++ b/include/linux/mtd/partitions.h |
@@ -110,5 +110,7 @@ int mtd_add_partition(struct mtd_info *m |
long long offset, long long length); |
int mtd_del_partition(struct mtd_info *master, int partno); |
uint64_t mtd_get_device_size(const struct mtd_info *mtd); |
+extern void __weak arch_split_mtd_part(struct mtd_info *master, |
+ const char *name, int offset, int size); |
|
#endif |
/branches/18.06.1/target/linux/generic/pending-4.14/401-mtd-add-support-for-different-partition-parser-types.patch |
@@ -9,55 +9,7 @@ |
|
--- a/drivers/mtd/mtdpart.c |
+++ b/drivers/mtd/mtdpart.c |
@@ -56,6 +56,10 @@ struct mtd_part { |
}; |
|
static void mtd_partition_split(struct mtd_info *master, struct mtd_part *part); |
+static int parse_mtd_partitions_by_type(struct mtd_info *master, |
+ enum mtd_parser_type type, |
+ const struct mtd_partition **pparts, |
+ struct mtd_part_parser_data *data); |
|
/* |
* Given a pointer to the MTD object in the mtd_part structure, we can retrieve |
@@ -751,6 +755,36 @@ int mtd_del_partition(struct mtd_info *m |
} |
EXPORT_SYMBOL_GPL(mtd_del_partition); |
|
+static int |
+run_parsers_by_type(struct mtd_part *slave, enum mtd_parser_type type) |
+{ |
+ struct mtd_partition *parts; |
+ int nr_parts; |
+ int i; |
+ |
+ nr_parts = parse_mtd_partitions_by_type(&slave->mtd, type, (const struct mtd_partition **)&parts, |
+ NULL); |
+ if (nr_parts <= 0) |
+ return nr_parts; |
+ |
+ if (WARN_ON(!parts)) |
+ return 0; |
+ |
+ for (i = 0; i < nr_parts; i++) { |
+ /* adjust partition offsets */ |
+ parts[i].offset += slave->offset; |
+ |
+ mtd_add_partition(slave->parent, |
+ parts[i].name, |
+ parts[i].offset, |
+ parts[i].size); |
+ } |
+ |
+ kfree(parts); |
+ |
+ return nr_parts; |
+} |
+ |
#ifdef CONFIG_MTD_SPLIT_FIRMWARE_NAME |
#define SPLIT_FIRMWARE_NAME CONFIG_MTD_SPLIT_FIRMWARE_NAME |
#else |
@@ -1122,6 +1156,61 @@ void mtd_part_parser_cleanup(struct mtd_ |
@@ -1113,6 +1113,62 @@ void mtd_part_parser_cleanup(struct mtd_ |
} |
} |
|
@@ -85,10 +37,10 @@ |
+ return ret; |
+} |
+ |
+static int parse_mtd_partitions_by_type(struct mtd_info *master, |
+ enum mtd_parser_type type, |
+ const struct mtd_partition **pparts, |
+ struct mtd_part_parser_data *data) |
+int parse_mtd_partitions_by_type(struct mtd_info *master, |
+ enum mtd_parser_type type, |
+ const struct mtd_partition **pparts, |
+ struct mtd_part_parser_data *data) |
+{ |
+ struct mtd_part_parser *prev = NULL; |
+ int ret = 0; |
@@ -115,6 +67,7 @@ |
+ |
+ return ret; |
+} |
+EXPORT_SYMBOL_GPL(parse_mtd_partitions_by_type); |
+ |
int mtd_is_partition(const struct mtd_info *mtd) |
{ |
@@ -121,7 +74,12 @@ |
struct mtd_part *part; |
--- a/include/linux/mtd/partitions.h |
+++ b/include/linux/mtd/partitions.h |
@@ -73,6 +73,10 @@ struct mtd_part_parser_data { |
@@ -68,11 +68,14 @@ struct mtd_part_parser_data { |
unsigned long origin; |
}; |
|
- |
/* |
* Functions dealing with the various ways of partitioning the space |
*/ |
|
@@ -132,7 +90,7 @@ |
struct mtd_part_parser { |
struct list_head list; |
struct module *owner; |
@@ -81,6 +85,7 @@ struct mtd_part_parser { |
@@ -81,6 +84,7 @@ struct mtd_part_parser { |
int (*parse_fn)(struct mtd_info *, const struct mtd_partition **, |
struct mtd_part_parser_data *); |
void (*cleanup)(const struct mtd_partition *pparts, int nr_parts); |
@@ -140,3 +98,13 @@ |
}; |
|
/* Container for passing around a set of parsed partitions */ |
@@ -113,4 +117,9 @@ uint64_t mtd_get_device_size(const struc |
extern void __weak arch_split_mtd_part(struct mtd_info *master, |
const char *name, int offset, int size); |
|
+int parse_mtd_partitions_by_type(struct mtd_info *master, |
+ enum mtd_parser_type type, |
+ const struct mtd_partition **pparts, |
+ struct mtd_part_parser_data *data); |
+ |
#endif |
/branches/18.06.1/target/linux/generic/pending-4.14/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch |
@@ -10,15 +10,52 @@ |
|
--- a/drivers/mtd/mtdpart.c |
+++ b/drivers/mtd/mtdpart.c |
@@ -793,6 +793,7 @@ run_parsers_by_type(struct mtd_part *sla |
@@ -741,6 +741,36 @@ int mtd_del_partition(struct mtd_info *m |
} |
EXPORT_SYMBOL_GPL(mtd_del_partition); |
|
+static int |
+run_parsers_by_type(struct mtd_part *slave, enum mtd_parser_type type) |
+{ |
+ struct mtd_partition *parts; |
+ int nr_parts; |
+ int i; |
+ |
+ nr_parts = parse_mtd_partitions_by_type(&slave->mtd, type, (const struct mtd_partition **)&parts, |
+ NULL); |
+ if (nr_parts <= 0) |
+ return nr_parts; |
+ |
+ if (WARN_ON(!parts)) |
+ return 0; |
+ |
+ for (i = 0; i < nr_parts; i++) { |
+ /* adjust partition offsets */ |
+ parts[i].offset += slave->offset; |
+ |
+ mtd_add_partition(slave->parent, |
+ parts[i].name, |
+ parts[i].offset, |
+ parts[i].size); |
+ } |
+ |
+ kfree(parts); |
+ |
+ return nr_parts; |
+} |
+ |
#ifdef CONFIG_MTD_SPLIT_FIRMWARE_NAME |
#define SPLIT_FIRMWARE_NAME CONFIG_MTD_SPLIT_FIRMWARE_NAME |
#else |
@@ -749,6 +779,7 @@ EXPORT_SYMBOL_GPL(mtd_del_partition); |
|
static void split_firmware(struct mtd_info *master, struct mtd_part *part) |
{ |
+ run_parsers_by_type(part, MTD_PARSER_TYPE_FIRMWARE); |
} |
|
static void mtd_partition_split(struct mtd_info *master, struct mtd_part *part) |
@@ -802,6 +803,12 @@ static void mtd_partition_split(struct m |
void __weak arch_split_mtd_part(struct mtd_info *master, const char *name, |
@@ -763,6 +794,12 @@ static void mtd_partition_split(struct m |
if (rootfs_found) |
return; |
|
@@ -28,12 +65,12 @@ |
+ rootfs_found = 1; |
+ } |
+ |
if (IS_ENABLED(CONFIG_MTD_SPLIT_FIRMWARE) && |
!strcmp(part->mtd.name, SPLIT_FIRMWARE_NAME) && |
!of_find_property(mtd_get_of_node(&part->mtd), "compatible", NULL)) |
if (!strcmp(part->mtd.name, SPLIT_FIRMWARE_NAME) && |
IS_ENABLED(CONFIG_MTD_SPLIT_FIRMWARE)) |
split_firmware(master, part); |
--- a/include/linux/mtd/partitions.h |
+++ b/include/linux/mtd/partitions.h |
@@ -75,6 +75,8 @@ struct mtd_part_parser_data { |
@@ -74,6 +74,8 @@ struct mtd_part_parser_data { |
|
enum mtd_parser_type { |
MTD_PARSER_TYPE_DEVICE = 0, |
/branches/18.06.1/target/linux/generic/pending-4.14/404-mtd-add-more-helper-functions.patch |
@@ -11,8 +11,26 @@ |
|
--- a/drivers/mtd/mtdpart.c |
+++ b/drivers/mtd/mtdpart.c |
@@ -1235,6 +1235,24 @@ int mtd_is_partition(const struct mtd_in |
@@ -771,6 +771,17 @@ run_parsers_by_type(struct mtd_part *sla |
return nr_parts; |
} |
|
+static inline unsigned long |
+mtd_pad_erasesize(struct mtd_info *mtd, int offset, int len) |
+{ |
+ unsigned long mask = mtd->erasesize - 1; |
+ |
+ len += offset & mask; |
+ len = (len + mask) & ~mask; |
+ len -= offset & mask; |
+ return len; |
+} |
+ |
#ifdef CONFIG_MTD_SPLIT_FIRMWARE_NAME |
#define SPLIT_FIRMWARE_NAME CONFIG_MTD_SPLIT_FIRMWARE_NAME |
#else |
@@ -1223,6 +1234,24 @@ int mtd_is_partition(const struct mtd_in |
} |
EXPORT_SYMBOL_GPL(mtd_is_partition); |
|
+struct mtd_info *mtdpart_get_master(const struct mtd_info *mtd) |
@@ -38,7 +56,7 @@ |
{ |
--- a/include/linux/mtd/mtd.h |
+++ b/include/linux/mtd/mtd.h |
@@ -494,6 +494,24 @@ static inline uint32_t mtd_mod_by_eb(uin |
@@ -493,6 +493,24 @@ static inline uint32_t mtd_mod_by_eb(uin |
return do_div(sz, mtd->erasesize); |
} |
|
@@ -65,7 +83,7 @@ |
if (mtd->writesize_shift) |
--- a/include/linux/mtd/partitions.h |
+++ b/include/linux/mtd/partitions.h |
@@ -116,6 +116,8 @@ int mtd_is_partition(const struct mtd_in |
@@ -115,6 +115,8 @@ int mtd_is_partition(const struct mtd_in |
int mtd_add_partition(struct mtd_info *master, const char *name, |
long long offset, long long length); |
int mtd_del_partition(struct mtd_info *master, int partno); |
@@ -72,5 +90,5 @@ |
+struct mtd_info *mtdpart_get_master(const struct mtd_info *mtd); |
+uint64_t mtdpart_get_offset(const struct mtd_info *mtd); |
uint64_t mtd_get_device_size(const struct mtd_info *mtd); |
|
#endif |
extern void __weak arch_split_mtd_part(struct mtd_info *master, |
const char *name, int offset, int size); |
/branches/18.06.1/target/linux/generic/pending-4.14/411-mtd-partial_eraseblock_write.patch |
@@ -19,7 +19,7 @@ |
/* Our partition linked list */ |
static LIST_HEAD(mtd_partitions); |
static DEFINE_MUTEX(mtd_partitions_mutex); |
@@ -255,13 +257,61 @@ static int part_erase(struct mtd_info *m |
@@ -242,13 +244,61 @@ static int part_erase(struct mtd_info *m |
struct mtd_part *part = mtd_to_part(mtd); |
int ret; |
|
@@ -81,7 +81,7 @@ |
return ret; |
} |
|
@@ -269,6 +319,25 @@ void mtd_erase_callback(struct erase_inf |
@@ -256,6 +306,25 @@ void mtd_erase_callback(struct erase_inf |
{ |
if (instr->mtd->_erase == part_erase) { |
struct mtd_part *part = mtd_to_part(instr->mtd); |
@@ -107,7 +107,7 @@ |
|
if (instr->fail_addr != MTD_FAIL_ADDR_UNKNOWN) |
instr->fail_addr -= part->offset; |
@@ -584,19 +653,22 @@ static struct mtd_part *allocate_partiti |
@@ -570,19 +639,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 */ |
@@ -123,8 +123,8 @@ |
+ slave->mtd.erasesize = slave->mtd.size; |
} |
|
- tmp = part_absolute_offset(parent) + slave->mtd.size; |
+ tmp = part_absolute_offset(parent) + slave->offset + slave->mtd.size; |
- tmp = slave->mtd.size; |
+ tmp = slave->offset + slave->mtd.size; |
remainder = do_div(tmp, wr_alignment); |
if ((slave->mtd.flags & MTD_WRITEABLE) && remainder) { |
- slave->mtd.flags &= ~MTD_WRITEABLE; |
/branches/18.06.1/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch |
@@ -8,7 +8,7 @@ |
|
--- a/drivers/mtd/ubi/build.c |
+++ b/drivers/mtd/ubi/build.c |
@@ -1172,6 +1172,73 @@ static struct mtd_info * __init open_mtd |
@@ -1171,6 +1171,49 @@ static struct mtd_info * __init open_mtd |
return mtd; |
} |
|
@@ -20,9 +20,6 @@ |
+{ |
+ int err; |
+ struct mtd_info *mtd; |
+ loff_t offset = 0; |
+ size_t len; |
+ char magic[4]; |
+ |
+ /* try attaching mtd device named "ubi" or "data" */ |
+ mtd = open_mtd_device("ubi"); |
@@ -29,60 +26,39 @@ |
+ if (IS_ERR(mtd)) |
+ mtd = open_mtd_device("data"); |
+ |
+ if (IS_ERR(mtd)) |
+ return; |
+ if (!IS_ERR(mtd)) { |
+ size_t len; |
+ char magic[4]; |
+ |
+ /* get the first not bad block */ |
+ if (mtd_can_have_bb(mtd)) |
+ while (mtd_block_isbad(mtd, offset)) { |
+ offset += mtd->erasesize; |
+ /* check for a valid ubi magic */ |
+ err = mtd_read(mtd, 0, 4, &len, (void *) magic); |
+ if (!err && len == 4 && strncmp(magic, "UBI#", 4)) { |
+ pr_err("UBI error: no valid UBI magic found inside mtd%d\n", mtd->index); |
+ put_mtd_device(mtd); |
+ return; |
+ } |
+ |
+ if (offset > mtd->size) { |
+ pr_err("UBI error: Failed to find a non-bad " |
+ "block on mtd%d\n", mtd->index); |
+ goto cleanup; |
+ /* auto-add only media types where UBI makes sense */ |
+ if (mtd->type == MTD_NANDFLASH || |
+ mtd->type == MTD_NORFLASH || |
+ mtd->type == MTD_DATAFLASH || |
+ mtd->type == MTD_MLCNANDFLASH) { |
+ mutex_lock(&ubi_devices_mutex); |
+ pr_notice("UBI: auto-attach mtd%d\n", mtd->index); |
+ err = ubi_attach_mtd_dev(mtd, UBI_DEV_NUM_AUTO, 0, 0); |
+ mutex_unlock(&ubi_devices_mutex); |
+ if (err < 0) { |
+ pr_err("UBI error: cannot attach mtd%d\n", mtd->index); |
+ put_mtd_device(mtd); |
+ } |
+ } |
+ |
+ /* check if the read from flash was successful */ |
+ err = mtd_read(mtd, offset, 4, &len, (void *) magic); |
+ if ((err && !mtd_is_bitflip(err)) || len != 4) { |
+ pr_err("UBI error: unable to read from mtd%d\n", mtd->index); |
+ goto cleanup; |
+ } |
+ |
+ /* check for a valid ubi magic */ |
+ if (strncmp(magic, "UBI#", 4)) { |
+ pr_err("UBI error: no valid UBI magic found inside mtd%d\n", mtd->index); |
+ goto cleanup; |
+ } |
+ |
+ /* don't auto-add media types where UBI doesn't makes sense */ |
+ if (mtd->type != MTD_NANDFLASH && |
+ mtd->type != MTD_NORFLASH && |
+ mtd->type != MTD_DATAFLASH && |
+ mtd->type != MTD_MLCNANDFLASH) |
+ goto cleanup; |
+ |
+ mutex_lock(&ubi_devices_mutex); |
+ pr_notice("UBI: auto-attach mtd%d\n", mtd->index); |
+ err = ubi_attach_mtd_dev(mtd, UBI_DEV_NUM_AUTO, 0, 0); |
+ mutex_unlock(&ubi_devices_mutex); |
+ if (err < 0) { |
+ pr_err("UBI error: cannot attach mtd%d\n", mtd->index); |
+ goto cleanup; |
+ } |
+ |
+ return; |
+ |
+cleanup: |
+ put_mtd_device(mtd); |
+} |
+ |
static int __init ubi_init(void) |
{ |
int err, i, k; |
@@ -1255,6 +1322,12 @@ static int __init ubi_init(void) |
@@ -1254,6 +1297,12 @@ static int __init ubi_init(void) |
} |
} |
|
/branches/18.06.1/target/linux/generic/pending-4.14/640-netfilter-nf_flow_table-add-hardware-offload-support.patch |
@@ -128,7 +128,7 @@ |
#define NFTA_FLOWTABLE_MAX (__NFTA_FLOWTABLE_MAX - 1) |
--- a/net/netfilter/Kconfig |
+++ b/net/netfilter/Kconfig |
@@ -692,6 +692,15 @@ config NF_FLOW_TABLE |
@@ -686,6 +686,15 @@ config NF_FLOW_TABLE |
|
To compile it as a module, choose M here. |
|
@@ -506,7 +506,7 @@ |
+MODULE_ALIAS("nf-flow-table-hw"); |
--- a/net/netfilter/nf_tables_api.c |
+++ b/net/netfilter/nf_tables_api.c |
@@ -4928,6 +4928,14 @@ static int nf_tables_flowtable_parse_hoo |
@@ -4917,6 +4917,14 @@ static int nf_tables_flowtable_parse_hoo |
if (err < 0) |
goto err1; |
|
@@ -521,7 +521,7 @@ |
ops = kzalloc(sizeof(struct nf_hook_ops) * n, GFP_KERNEL); |
if (!ops) { |
err = -ENOMEM; |
@@ -5058,10 +5066,19 @@ static int nf_tables_newflowtable(struct |
@@ -5047,10 +5055,19 @@ static int nf_tables_newflowtable(struct |
} |
|
flowtable->data.type = type; |
@@ -541,7 +541,7 @@ |
err = nf_tables_flowtable_parse_hook(&ctx, nla[NFTA_FLOWTABLE_HOOK], |
flowtable); |
if (err < 0) |
@@ -5159,7 +5176,8 @@ static int nf_tables_fill_flowtable_info |
@@ -5148,7 +5165,8 @@ static int nf_tables_fill_flowtable_info |
nla_put_string(skb, NFTA_FLOWTABLE_NAME, flowtable->name) || |
nla_put_be32(skb, NFTA_FLOWTABLE_USE, htonl(flowtable->use)) || |
nla_put_be64(skb, NFTA_FLOWTABLE_HANDLE, cpu_to_be64(flowtable->handle), |
/branches/18.06.1/target/linux/generic/pending-4.14/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch |
@@ -292,7 +292,7 @@ |
__skb_tunnel_rx(skb, tunnel->dev, tunnel->net); |
|
err = dscp_ecn_decapsulate(tunnel, ipv6h, skb); |
@@ -963,6 +1102,7 @@ static void init_tel_txopt(struct ipv6_t |
@@ -962,6 +1101,7 @@ static void init_tel_txopt(struct ipv6_t |
opt->ops.opt_nflen = 8; |
} |
|
@@ -300,15 +300,15 @@ |
/** |
* ip6_tnl_addr_conflict - compare packet addresses to tunnel's own |
* @t: the outgoing tunnel device |
@@ -1306,6 +1446,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str |
@@ -1303,6 +1443,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str |
{ |
struct ip6_tnl *t = netdev_priv(dev); |
struct ipv6hdr *ipv6h; |
struct ipv6hdr *ipv6h = ipv6_hdr(skb); |
+ struct __ip6_tnl_fmr *fmr; |
int encap_limit = -1; |
__u16 offset; |
struct flowi6 fl6; |
@@ -1372,6 +1513,18 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str |
@@ -1365,6 +1506,18 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str |
|
fl6.flowi6_uid = sock_net_uid(dev_net(dev), NULL); |
|
@@ -327,7 +327,7 @@ |
if (iptunnel_handle_offloads(skb, SKB_GSO_IPXIP6)) |
return -1; |
|
@@ -1500,6 +1653,14 @@ ip6_tnl_change(struct ip6_tnl *t, const |
@@ -1493,6 +1646,14 @@ ip6_tnl_change(struct ip6_tnl *t, const |
t->parms.link = p->link; |
t->parms.proto = p->proto; |
t->parms.fwmark = p->fwmark; |
@@ -342,7 +342,7 @@ |
dst_cache_reset(&t->dst_cache); |
ip6_tnl_link_config(t); |
return 0; |
@@ -1538,6 +1699,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_ |
@@ -1531,6 +1692,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_ |
p->flowinfo = u->flowinfo; |
p->link = u->link; |
p->proto = u->proto; |
@@ -350,7 +350,7 @@ |
memcpy(p->name, u->name, sizeof(u->name)); |
} |
|
@@ -1924,6 +2086,15 @@ static int ip6_tnl_validate(struct nlatt |
@@ -1917,6 +2079,15 @@ static int ip6_tnl_validate(struct nlatt |
return 0; |
} |
|
@@ -366,7 +366,7 @@ |
static void ip6_tnl_netlink_parms(struct nlattr *data[], |
struct __ip6_tnl_parm *parms) |
{ |
@@ -1961,6 +2132,46 @@ static void ip6_tnl_netlink_parms(struct |
@@ -1954,6 +2125,46 @@ static void ip6_tnl_netlink_parms(struct |
|
if (data[IFLA_IPTUN_FWMARK]) |
parms->fwmark = nla_get_u32(data[IFLA_IPTUN_FWMARK]); |
@@ -413,7 +413,7 @@ |
} |
|
static bool ip6_tnl_netlink_encap_parms(struct nlattr *data[], |
@@ -2076,6 +2287,12 @@ static void ip6_tnl_dellink(struct net_d |
@@ -2069,6 +2280,12 @@ static void ip6_tnl_dellink(struct net_d |
|
static size_t ip6_tnl_get_size(const struct net_device *dev) |
{ |
@@ -426,7 +426,7 @@ |
return |
/* IFLA_IPTUN_LINK */ |
nla_total_size(4) + |
@@ -2105,6 +2322,24 @@ static size_t ip6_tnl_get_size(const str |
@@ -2098,6 +2315,24 @@ static size_t ip6_tnl_get_size(const str |
nla_total_size(0) + |
/* IFLA_IPTUN_FWMARK */ |
nla_total_size(4) + |
@@ -451,7 +451,7 @@ |
0; |
} |
|
@@ -2112,6 +2347,9 @@ static int ip6_tnl_fill_info(struct sk_b |
@@ -2105,6 +2340,9 @@ static int ip6_tnl_fill_info(struct sk_b |
{ |
struct ip6_tnl *tunnel = netdev_priv(dev); |
struct __ip6_tnl_parm *parm = &tunnel->parms; |
@@ -461,7 +461,7 @@ |
|
if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) || |
nla_put_in6_addr(skb, IFLA_IPTUN_LOCAL, &parm->laddr) || |
@@ -2121,9 +2359,27 @@ static int ip6_tnl_fill_info(struct sk_b |
@@ -2114,9 +2352,27 @@ static int ip6_tnl_fill_info(struct sk_b |
nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) || |
nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags) || |
nla_put_u8(skb, IFLA_IPTUN_PROTO, parm->proto) || |
@@ -490,7 +490,7 @@ |
if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel->encap.type) || |
nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel->encap.sport) || |
nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, tunnel->encap.dport) || |
@@ -2163,6 +2419,7 @@ static const struct nla_policy ip6_tnl_p |
@@ -2156,6 +2412,7 @@ static const struct nla_policy ip6_tnl_p |
[IFLA_IPTUN_ENCAP_DPORT] = { .type = NLA_U16 }, |
[IFLA_IPTUN_COLLECT_METADATA] = { .type = NLA_FLAG }, |
[IFLA_IPTUN_FWMARK] = { .type = NLA_U32 }, |
/branches/18.06.1/target/linux/generic/pending-4.14/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch |
@@ -66,7 +66,7 @@ |
static void rt_fibinfo_free(struct rtable __rcu **rtp) |
--- a/net/ipv4/fib_trie.c |
+++ b/net/ipv4/fib_trie.c |
@@ -2469,6 +2469,7 @@ static const char *const rtn_type_names[ |
@@ -2460,6 +2460,7 @@ static const char *const rtn_type_names[ |
[RTN_THROW] = "THROW", |
[RTN_NAT] = "NAT", |
[RTN_XRESOLVE] = "XRESOLVE", |
@@ -76,7 +76,7 @@ |
static inline const char *rtn_type(char *buf, size_t len, unsigned int t) |
--- a/net/ipv4/ipmr.c |
+++ b/net/ipv4/ipmr.c |
@@ -163,6 +163,7 @@ static int ipmr_rule_action(struct fib_r |
@@ -161,6 +161,7 @@ static int ipmr_rule_action(struct fib_r |
case FR_ACT_UNREACHABLE: |
return -ENETUNREACH; |
case FR_ACT_PROHIBIT: |
@@ -99,7 +99,7 @@ |
tb_id = fib_rule_get_table(rule, arg); |
--- a/net/ipv6/ip6mr.c |
+++ b/net/ipv6/ip6mr.c |
@@ -170,6 +170,8 @@ static int ip6mr_rule_action(struct fib_ |
@@ -168,6 +168,8 @@ static int ip6mr_rule_action(struct fib_ |
return -ENETUNREACH; |
case FR_ACT_PROHIBIT: |
return -EACCES; |
@@ -141,7 +141,7 @@ |
static const struct rt6_info ip6_blk_hole_entry_template = { |
.dst = { |
.__refcnt = ATOMIC_INIT(1), |
@@ -2046,6 +2063,11 @@ static struct rt6_info *ip6_route_info_c |
@@ -2043,6 +2060,11 @@ static struct rt6_info *ip6_route_info_c |
rt->dst.output = ip6_pkt_prohibit_out; |
rt->dst.input = ip6_pkt_prohibit; |
break; |
@@ -153,7 +153,7 @@ |
case RTN_THROW: |
case RTN_UNREACHABLE: |
default: |
@@ -2771,6 +2793,17 @@ static int ip6_pkt_prohibit_out(struct n |
@@ -2768,6 +2790,17 @@ static int ip6_pkt_prohibit_out(struct n |
return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES); |
} |
|
@@ -171,7 +171,7 @@ |
/* |
* Allocate a dst for local (unicast / anycast) address. |
*/ |
@@ -3007,7 +3040,8 @@ static int rtm_to_fib6_config(struct sk_ |
@@ -3004,7 +3037,8 @@ static int rtm_to_fib6_config(struct sk_ |
if (rtm->rtm_type == RTN_UNREACHABLE || |
rtm->rtm_type == RTN_BLACKHOLE || |
rtm->rtm_type == RTN_PROHIBIT || |
@@ -181,7 +181,7 @@ |
cfg->fc_flags |= RTF_REJECT; |
|
if (rtm->rtm_type == RTN_LOCAL) |
@@ -3502,6 +3536,9 @@ static int rt6_fill_node(struct net *net |
@@ -3494,6 +3528,9 @@ static int rt6_fill_node(struct net *net |
case -EACCES: |
rtm->rtm_type = RTN_PROHIBIT; |
break; |
@@ -191,7 +191,7 @@ |
case -EAGAIN: |
rtm->rtm_type = RTN_THROW; |
break; |
@@ -3820,6 +3857,8 @@ static int ip6_route_dev_notify(struct n |
@@ -3812,6 +3849,8 @@ static int ip6_route_dev_notify(struct n |
#ifdef CONFIG_IPV6_MULTIPLE_TABLES |
net->ipv6.ip6_prohibit_entry->dst.dev = dev; |
net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev); |
@@ -200,7 +200,7 @@ |
net->ipv6.ip6_blk_hole_entry->dst.dev = dev; |
net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev); |
#endif |
@@ -3831,6 +3870,7 @@ static int ip6_route_dev_notify(struct n |
@@ -3823,6 +3862,7 @@ static int ip6_route_dev_notify(struct n |
in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev); |
#ifdef CONFIG_IPV6_MULTIPLE_TABLES |
in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev); |
@@ -208,7 +208,7 @@ |
in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev); |
#endif |
} |
@@ -4047,6 +4087,17 @@ static int __net_init ip6_route_net_init |
@@ -4039,6 +4079,17 @@ static int __net_init ip6_route_net_init |
net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops; |
dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst, |
ip6_template_metrics, true); |
@@ -226,7 +226,7 @@ |
#endif |
|
net->ipv6.sysctl.flush_delay = 0; |
@@ -4065,6 +4116,8 @@ out: |
@@ -4057,6 +4108,8 @@ out: |
return ret; |
|
#ifdef CONFIG_IPV6_MULTIPLE_TABLES |
@@ -235,7 +235,7 @@ |
out_ip6_prohibit_entry: |
kfree(net->ipv6.ip6_prohibit_entry); |
out_ip6_null_entry: |
@@ -4082,6 +4135,7 @@ static void __net_exit ip6_route_net_exi |
@@ -4074,6 +4127,7 @@ static void __net_exit ip6_route_net_exi |
#ifdef CONFIG_IPV6_MULTIPLE_TABLES |
kfree(net->ipv6.ip6_prohibit_entry); |
kfree(net->ipv6.ip6_blk_hole_entry); |
@@ -243,7 +243,7 @@ |
#endif |
dst_entries_destroy(&net->ipv6.ip6_dst_ops); |
} |
@@ -4155,6 +4209,9 @@ void __init ip6_route_init_special_entri |
@@ -4147,6 +4201,9 @@ void __init ip6_route_init_special_entri |
init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); |
init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev; |
init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); |
/branches/18.06.1/target/linux/generic/pending-4.14/680-NET-skip-GRO-for-foreign-MAC-addresses.patch |
@@ -11,7 +11,7 @@ |
|
--- a/include/linux/netdevice.h |
+++ b/include/linux/netdevice.h |
@@ -1766,6 +1766,8 @@ struct net_device { |
@@ -1763,6 +1763,8 @@ struct net_device { |
struct netdev_hw_addr_list mc; |
struct netdev_hw_addr_list dev_addrs; |
|
@@ -22,7 +22,7 @@ |
#endif |
--- a/include/linux/skbuff.h |
+++ b/include/linux/skbuff.h |
@@ -782,6 +782,7 @@ struct sk_buff { |
@@ -777,6 +777,7 @@ struct sk_buff { |
__u8 tc_redirected:1; |
__u8 tc_from_ingress:1; |
#endif |
@@ -32,7 +32,7 @@ |
__u16 tc_index; /* traffic control index */ |
--- a/net/core/dev.c |
+++ b/net/core/dev.c |
@@ -4805,6 +4805,9 @@ static enum gro_result dev_gro_receive(s |
@@ -4783,6 +4783,9 @@ static enum gro_result dev_gro_receive(s |
enum gro_result ret; |
int grow; |
|
@@ -42,7 +42,7 @@ |
if (netif_elide_gro(skb->dev)) |
goto normal; |
|
@@ -6279,6 +6282,48 @@ static void __netdev_adjacent_dev_unlink |
@@ -6253,6 +6256,48 @@ static void __netdev_adjacent_dev_unlink |
&upper_dev->adj_list.lower); |
} |
|
@@ -91,7 +91,7 @@ |
static int __netdev_upper_dev_link(struct net_device *dev, |
struct net_device *upper_dev, bool master, |
void *upper_priv, void *upper_info) |
@@ -6317,6 +6362,7 @@ static int __netdev_upper_dev_link(struc |
@@ -6291,6 +6336,7 @@ static int __netdev_upper_dev_link(struc |
if (ret) |
return ret; |
|
@@ -99,7 +99,7 @@ |
ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev, |
&changeupper_info.info); |
ret = notifier_to_errno(ret); |
@@ -6394,6 +6440,7 @@ void netdev_upper_dev_unlink(struct net_ |
@@ -6368,6 +6414,7 @@ void netdev_upper_dev_unlink(struct net_ |
|
__netdev_adjacent_dev_unlink_neighbour(dev, upper_dev); |
|
@@ -107,7 +107,7 @@ |
call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev, |
&changeupper_info.info); |
} |
@@ -6966,6 +7013,7 @@ int dev_set_mac_address(struct net_devic |
@@ -6938,6 +6985,7 @@ int dev_set_mac_address(struct net_devic |
if (err) |
return err; |
dev->addr_assign_type = NET_ADDR_SET; |
/branches/18.06.1/target/linux/generic/pending-4.14/681-NET-add-of_get_mac_address_mtd.patch |
@@ -32,7 +32,7 @@ |
{ |
struct property *pp = of_find_property(np, name, NULL); |
|
@@ -47,6 +48,79 @@ static const void *of_get_mac_addr(struc |
@@ -47,6 +48,73 @@ static const void *of_get_mac_addr(struc |
return NULL; |
} |
|
@@ -50,7 +50,6 @@ |
+ u32 mac_inc = 0; |
+ u8 mac[ETH_ALEN]; |
+ void *addr; |
+ u32 inc_idx; |
+ |
+ list = of_get_property(np, "mtd-mac-address", &size); |
+ if (!list || (size != (2 * sizeof(*list)))) |
@@ -74,13 +73,8 @@ |
+ ret = mtd_read(mtd, be32_to_cpup(list), 6, &retlen, mac); |
+ put_mtd_device(mtd); |
+ |
+ if (of_property_read_u32(np, "mtd-mac-address-increment-byte", &inc_idx)) |
+ inc_idx = 5; |
+ if (inc_idx > 5) |
+ return NULL; |
+ |
+ if (!of_property_read_u32(np, "mtd-mac-address-increment", &mac_inc)) |
+ mac[inc_idx] += mac_inc; |
+ mac[5] += mac_inc; |
+ |
+ if (!is_valid_ether_addr(mac)) |
+ return NULL; |
@@ -112,7 +106,7 @@ |
/** |
* Search the device tree for the best MAC address to use. 'mac-address' is |
* checked first, because that is supposed to contain to "most recent" MAC |
@@ -64,11 +138,18 @@ static const void *of_get_mac_addr(struc |
@@ -64,11 +132,18 @@ static const void *of_get_mac_addr(struc |
* addresses. Some older U-Boots only initialized 'local-mac-address'. In |
* this case, the real MAC is in 'local-mac-address', and 'mac-address' exists |
* but is all zeros. |
/branches/18.06.1/target/linux/generic/pending-4.14/734-net-phy-at803x-allow-to-configure-via-pdata.patch |
@@ -40,7 +40,7 @@ |
#define AT803X_DEBUG_ADDR 0x1D |
#define AT803X_DEBUG_DATA 0x1E |
|
@@ -74,6 +81,7 @@ MODULE_LICENSE("GPL"); |
@@ -73,6 +80,7 @@ MODULE_LICENSE("GPL"); |
struct at803x_priv { |
bool phy_reset:1; |
struct gpio_desc *gpiod_reset; |
@@ -48,7 +48,7 @@ |
}; |
|
struct at803x_context { |
@@ -274,8 +282,16 @@ does_not_require_reset_workaround: |
@@ -273,8 +281,16 @@ does_not_require_reset_workaround: |
return 0; |
} |
|
@@ -65,7 +65,7 @@ |
int ret; |
|
ret = genphy_config_init(phydev); |
@@ -296,6 +312,26 @@ static int at803x_config_init(struct phy |
@@ -295,6 +311,26 @@ static int at803x_config_init(struct phy |
return ret; |
} |
|
@@ -92,7 +92,7 @@ |
return 0; |
} |
|
@@ -333,6 +369,8 @@ static int at803x_config_intr(struct phy |
@@ -332,6 +368,8 @@ static int at803x_config_intr(struct phy |
static void at803x_link_change_notify(struct phy_device *phydev) |
{ |
struct at803x_priv *priv = phydev->priv; |
@@ -101,7 +101,7 @@ |
|
/* |
* Conduct a hardware reset for AT8030/2 every time a link loss is |
@@ -361,6 +399,24 @@ static void at803x_link_change_notify(st |
@@ -360,6 +398,24 @@ static void at803x_link_change_notify(st |
} else { |
priv->phy_reset = false; |
} |
/branches/18.06.1/target/linux/generic/pending-4.14/834-ledtrig-libata.patch |
@@ -65,7 +65,7 @@ |
/** |
* ata_build_rw_tf - Build ATA taskfile for given read/write request |
* @tf: Target ATA taskfile |
@@ -5121,6 +5134,9 @@ struct ata_queued_cmd *ata_qc_new_init(s |
@@ -5120,6 +5133,9 @@ struct ata_queued_cmd *ata_qc_new_init(s |
if (tag < 0) |
return NULL; |
} |
@@ -75,7 +75,7 @@ |
|
qc = __ata_qc_from_tag(ap, tag); |
qc->tag = tag; |
@@ -6022,6 +6038,9 @@ struct ata_port *ata_port_alloc(struct a |
@@ -6021,6 +6037,9 @@ struct ata_port *ata_port_alloc(struct a |
ap->stats.unhandled_irq = 1; |
ap->stats.idle_irq = 1; |
#endif |
@@ -85,7 +85,7 @@ |
ata_sff_port_init(ap); |
|
return ap; |
@@ -6043,6 +6062,12 @@ static void ata_host_release(struct devi |
@@ -6042,6 +6061,12 @@ static void ata_host_release(struct devi |
|
kfree(ap->pmp_link); |
kfree(ap->slave_link); |
@@ -98,7 +98,7 @@ |
kfree(ap); |
host->ports[i] = NULL; |
} |
@@ -6489,7 +6514,23 @@ int ata_host_register(struct ata_host *h |
@@ -6488,7 +6513,23 @@ int ata_host_register(struct ata_host *h |
host->ports[i]->print_id = atomic_inc_return(&ata_print_id); |
host->ports[i]->local_port_no = i + 1; |
} |