OpenWrt

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 2  →  ?path2? @ 3
/branches/18.06.1/target/linux/generic/pending-4.9/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
@@ -5922,7 +5922,7 @@ static void __ref alloc_node_mem_map(str
@@ -5932,7 +5932,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.9/170-MIPS-PCI-add-controllers-before-the-specified-head.patch
@@ -19,7 +19,7 @@
 
--- a/arch/mips/pci/pci-legacy.c
+++ b/arch/mips/pci/pci-legacy.c
@@ -194,7 +194,7 @@ void register_pci_controller(struct pci_
@@ -190,7 +190,7 @@ void register_pci_controller(struct pci_
}
INIT_LIST_HEAD(&hose->list);
/branches/18.06.1/target/linux/generic/pending-4.9/190-2-5-e1000e-Fix-wrong-comment-related-to-link-detection.patch
@@ -23,7 +23,7 @@
 
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -5067,7 +5067,7 @@ static bool e1000e_has_link(struct e1000
@@ -5078,7 +5078,7 @@ static bool e1000e_has_link(struct e1000
/* get_link_status is set on LSC (link status) interrupt or
* Rx sequence error interrupt. get_link_status will stay
@@ -32,7 +32,7 @@
* for copper adapters ONLY
*/
switch (hw->phy.media_type) {
@@ -5085,7 +5085,7 @@ static bool e1000e_has_link(struct e1000
@@ -5096,7 +5096,7 @@ static bool e1000e_has_link(struct e1000
break;
case e1000_media_type_internal_serdes:
ret_val = hw->mac.ops.check_for_link(hw);
/branches/18.06.1/target/linux/generic/pending-4.9/201-extra_optimization.patch
@@ -14,12 +14,12 @@
 
--- a/Makefile
+++ b/Makefile
@@ -680,12 +680,12 @@ endif
@@ -643,12 +643,12 @@ KBUILD_CFLAGS += $(call cc-option,-fdata
endif
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
KBUILD_CFLAGS += $(call cc-option,-Oz,-Os)
-KBUILD_CFLAGS += $(call cc-disable-warning,maybe-uninitialized,)
+KBUILD_CFLAGS += $(call cc-disable-warning,maybe-uninitialized,) $(EXTRA_OPTIMIZATION)
-KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,)
+KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,) $(EXTRA_OPTIMIZATION)
else
ifdef CONFIG_PROFILE_ALL_BRANCHES
-KBUILD_CFLAGS += -O2 $(call cc-disable-warning,maybe-uninitialized,)
/branches/18.06.1/target/linux/generic/pending-4.9/300-mips_expose_boot_raw.patch
@@ -9,7 +9,7 @@
---
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1068,9 +1068,6 @@ config FW_ARC
@@ -1065,9 +1065,6 @@ config FW_ARC
config ARCH_MAY_HAVE_PC_FDC
bool
@@ -19,7 +19,7 @@
config CEVT_BCM1480
bool
@@ -2967,6 +2964,18 @@ choice
@@ -2964,6 +2961,18 @@ choice
bool "Extend builtin kernel arguments with bootloader arguments"
endchoice
/branches/18.06.1/target/linux/generic/pending-4.9/304-mips_disable_fpu.patch
@@ -24,7 +24,7 @@
 
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -2891,6 +2891,20 @@ config MIPS_O32_FP64_SUPPORT
@@ -2888,6 +2888,20 @@ config MIPS_O32_FP64_SUPPORT
If unsure, say N.
/branches/18.06.1/target/linux/generic/pending-4.9/330-MIPS-kexec-Accept-command-line-parameters-from-users.patch
@@ -181,7 +181,7 @@
/*
* The generic kexec code builds a page list with physical
@@ -102,15 +217,16 @@ machine_kexec(struct kimage *image)
@@ -99,15 +214,16 @@ machine_kexec(struct kimage *image)
/*
* we do not want to be bothered.
*/
/branches/18.06.1/target/linux/generic/pending-4.9/341-MIPS-mm-remove-no-op-dma_map_ops-where-possible.patch
@@ -30,7 +30,7 @@
select HAVE_PCSPKR_PLATFORM
select IRQ_MIPS_CPU
select I8253
@@ -1129,6 +1131,9 @@ config DMA_NONCOHERENT
@@ -1126,6 +1128,9 @@ config DMA_NONCOHERENT
bool
select NEED_DMA_MAP_STATE
@@ -40,7 +40,7 @@
config NEED_DMA_MAP_STATE
bool
@@ -1653,6 +1658,7 @@ config CPU_R10000
@@ -1650,6 +1655,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.
@@ -1898,9 +1904,11 @@ config SYS_HAS_CPU_MIPS32_R3_5
@@ -1895,9 +1901,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
@@ -1910,6 +1918,7 @@ config SYS_HAS_CPU_MIPS64_R2
@@ -1907,6 +1915,7 @@ config SYS_HAS_CPU_MIPS64_R2
bool
config SYS_HAS_CPU_MIPS64_R6
/branches/18.06.1/target/linux/generic/pending-4.9/400-mtd-add-rootfs-split-support.patch
@@ -68,7 +68,7 @@
mtd_add_partition_attrs(new);
@@ -728,6 +733,29 @@ int mtd_del_partition(struct mtd_info *m
@@ -728,6 +733,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
@@ -759,6 +787,7 @@ int add_mtd_partitions(struct mtd_info *
@@ -759,6 +793,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.9/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
@@ -733,6 +737,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
@@ -1109,6 +1143,61 @@ void mtd_part_parser_cleanup(struct mtd_
@@ -1115,6 +1115,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.9/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
@@ -775,6 +775,7 @@ run_parsers_by_type(struct mtd_part *sla
@@ -733,6 +733,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
@@ -741,6 +771,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)
@@ -784,6 +785,12 @@ static void mtd_partition_split(struct m
void __weak arch_split_mtd_part(struct mtd_info *master, const char *name,
@@ -755,6 +786,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.9/404-mtd-add-more-helper-functions.patch
@@ -11,8 +11,26 @@
 
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -1222,6 +1222,24 @@ int mtd_is_partition(const struct mtd_in
@@ -763,6 +763,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
@@ -1225,6 +1236,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)
@@ -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.9/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);
@@ -246,13 +248,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;
}
@@ -260,6 +310,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;
@@ -566,19 +635,22 @@ static struct mtd_part *allocate_partiti
@@ -562,19 +631,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 */
/branches/18.06.1/target/linux/generic/pending-4.9/412-mtd-partial_eraseblock_unlock.patch
@@ -20,7 +20,7 @@
 
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -348,7 +348,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.9/420-mtd-redboot_space.patch
@@ -11,7 +11,7 @@
 
--- a/drivers/mtd/redboot.c
+++ b/drivers/mtd/redboot.c
@@ -266,14 +266,21 @@ static int parse_redboot_partitions(stru
@@ -265,14 +265,21 @@ static int parse_redboot_partitions(stru
#endif
names += strlen(names)+1;
/branches/18.06.1/target/linux/generic/pending-4.9/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
@@ -1601,6 +1601,7 @@ int spi_nor_scan(struct spi_nor *nor, co
@@ -1595,6 +1595,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.9/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
@@ -1603,6 +1603,7 @@ int spi_nor_scan(struct spi_nor *nor, co
@@ -1597,6 +1597,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);
@@ -1621,7 +1622,8 @@ int spi_nor_scan(struct spi_nor *nor, co
@@ -1615,7 +1616,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.9/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
@@ -1648,10 +1648,12 @@ int spi_nor_scan(struct spi_nor *nor, co
@@ -1642,10 +1642,12 @@ int spi_nor_scan(struct spi_nor *nor, co
#ifdef CONFIG_MTD_SPI_NOR_USE_4K_SECTORS
/* prefer "small sector" erase if possible */
/branches/18.06.1/target/linux/generic/pending-4.9/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
@@ -1020,6 +1020,7 @@ static const struct flash_info spi_nor_i
@@ -1014,6 +1014,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.9/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
@@ -1177,6 +1177,10 @@ static const struct flash_info spi_nor_i
@@ -1166,6 +1166,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.9/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
@@ -1226,6 +1226,73 @@ static struct mtd_info * __init open_mtd
@@ -1226,6 +1226,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;
@@ -1309,6 +1376,12 @@ static int __init ubi_init(void)
@@ -1309,6 +1352,12 @@ static int __init ubi_init(void)
}
}
/branches/18.06.1/target/linux/generic/pending-4.9/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.9/630-packet_socket_type.patch
@@ -87,7 +87,7 @@
if (!net_eq(dev_net(dev), sock_net(sk)))
goto drop;
@@ -3266,6 +3268,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;
@@ -3879,6 +3882,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;
}
@@ -3931,6 +3944,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.9/655-increase_skb_pad.patch
@@ -9,7 +9,7 @@
 
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2303,7 +2303,7 @@ static inline int pskb_network_may_pull(
@@ -2298,7 +2298,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.9/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);
@@ -962,6 +1101,7 @@ static void init_tel_txopt(struct ipv6_t
@@ -961,6 +1100,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
@@ -1300,6 +1440,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
@@ -1298,6 +1438,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;
@@ -1362,6 +1503,18 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
@@ -1356,6 +1497,18 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
fl6.flowi6_mark = skb->mark;
}
@@ -327,7 +327,7 @@
if (iptunnel_handle_offloads(skb, SKB_GSO_IPXIP6))
return -1;
@@ -1489,6 +1642,14 @@ ip6_tnl_change(struct ip6_tnl *t, const
@@ -1483,6 +1636,14 @@ ip6_tnl_change(struct ip6_tnl *t, const
t->parms.flowinfo = p->flowinfo;
t->parms.link = p->link;
t->parms.proto = p->proto;
@@ -342,7 +342,7 @@
dst_cache_reset(&t->dst_cache);
ip6_tnl_link_config(t);
return 0;
@@ -1527,6 +1688,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_
@@ -1521,6 +1682,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));
}
@@ -1904,6 +2066,15 @@ static int ip6_tnl_validate(struct nlatt
@@ -1898,6 +2060,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)
{
@@ -1938,6 +2109,46 @@ static void ip6_tnl_netlink_parms(struct
@@ -1932,6 +2103,46 @@ static void ip6_tnl_netlink_parms(struct
if (data[IFLA_IPTUN_COLLECT_METADATA])
parms->collect_md = true;
@@ -413,7 +413,7 @@
}
static bool ip6_tnl_netlink_encap_parms(struct nlattr *data[],
@@ -2051,6 +2262,12 @@ static void ip6_tnl_dellink(struct net_d
@@ -2045,6 +2256,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) +
@@ -2078,6 +2295,24 @@ static size_t ip6_tnl_get_size(const str
@@ -2072,6 +2289,24 @@ static size_t ip6_tnl_get_size(const str
nla_total_size(2) +
/* IFLA_IPTUN_COLLECT_METADATA */
nla_total_size(0) +
@@ -451,7 +451,7 @@
0;
}
@@ -2085,6 +2320,9 @@ static int ip6_tnl_fill_info(struct sk_b
@@ -2079,6 +2314,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) ||
@@ -2093,9 +2331,27 @@ static int ip6_tnl_fill_info(struct sk_b
@@ -2087,9 +2325,27 @@ static int ip6_tnl_fill_info(struct sk_b
nla_put_u8(skb, IFLA_IPTUN_ENCAP_LIMIT, parm->encap_limit) ||
nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) ||
nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags) ||
@@ -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) ||
@@ -2133,6 +2389,7 @@ static const struct nla_policy ip6_tnl_p
@@ -2127,6 +2383,7 @@ static const struct nla_policy ip6_tnl_p
[IFLA_IPTUN_ENCAP_SPORT] = { .type = NLA_U16 },
[IFLA_IPTUN_ENCAP_DPORT] = { .type = NLA_U16 },
[IFLA_IPTUN_COLLECT_METADATA] = { .type = NLA_FLAG },
/branches/18.06.1/target/linux/generic/pending-4.9/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
@@ -2406,6 +2406,7 @@ static const char *const rtn_type_names[
@@ -2396,6 +2396,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
@@ -159,6 +159,7 @@ static int ipmr_rule_action(struct fib_r
@@ -157,6 +157,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
@@ -169,6 +169,8 @@ static int ip6mr_rule_action(struct fib_
@@ -167,6 +167,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),
@@ -1970,6 +1987,11 @@ static struct rt6_info *ip6_route_info_c
@@ -1967,6 +1984,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:
@@ -2613,6 +2635,17 @@ static int ip6_pkt_prohibit_out(struct n
@@ -2610,6 +2632,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.
*/
@@ -2850,7 +2883,8 @@ static int rtm_to_fib6_config(struct sk_
@@ -2847,7 +2880,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)
@@ -3222,6 +3256,9 @@ static int rt6_fill_node(struct net *net
@@ -3219,6 +3253,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;
@@ -3498,6 +3535,8 @@ static int ip6_route_dev_notify(struct n
@@ -3495,6 +3532,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
@@ -3509,6 +3548,7 @@ static int ip6_route_dev_notify(struct n
@@ -3506,6 +3545,7 @@ static int ip6_route_dev_notify(struct n
in6_dev_put(net->ipv6.ip6_null_entry->rt6i_idev);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
in6_dev_put(net->ipv6.ip6_prohibit_entry->rt6i_idev);
@@ -208,7 +208,7 @@
in6_dev_put(net->ipv6.ip6_blk_hole_entry->rt6i_idev);
#endif
}
@@ -3724,6 +3764,17 @@ static int __net_init ip6_route_net_init
@@ -3721,6 +3761,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;
@@ -3742,6 +3793,8 @@ out:
@@ -3739,6 +3790,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:
@@ -3759,6 +3812,7 @@ static void __net_exit ip6_route_net_exi
@@ -3756,6 +3809,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);
}
@@ -3832,6 +3886,9 @@ void __init ip6_route_init_special_entri
@@ -3829,6 +3883,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.9/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
@@ -11,7 +11,7 @@
 
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1752,6 +1752,8 @@ struct net_device {
@@ -1749,6 +1749,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
@@ -747,7 +747,8 @@ struct sk_buff {
@@ -742,7 +742,8 @@ struct sk_buff {
#ifdef CONFIG_NET_SWITCHDEV
__u8 offload_fwd_mark:1;
#endif
@@ -34,7 +34,7 @@
__u16 tc_index; /* traffic control index */
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4572,6 +4572,9 @@ static enum gro_result dev_gro_receive(s
@@ -4550,6 +4550,9 @@ static enum gro_result dev_gro_receive(s
enum gro_result ret;
int grow;
@@ -44,7 +44,7 @@
if (!(skb->dev->features & NETIF_F_GRO))
goto normal;
@@ -5864,6 +5867,48 @@ static void __netdev_adjacent_dev_unlink
@@ -5838,6 +5841,48 @@ static void __netdev_adjacent_dev_unlink
&upper_dev->adj_list.lower);
}
@@ -93,7 +93,7 @@
static int __netdev_upper_dev_link(struct net_device *dev,
struct net_device *upper_dev, bool master,
void *upper_priv, void *upper_info)
@@ -5936,6 +5981,7 @@ static int __netdev_upper_dev_link(struc
@@ -5910,6 +5955,7 @@ static int __netdev_upper_dev_link(struc
goto rollback_lower_mesh;
}
@@ -101,7 +101,7 @@
ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev,
&changeupper_info.info);
ret = notifier_to_errno(ret);
@@ -6062,6 +6108,7 @@ void netdev_upper_dev_unlink(struct net_
@@ -6036,6 +6082,7 @@ void netdev_upper_dev_unlink(struct net_
list_for_each_entry(i, &upper_dev->all_adj_list.upper, list)
__netdev_adjacent_dev_unlink(dev, i->dev, i->ref_nr);
@@ -109,7 +109,7 @@
call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev,
&changeupper_info.info);
}
@@ -6664,6 +6711,7 @@ int dev_set_mac_address(struct net_devic
@@ -6636,6 +6683,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.9/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
@@ -998,6 +998,9 @@ void phy_detach(struct phy_device *phyde
@@ -1001,6 +1001,9 @@ void phy_detach(struct phy_device *phyde
struct mii_bus *bus;
int i;
/branches/18.06.1/target/linux/generic/pending-4.9/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).
@@ -3132,6 +3136,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
@@ -3128,6 +3132,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.9/834-ledtrig-libata.patch
@@ -65,7 +65,7 @@
/**
* ata_build_rw_tf - Build ATA taskfile for given read/write request
* @tf: Target ATA taskfile
@@ -4995,6 +5008,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
@@ -4994,6 +5007,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;
@@ -5896,6 +5912,9 @@ struct ata_port *ata_port_alloc(struct a
@@ -5895,6 +5911,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;
@@ -5917,6 +5936,12 @@ static void ata_host_release(struct devi
@@ -5916,6 +5935,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;
}
@@ -6363,7 +6388,23 @@ int ata_host_register(struct ata_host *h
@@ -6362,7 +6387,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;
}
/branches/18.06.1/target/linux/generic/pending-4.9/890-uart_optional_sysrq.patch
@@ -26,7 +26,7 @@
{
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -410,6 +410,11 @@ config MAGIC_SYSRQ_DEFAULT_ENABLE
@@ -396,6 +396,11 @@ config MAGIC_SYSRQ_DEFAULT_ENABLE
This may be set to 1 or 0 to enable or disable them all, or
to a bitmask as described in Documentation/sysrq.txt.