OpenWrt

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 2  →  ?path2? @ 3
/branches/18.06.1/target/linux/generic/pending-4.14/102-MIPS-only-process-negative-stack-offsets-on-stack-tr.patch
@@ -46,7 +46,7 @@
 
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -360,6 +360,8 @@ static inline int is_sp_move_ins(union m
@@ -358,6 +358,8 @@ static inline int is_sp_move_ins(union m
if (ip->i_format.opcode == addiu_op ||
ip->i_format.opcode == daddiu_op) {
/branches/18.06.1/target/linux/generic/pending-4.14/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
@@ -71,7 +71,7 @@
 
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -6143,7 +6143,7 @@ static void __ref alloc_node_mem_map(str
@@ -6146,7 +6146,7 @@ static void __ref alloc_node_mem_map(str
mem_map = NODE_DATA(0)->node_mem_map;
#if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM)
if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
/branches/18.06.1/target/linux/generic/pending-4.14/150-bridge_allow_receiption_on_disabled_port.patch
@@ -15,7 +15,7 @@
 
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
@@ -239,7 +239,8 @@ static int br_handle_local_finish(struct
@@ -238,7 +238,8 @@ static int br_handle_local_finish(struct
{
struct net_bridge_port *p = br_port_get_rcu(skb->dev);
@@ -25,7 +25,7 @@
BR_INPUT_SKB_CB(skb)->brdev = p->br->dev;
br_pass_frame_up(skb);
@@ -327,6 +328,15 @@ rx_handler_result_t br_handle_frame(stru
@@ -326,6 +327,15 @@ rx_handler_result_t br_handle_frame(stru
forward:
switch (p->state) {
/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/201-extra_optimization.patch
@@ -14,7 +14,7 @@
 
--- a/Makefile
+++ b/Makefile
@@ -654,12 +654,12 @@ KBUILD_CFLAGS += $(call cc-disable-warni
@@ -646,12 +646,12 @@ KBUILD_CFLAGS += $(call cc-disable-warni
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
KBUILD_CFLAGS += $(call cc-option,-Oz,-Os)
/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/300-mips_expose_boot_raw.patch
@@ -9,7 +9,7 @@
---
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1070,9 +1070,6 @@ config FW_ARC
@@ -1066,9 +1066,6 @@ config FW_ARC
config ARCH_MAY_HAVE_PC_FDC
bool
@@ -19,7 +19,7 @@
config CEVT_BCM1480
bool
@@ -2970,6 +2967,18 @@ choice
@@ -2966,6 +2963,18 @@ choice
bool "Extend builtin kernel arguments with bootloader arguments"
endchoice
/branches/18.06.1/target/linux/generic/pending-4.14/304-mips_disable_fpu.patch
@@ -24,7 +24,7 @@
 
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -2894,6 +2894,20 @@ config MIPS_O32_FP64_SUPPORT
@@ -2890,6 +2890,20 @@ config MIPS_O32_FP64_SUPPORT
If unsure, say N.
@@ -47,7 +47,7 @@
select OF
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -315,7 +315,7 @@ OBJCOPYFLAGS += --remove-section=.regin
@@ -319,7 +319,7 @@ OBJCOPYFLAGS += --remove-section=.regin
head-y := arch/mips/kernel/head.o
libs-y += arch/mips/lib/
/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/330-MIPS-kexec-Accept-command-line-parameters-from-users.patch
@@ -184,7 +184,7 @@
/*
* The generic kexec code builds a page list with physical
@@ -124,15 +238,16 @@ machine_kexec(struct kimage *image)
@@ -121,15 +235,16 @@ machine_kexec(struct kimage *image)
/*
* we do not want to be bothered.
*/
/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/412-mtd-partial_eraseblock_unlock.patch
@@ -20,7 +20,7 @@
 
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -357,7 +357,16 @@ static int part_lock(struct mtd_info *mt
@@ -344,7 +344,16 @@ static int part_lock(struct mtd_info *mt
static int part_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
{
struct mtd_part *part = mtd_to_part(mtd);
/branches/18.06.1/target/linux/generic/pending-4.14/450-mtd-spi-nor-allow-NOR-driver-to-write-fewer-bytes-th.patch
@@ -11,7 +11,7 @@
 
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -1377,7 +1377,7 @@ static int spi_nor_write(struct mtd_info
@@ -1371,7 +1371,7 @@ static int spi_nor_write(struct mtd_info
write_enable(nor);
ret = nor->write(nor, addr, page_remain, buf + i);
@@ -20,7 +20,7 @@
goto write_err;
written = ret;
@@ -1386,13 +1386,6 @@ static int spi_nor_write(struct mtd_info
@@ -1380,13 +1380,6 @@ static int spi_nor_write(struct mtd_info
goto write_err;
*retlen += written;
i += written;
/branches/18.06.1/target/linux/generic/pending-4.14/465-m25p80-mx-disable-software-protection.patch
@@ -8,7 +8,7 @@
 
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -2714,6 +2714,7 @@ int spi_nor_scan(struct spi_nor *nor, co
@@ -2708,6 +2708,7 @@ int spi_nor_scan(struct spi_nor *nor, co
if (JEDEC_MFR(info) == SNOR_MFR_ATMEL ||
JEDEC_MFR(info) == SNOR_MFR_INTEL ||
/branches/18.06.1/target/linux/generic/pending-4.14/466-Revert-mtd-spi-nor-fix-Spansion-regressions-aliased-.patch
@@ -17,7 +17,7 @@
 
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -2716,6 +2716,7 @@ int spi_nor_scan(struct spi_nor *nor, co
@@ -2710,6 +2710,7 @@ int spi_nor_scan(struct spi_nor *nor, co
JEDEC_MFR(info) == SNOR_MFR_INTEL ||
JEDEC_MFR(info) == SNOR_MFR_MACRONIX ||
JEDEC_MFR(info) == SNOR_MFR_SST ||
@@ -25,7 +25,7 @@
info->flags & SPI_NOR_HAS_LOCK) {
write_enable(nor);
write_sr(nor, 0);
@@ -2734,7 +2735,8 @@ int spi_nor_scan(struct spi_nor *nor, co
@@ -2728,7 +2729,8 @@ int spi_nor_scan(struct spi_nor *nor, co
/* NOR protection support for STmicro/Micron chips and similar */
if (JEDEC_MFR(info) == SNOR_MFR_MICRON ||
/branches/18.06.1/target/linux/generic/pending-4.14/470-mtd-spi-nor-support-limiting-4K-sectors-support-base.patch
@@ -36,10 +36,10 @@
+
config SPI_ATMEL_QUADSPI
tristate "Atmel Quad SPI Controller"
depends on ARCH_AT91 || (ARM && COMPILE_TEST && !ARCH_EBSA110)
depends on ARCH_AT91 || (ARM && COMPILE_TEST)
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -2561,10 +2561,12 @@ static int spi_nor_select_erase(struct s
@@ -2555,10 +2555,12 @@ static int spi_nor_select_erase(struct s
#ifdef CONFIG_MTD_SPI_NOR_USE_4K_SECTORS
/* prefer "small sector" erase if possible */
/branches/18.06.1/target/linux/generic/pending-4.14/477-mtd-add-spi-nor-add-mx25u3235f.patch
@@ -8,7 +8,7 @@
 
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -1022,6 +1022,7 @@ static const struct flash_info spi_nor_i
@@ -1016,6 +1016,7 @@ static const struct flash_info spi_nor_i
{ "mx25l3205d", INFO(0xc22016, 0, 64 * 1024, 64, SECT_4K) },
{ "mx25l3255e", INFO(0xc29e16, 0, 64 * 1024, 64, SECT_4K) },
{ "mx25l6405d", INFO(0xc22017, 0, 64 * 1024, 128, SECT_4K) },
/branches/18.06.1/target/linux/generic/pending-4.14/478-mtd-spi-nor-Add-support-for-XM25QH64A-and-XM25QH128A.patch
@@ -17,7 +17,7 @@
 
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -1192,6 +1192,10 @@ static const struct flash_info spi_nor_i
@@ -1181,6 +1181,10 @@ static const struct flash_info spi_nor_i
{ "3S400AN", S3AN_INFO(0x1f2400, 256, 264) },
{ "3S700AN", S3AN_INFO(0x1f2500, 512, 264) },
{ "3S1400AN", S3AN_INFO(0x1f2600, 512, 528) },
/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/494-mtd-ubi-add-EOF-marker-support.patch
@@ -50,7 +50,7 @@
break;
--- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h
@@ -785,6 +785,7 @@ struct ubi_attach_info {
@@ -778,6 +778,7 @@ struct ubi_attach_info {
int mean_ec;
uint64_t ec_sum;
int ec_count;
/branches/18.06.1/target/linux/generic/pending-4.14/530-jffs2_make_lzma_available.patch
@@ -244,7 +244,7 @@
+}
--- a/fs/jffs2/super.c
+++ b/fs/jffs2/super.c
@@ -371,14 +371,41 @@ static int __init init_jffs2_fs(void)
@@ -372,14 +372,41 @@ static int __init init_jffs2_fs(void)
BUILD_BUG_ON(sizeof(struct jffs2_raw_inode) != 68);
BUILD_BUG_ON(sizeof(struct jffs2_raw_summary) != 32);
/branches/18.06.1/target/linux/generic/pending-4.14/630-packet_socket_type.patch
@@ -87,7 +87,7 @@
if (!net_eq(dev_net(dev), sock_net(sk)))
goto drop;
@@ -3269,6 +3271,7 @@ static int packet_create(struct net *net
@@ -3260,6 +3262,7 @@ static int packet_create(struct net *net
mutex_init(&po->pg_vec_lock);
po->rollover = NULL;
po->prot_hook.func = packet_rcv;
@@ -95,7 +95,7 @@
if (sock->type == SOCK_PACKET)
po->prot_hook.func = packet_rcv_spkt;
@@ -3882,6 +3885,16 @@ packet_setsockopt(struct socket *sock, i
@@ -3873,6 +3876,16 @@ packet_setsockopt(struct socket *sock, i
po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
return 0;
}
@@ -112,7 +112,7 @@
default:
return -ENOPROTOOPT;
}
@@ -3934,6 +3947,13 @@ static int packet_getsockopt(struct sock
@@ -3925,6 +3938,13 @@ static int packet_getsockopt(struct sock
case PACKET_VNET_HDR:
val = po->has_vnet_hdr;
break;
/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/644-net-pppoe-support-hardware-flow-table-offload.patch
@@ -73,7 +73,7 @@
#include <linux/nsproxy.h>
#include <net/net_namespace.h>
#include <net/netns/generic.h>
@@ -978,8 +983,36 @@ static int pppoe_xmit(struct ppp_channel
@@ -974,8 +979,36 @@ static int pppoe_xmit(struct ppp_channel
return __pppoe_xmit(sk, skb);
}
/branches/18.06.1/target/linux/generic/pending-4.14/655-increase_skb_pad.patch
@@ -9,7 +9,7 @@
 
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2476,7 +2476,7 @@ static inline int pskb_network_may_pull(
@@ -2455,7 +2455,7 @@ static inline int pskb_network_may_pull(
* NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8)
*/
#ifndef NET_SKB_PAD
/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/701-phy_extension.patch
@@ -85,7 +85,7 @@
* @phydev: the phy_device struct
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -909,6 +909,7 @@ void phy_ethtool_ksettings_get(struct ph
@@ -905,6 +905,7 @@ void phy_ethtool_ksettings_get(struct ph
struct ethtool_link_ksettings *cmd);
int phy_ethtool_ksettings_set(struct phy_device *phydev,
const struct ethtool_link_ksettings *cmd);
/branches/18.06.1/target/linux/generic/pending-4.14/703-phy-add-detach-callback-to-struct-phy_driver.patch
@@ -11,7 +11,7 @@
 
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1099,6 +1099,9 @@ void phy_detach(struct phy_device *phyde
@@ -1102,6 +1102,9 @@ void phy_detach(struct phy_device *phyde
struct module *ndev_owner = dev->dev.parent->driver->owner;
struct mii_bus *bus;
/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/735-net-phy-at803x-fix-at8033-sgmii-mode.patch
@@ -21,7 +21,7 @@
#define AT803X_PCS_SMART_EEE_CTRL3 0x805D
#define AT803X_SMART_EEE_CTRL3_LPI_TX_DELAY_SEL_MASK 0x3
@@ -293,6 +294,27 @@ static int at803x_config_init(struct phy
@@ -292,6 +293,27 @@ static int at803x_config_init(struct phy
{
struct at803x_platform_data *pdata;
int ret;
/branches/18.06.1/target/linux/generic/pending-4.14/810-pci_disable_common_quirks.patch
@@ -49,7 +49,7 @@
/*
* Some BIOS implementations leave the Intel GPU interrupts enabled,
* even though no one is handling them (f.e. i915 driver is never loaded).
@@ -3171,6 +3175,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
@@ -3167,6 +3171,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0152, disable_igfx_irq);
/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;
}