PCI: xgene: Allow config access to Root Port even when link is down
authorDuc Dang <dhdang@apm.com>
Thu, 18 Jun 2015 18:45:39 +0000 (11:45 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 18 Jun 2015 19:55:45 +0000 (14:55 -0500)
Previously, when a Root Port's link was down, we didn't allow config access
to the Root Port, which meant that if the Root Port led to an empty slot,
"lspci" didn't even show the Root Port.

Allow config access to Root Port even when link is down.

[bhelgaas: changelog, fold in unused var fix]
Suggested-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Duc Dang <dhdang@apm.com>
Signed-off-by: Tanmay Inamdar <tinamdar@apm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/host/pci-xgene.c

index 70af714a2d438f2e850b0c87cea10e81691b6768..a9dfb70d623ae0acbb54d96ada58a68ecc3074fe 100644 (file)
@@ -137,9 +137,7 @@ static bool xgene_pcie_hide_rc_bars(struct pci_bus *bus, int offset)
 static void __iomem *xgene_pcie_map_bus(struct pci_bus *bus, unsigned int devfn,
                              int offset)
 {
-       struct xgene_pcie_port *port = bus->sysdata;
-
-       if ((pci_is_root_bus(bus) && devfn != 0) || !port->link_up ||
+       if ((pci_is_root_bus(bus) && devfn != 0) ||
            xgene_pcie_hide_rc_bars(bus, offset))
                return NULL;