Upstream commit "PCI: Do not allocate more buses than available in parent" limits the amount of busses being allocated upon scanning the PCIe bus. [1]
This commit was introduced in kernel 4.9.71 This breaks PCIe scanning on the Gateworks Ventana, causing no devices to be found. Temp fix this by basically reverting the upstream commit. [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux- stable.git/commit/?h=v4.9.74&id=9a4bf05126f42c2632729ab0da503021d74ed454 Signed-off-by: Koen Vandeputte <koen.vandepu...@ncentric.com> --- .../imx6/patches-4.9/220-fix-pcie-scanning.patch | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 target/linux/imx6/patches-4.9/220-fix-pcie-scanning.patch diff --git a/target/linux/imx6/patches-4.9/220-fix-pcie-scanning.patch b/target/linux/imx6/patches-4.9/220-fix-pcie-scanning.patch new file mode 100644 index 0000000..351ab30 --- /dev/null +++ b/target/linux/imx6/patches-4.9/220-fix-pcie-scanning.patch @@ -0,0 +1,32 @@ +Upstream commit ("PCI: Do not allocate more buses than available in parent") +limits the amount of busses being allocated upon scanning the PCIe bus. + +This breaks PCIe scanning on the Gateworks Ventana, causing no devices to be found. + +Temp fix this by basically reverting the upstream commit. + +https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?h=v4.9.74&id=9a4bf05126f42c2632729ab0da503021d74ed454 + + +--- a/drivers/pci/probe.c ++++ b/drivers/pci/probe.c +@@ -932,8 +932,7 @@ int pci_scan_bridge(struct pci_bus *bus, + child = pci_add_new_bus(bus, dev, max+1); + if (!child) + goto out; +- pci_bus_insert_busn_res(child, max+1, +- bus->busn_res.end); ++ pci_bus_insert_busn_res(child, max+1, 0xff); + } + max++; + buses = (buses & 0xff000000) +@@ -2138,9 +2137,6 @@ unsigned int pci_scan_child_bus(struct p + if (max - bus->busn_res.start < pci_hotplug_bus_size - 1) + max = bus->busn_res.start + pci_hotplug_bus_size - 1; + +- /* Do not allocate more buses than we have room left */ +- if (max > bus->busn_res.end) +- max = bus->busn_res.end; + } + + /* -- 2.7.4 _______________________________________________ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev