| 1234567891011121314151617181920212223242526272829303132333435363738 |
- From: Sergio Paracuellos <[email protected]>
- Date: Tue, 7 Dec 2021 11:49:20 +0100
- Subject: [PATCH] PCI: Let pcibios_root_bridge_prepare() access bridge->windows
- When pci_register_host_bridge() is called, bridge->windows are already
- available. However these windows are being moved temporarily from there.
- To let pcibios_root_bridge_prepare() have access to these windows, move the
- windows movement after calling this function. This is useful for the MIPS
- ralink mt7621 platform so it can set up I/O coherence units and avoid
- custom MIPS code in the mt7621 PCIe controller driver.
- Link: https://lore.kernel.org/r/[email protected]
- Signed-off-by: Sergio Paracuellos <[email protected]>
- Signed-off-by: Bjorn Helgaas <[email protected]>
- Acked-by: Arnd Bergmann <[email protected]>
- ---
- --- a/drivers/pci/probe.c
- +++ b/drivers/pci/probe.c
- @@ -898,8 +898,6 @@ static int pci_register_host_bridge(stru
-
- bridge->bus = bus;
-
- - /* Temporarily move resources off the list */
- - list_splice_init(&bridge->windows, &resources);
- bus->sysdata = bridge->sysdata;
- bus->ops = bridge->ops;
- bus->number = bus->busn_res.start = bridge->busnr;
- @@ -925,6 +923,8 @@ static int pci_register_host_bridge(stru
- if (err)
- goto free;
-
- + /* Temporarily move resources off the list */
- + list_splice_init(&bridge->windows, &resources);
- err = device_add(&bridge->dev);
- if (err) {
- put_device(&bridge->dev);
|