* Refreshed patches.
* Deleted 812-pci-dwc-fix-enumeration.patch (was accepted upstream)
Compile-tested: ramips/mt7621, x86/64
Run-tested: ramips/mt7621, x86/64
Signed-off-by: Stijn Segers <foss@volatilesystems.org>
LINUX_VERSION-3.18 = .71
LINUX_VERSION-4.4 = .121
LINUX_VERSION-4.9 = .87
-LINUX_VERSION-4.14 = .25
+LINUX_VERSION-4.14 = .27
LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
LINUX_KERNEL_HASH-4.4.121 = 44a88268b5088dc326b30c9b9133ac35a9a200b636b7268d08f32abeae6ca729
LINUX_KERNEL_HASH-4.9.87 = 7ac9f6af69dc5a7e38bf35cc3fa889e3a4b22504a85f57fdc87734a8abe4c917
-LINUX_KERNEL_HASH-4.14.25 = 6dcfbf79c068e51c1b06edb1ce58ddc9ca351f862bf2a144e96106ec3f21e587
+LINUX_KERNEL_HASH-4.14.27 = 0911a449c71a06c7232ece07dfcc041bd07efaf7e67799b9e2d0cf4bd9a028ea
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
cur_offset = slave->offset + slave->mtd.size;
}
-@@ -1162,7 +1161,9 @@ int parse_mtd_partitions(struct mtd_info
- types = types_of;
- }
+@@ -1134,7 +1133,9 @@ static int mtd_part_of_parse(struct mtd_
+ const char *fixed = "fixed-partitions";
+ int ret, err = 0;
- np = of_get_child_by_name(mtd_get_of_node(master), "partitions");
+ np = mtd_get_of_node(master);
of_property_for_each_string(np, "compatible", prop, compat) {
parser = mtd_part_get_compatible_parser(compat);
if (!parser)
-@@ -1178,8 +1179,12 @@ int parse_mtd_partitions(struct mtd_info
+@@ -1206,8 +1207,12 @@ int parse_mtd_partitions(struct mtd_info
+ types = types_of;
}
- of_node_put(np);
- if (!types)
+ if (!types) {
+ }
for ( ; *types; types++) {
- pr_debug("%s: parsing partitions %s\n", master->name, *types);
+ /*
--- a/Makefile
+++ b/Makefile
-@@ -410,8 +410,8 @@ KERNELRELEASE = $(shell cat include/conf
- KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
+@@ -433,8 +433,8 @@ KBUILD_CFLAGS_MODULE := -DMODULE
+ KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
+ GCC_PLUGINS_CFLAGS :=
- export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
-export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
-export CPP AR NM STRIP OBJCOPY OBJDUMP HOSTLDFLAGS HOST_LOADLIBES
+export ARCH SRCARCH SUBARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD
.saveroute = nf_ip_saveroute,
--- a/net/ipv6/netfilter.c
+++ b/net/ipv6/netfilter.c
-@@ -192,12 +192,12 @@ static __sum16 nf_ip6_checksum_partial(s
+@@ -193,12 +193,12 @@ static __sum16 nf_ip6_checksum_partial(s
static const struct nf_ipv6_ops ipv6ops = {
.chk_addr = ipv6_chk_addr,
.route_input = ip6_route_input,
.reroute = nf_ip_reroute,
--- a/net/ipv6/netfilter.c
+++ b/net/ipv6/netfilter.c
-@@ -190,15 +190,15 @@ static __sum16 nf_ip6_checksum_partial(s
+@@ -191,15 +191,15 @@ static __sum16 nf_ip6_checksum_partial(s
};
static const struct nf_ipv6_ops ipv6ops = {
};
--- a/net/ipv6/netfilter.c
+++ b/net/ipv6/netfilter.c
-@@ -68,31 +68,6 @@ int ip6_route_me_harder(struct net *net,
+@@ -69,31 +69,6 @@ int ip6_route_me_harder(struct net *net,
}
EXPORT_SYMBOL(ip6_route_me_harder);
static int nf_ip6_reroute(struct net *net, struct sk_buff *skb,
const struct nf_queue_entry *entry)
{
-@@ -200,7 +175,6 @@ static const struct nf_ipv6_ops ipv6ops
+@@ -201,7 +176,6 @@ static const struct nf_ipv6_ops ipv6ops
static const struct nf_afinfo nf_ip6_afinfo = {
.family = AF_INET6,
.route = nf_ip6_route,
};
--- a/net/ipv6/netfilter.c
+++ b/net/ipv6/netfilter.c
-@@ -170,11 +170,11 @@ static const struct nf_ipv6_ops ipv6ops
+@@ -171,11 +171,11 @@ static const struct nf_ipv6_ops ipv6ops
.fragment = ip6_fragment,
.checksum = nf_ip6_checksum,
.checksum_partial = nf_ip6_checksum_partial,
--- a/net/ipv6/netfilter.c
+++ b/net/ipv6/netfilter.c
-@@ -68,7 +68,7 @@ int ip6_route_me_harder(struct net *net,
+@@ -69,7 +69,7 @@ int ip6_route_me_harder(struct net *net,
}
EXPORT_SYMBOL(ip6_route_me_harder);
const struct nf_queue_entry *entry)
{
struct ip6_rt_info *rt_info = nf_queue_entry_reroute(entry);
-@@ -78,7 +78,7 @@ static int nf_ip6_reroute(struct net *ne
+@@ -79,7 +79,7 @@ static int nf_ip6_reroute(struct net *ne
if (!ipv6_addr_equal(&iph->daddr, &rt_info->daddr) ||
!ipv6_addr_equal(&iph->saddr, &rt_info->saddr) ||
skb->mark != rt_info->mark)
}
return 0;
}
-@@ -171,11 +171,11 @@ static const struct nf_ipv6_ops ipv6ops
+@@ -172,11 +172,11 @@ static const struct nf_ipv6_ops ipv6ops
.checksum = nf_ip6_checksum,
.checksum_partial = nf_ip6_checksum_partial,
.route = nf_ip6_route,
static int __init ipv4_netfilter_init(void)
--- a/net/ipv6/netfilter.c
+++ b/net/ipv6/netfilter.c
-@@ -176,7 +176,6 @@ static const struct nf_ipv6_ops ipv6ops
+@@ -177,7 +177,6 @@ static const struct nf_ipv6_ops ipv6ops
static const struct nf_afinfo nf_ip6_afinfo = {
.family = AF_INET6,
-subsys_initcall(ipv4_netfilter_init);
--- a/net/ipv6/netfilter.c
+++ b/net/ipv6/netfilter.c
-@@ -174,14 +174,10 @@ static const struct nf_ipv6_ops ipv6ops
+@@ -175,14 +175,10 @@ static const struct nf_ipv6_ops ipv6ops
.reroute = nf_ip6_reroute,
};
}
/* This can be called from inet6_init() on errors, so it cannot
-@@ -190,5 +186,4 @@ int __init ipv6_netfilter_init(void)
+@@ -191,5 +187,4 @@ int __init ipv6_netfilter_init(void)
void ipv6_netfilter_fini(void)
{
RCU_INIT_POINTER(nf_ipv6_ops, NULL);
--- a/net/ipv6/netfilter/nf_nat_l3proto_ipv6.c
+++ b/net/ipv6/netfilter/nf_nat_l3proto_ipv6.c
-@@ -368,10 +368,6 @@ nf_nat_ipv6_out(void *priv, struct sk_bu
+@@ -372,10 +372,6 @@ nf_nat_ipv6_out(void *priv, struct sk_bu
#endif
unsigned int ret;
ret = nf_nat_ipv6_fn(priv, skb, state, do_chain);
#ifdef CONFIG_XFRM
if (ret != NF_DROP && ret != NF_STOLEN &&
-@@ -407,10 +403,6 @@ nf_nat_ipv6_local_fn(void *priv, struct
+@@ -411,10 +407,6 @@ nf_nat_ipv6_local_fn(void *priv, struct
unsigned int ret;
int err;
--- a/Makefile
+++ b/Makefile
-@@ -402,7 +402,7 @@ KBUILD_AFLAGS_KERNEL :=
+@@ -430,7 +430,7 @@ KBUILD_AFLAGS_KERNEL :=
KBUILD_CFLAGS_KERNEL :=
KBUILD_AFLAGS_MODULE := -DMODULE
KBUILD_CFLAGS_MODULE := -DMODULE
+KBUILD_LDFLAGS_MODULE = -T $(srctree)/scripts/module-common.lds $(if $(CONFIG_PROFILING),,-s)
GCC_PLUGINS_CFLAGS :=
- # Read KERNELRELEASE from include/config/kernel.release (if it exists)
+ export ARCH SRCARCH SUBARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD
--- a/Makefile
+++ b/Makefile
-@@ -1213,7 +1213,6 @@ all: modules
+@@ -1224,7 +1224,6 @@ all: modules
PHONY += modules
modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
@$(kecho) ' Building modules, stage 2.';
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
-@@ -1242,7 +1241,6 @@ _modinst_:
+@@ -1253,7 +1252,6 @@ _modinst_:
rm -f $(MODLIB)/build ; \
ln -s $(CURDIR) $(MODLIB)/build ; \
fi
--- a/Makefile
+++ b/Makefile
-@@ -405,6 +405,11 @@ KBUILD_CFLAGS_MODULE := -DMODULE
- KBUILD_LDFLAGS_MODULE = -T $(srctree)/scripts/module-common.lds $(if $(CONFIG_PROFILING),,-s)
- GCC_PLUGINS_CFLAGS :=
+@@ -272,6 +272,11 @@ else
+ scripts/Kbuild.include: ;
+ include scripts/Kbuild.include
+ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
+KBUILD_CFLAGS_KERNEL += $(call cc-option,-ffunction-sections,)
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
-@@ -785,11 +790,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
+@@ -787,11 +792,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once)
endif
__used \
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
-@@ -426,7 +426,7 @@ targets += $(extra-y) $(MAKECMDGOALS) $(
+@@ -434,7 +434,7 @@ targets += $(extra-y) $(MAKECMDGOALS) $(
# Linker scripts preprocessor (.lds.S -> .lds)
# ---------------------------------------------------------------------------
quiet_cmd_cpp_lds_S = LDS $@
--- a/Makefile
+++ b/Makefile
-@@ -639,12 +639,12 @@ KBUILD_CFLAGS += $(call cc-disable-warni
+@@ -650,12 +650,12 @@ KBUILD_CFLAGS += $(call cc-disable-warni
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
KBUILD_CFLAGS += $(call cc-option,-Oz,-Os)
static bool
ip_checkentry(const struct ipt_ip *ip)
{
-@@ -532,6 +558,8 @@ find_check_entry(struct ipt_entry *e, st
+@@ -537,6 +563,8 @@ find_check_entry(struct ipt_entry *e, st
struct xt_mtchk_param mtpar;
struct xt_entry_match *ematch;
if (!xt_percpu_counter_alloc(alloc_state, &e->counters))
return -ENOMEM;
-@@ -812,6 +840,7 @@ copy_entries_to_user(unsigned int total_
+@@ -817,6 +845,7 @@ copy_entries_to_user(unsigned int total_
const struct xt_table_info *private = table->private;
int ret = 0;
const void *loc_cpu_entry;
counters = alloc_counters(table);
if (IS_ERR(counters))
-@@ -839,6 +868,14 @@ copy_entries_to_user(unsigned int total_
+@@ -844,6 +873,14 @@ copy_entries_to_user(unsigned int total_
goto free_counters;
}
for (i = sizeof(struct ipt_entry);
i < e->target_offset;
i += m->u.match_size) {
-@@ -1219,12 +1256,15 @@ compat_copy_entry_to_user(struct ipt_ent
+@@ -1224,12 +1261,15 @@ compat_copy_entry_to_user(struct ipt_ent
compat_uint_t origsize;
const struct xt_entry_match *ematch;
int ret = 0;
+++ /dev/null
-From patchwork Tue Jan 9 14:42:21 2018
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Subject: PCI: dwc: fix enumeration end when reaching root subordinate
-From: Koen Vandeputte <koen.vandeputte@ncentric.com>
-X-Patchwork-Id: 10152443
-Message-Id: <1515508941-20055-1-git-send-email-koen.vandeputte@ncentric.com>
-To: linux-pci@vger.kernel.org
-Cc: bhelgaas@google.com, lorenzo.pieralisi@arm.com,
- Joao.Pinto@synopsys.com, jingoohan1@gmail.com, niklas.cassel@axis.com,
- Koen Vandeputte <koen.vandeputte@ncentric.com>,
- Mika Westerberg <mika.westerberg@linux.intel.com>
-Date: Tue, 9 Jan 2018 15:42:21 +0100
-
-The subordinate value indicates the highest bus number which can be
-reached downstream though a certain device.
-
-Commit a20c7f36bd3d ("PCI: Do not allocate more buses than available in
-parent")
-ensures that downstream devices cannot assign busnumbers higher than the
-upstream device subordinate number, which was indeed illogical.
-
-By default, dw_pcie_setup_rc() inits the Root Complex subordinate to a
-value of 0x01.
-
-Due to this combined with above commit, enumeration stops digging deeper
-downstream as soon as bus num 0x01 has been assigned, which is always
-the case for a bridge device.
-
-This results in all devices behind a bridge bus to remain undetected, as
-these would be connected to bus 0x02 or higher.
-
-Fix this by initializing the RC to a subordinate value of 0xff, meaning
-that all busses [0x00-0xff] are reachable through this RC.
-
-Fixes: a20c7f36bd3d ("PCI: Do not allocate more buses than available in
-parent")
-Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
-Tested-by: Niklas Cassel <niklas.cassel@axis.com>
-Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
----
-
-Will send separate patches to stable as this file got moved/renamed
-
-
- drivers/pci/dwc/pcie-designware-host.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/pci/dwc/pcie-designware-host.c
-+++ b/drivers/pci/dwc/pcie-designware-host.c
-@@ -607,7 +607,7 @@ void dw_pcie_setup_rc(struct pcie_port *
- /* setup bus numbers */
- val = dw_pcie_readl_dbi(pci, PCI_PRIMARY_BUS);
- val &= 0xff000000;
-- val |= 0x00010100;
-+ val |= 0x00ff0100;
- dw_pcie_writel_dbi(pci, PCI_PRIMARY_BUS, val);
-
- /* setup command register */