aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2017-03-10 22:46:30 +0100
committerMathias Kresin <dev@kresin.me>2017-03-24 08:09:39 +0100
commite4c53c751e5f928ee8d6494981e691f6da8ecd06 (patch)
tree801c1c36c63f73f14a629258327ab11b12f08de4 /target/linux/lantiq
parent2f8d086baa83dd36859fc4af83e5c8db885fd850 (diff)
downloadupstream-e4c53c751e5f928ee8d6494981e691f6da8ecd06.tar.gz
upstream-e4c53c751e5f928ee8d6494981e691f6da8ecd06.tar.bz2
upstream-e4c53c751e5f928ee8d6494981e691f6da8ecd06.zip
lantiq: fix pci with kernel 4.9
Commit 23dac14d058f ("MIPS: PCI: Use struct list_head lists") changed the controller list from reverse to straight order. Use the last entry in the controller list to get the fist conroller of the system. Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux/lantiq')
-rw-r--r--target/linux/lantiq/patches-4.9/0001-MIPS-lantiq-add-pcie-driver.patch5
1 files changed, 3 insertions, 2 deletions
diff --git a/target/linux/lantiq/patches-4.9/0001-MIPS-lantiq-add-pcie-driver.patch b/target/linux/lantiq/patches-4.9/0001-MIPS-lantiq-add-pcie-driver.patch
index 59d29d838b..16d3f558bc 100644
--- a/target/linux/lantiq/patches-4.9/0001-MIPS-lantiq-add-pcie-driver.patch
+++ b/target/linux/lantiq/patches-4.9/0001-MIPS-lantiq-add-pcie-driver.patch
@@ -4143,7 +4143,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+
--- a/arch/mips/pci/pci-legacy.c
+++ b/arch/mips/pci/pci-legacy.c
-@@ -300,3 +300,30 @@ char *__init pcibios_setup(char *str)
+@@ -300,3 +300,31 @@ char *__init pcibios_setup(char *str)
return pcibios_plat_setup(str);
return str;
}
@@ -4164,7 +4164,8 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ int bus_nr = 0;
+ struct pci_controller *hose;
+
-+ hose = list_first_entry_or_null(&controllers, struct pci_controller, list);
++ if (!list_empty(&controllers))
++ hose = list_last_entry(&controllers, struct pci_controller, list);
+
+ if (hose != NULL) {
+ if (hose->bus != NULL) {