aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2015-10-03 14:13:38 -0400
committerBjorn Helgaas <bhelgaas@google.com>2015-10-09 12:23:37 -0400
commitd1a082cc2512f4ddaff5e1f35bc831773c08a7fe (patch)
treeb567ba7a233387d5fa10d5f8e32773cecca6a84c
parentdc0352ab0b2a0c0c4fd11be89b83f4c693a8f662 (diff)
PCI: mvebu: Remove code restricting accesses to slot 0
Now that we advertise a PCIe capability, the Linux PCI layer will not scan the bus for devices other than in slot 0. This makes the work-around to trap accesses to devices other than slot 0 unnecessary. Tested-by: Willy Tarreau <w@1wt.eu> (Iomega iConnect Kirkwood, MiraBox Armada 370) Tested-by: Andrew Lunn <andrew@lunn.ch> (D-Link DIR664 Kirkwood) Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> (Armada XP GP) Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r--drivers/pci/host/pci-mvebu.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c
index 6310f2a84cfd..53b79c5f0559 100644
--- a/drivers/pci/host/pci-mvebu.c
+++ b/drivers/pci/host/pci-mvebu.c
@@ -794,17 +794,6 @@ static int mvebu_pcie_wr_conf(struct pci_bus *bus, u32 devfn,
794 if (!mvebu_pcie_link_up(port)) 794 if (!mvebu_pcie_link_up(port))
795 return PCIBIOS_DEVICE_NOT_FOUND; 795 return PCIBIOS_DEVICE_NOT_FOUND;
796 796
797 /*
798 * On the secondary bus, we don't want to expose any other
799 * device than the device physically connected in the PCIe
800 * slot, visible in slot 0. In slot 1, there's a special
801 * Marvell device that only makes sense when the Armada is
802 * used as a PCIe endpoint.
803 */
804 if (bus->number == port->bridge.secondary_bus &&
805 PCI_SLOT(devfn) != 0)
806 return PCIBIOS_DEVICE_NOT_FOUND;
807
808 /* Access the real PCIe interface */ 797 /* Access the real PCIe interface */
809 ret = mvebu_pcie_hw_wr_conf(port, bus, devfn, 798 ret = mvebu_pcie_hw_wr_conf(port, bus, devfn,
810 where, size, val); 799 where, size, val);
@@ -835,19 +824,6 @@ static int mvebu_pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where,
835 return PCIBIOS_DEVICE_NOT_FOUND; 824 return PCIBIOS_DEVICE_NOT_FOUND;
836 } 825 }
837 826
838 /*
839 * On the secondary bus, we don't want to expose any other
840 * device than the device physically connected in the PCIe
841 * slot, visible in slot 0. In slot 1, there's a special
842 * Marvell device that only makes sense when the Armada is
843 * used as a PCIe endpoint.
844 */
845 if (bus->number == port->bridge.secondary_bus &&
846 PCI_SLOT(devfn) != 0) {
847 *val = 0xffffffff;
848 return PCIBIOS_DEVICE_NOT_FOUND;
849 }
850
851 /* Access the real PCIe interface */ 827 /* Access the real PCIe interface */
852 ret = mvebu_pcie_hw_rd_conf(port, bus, devfn, 828 ret = mvebu_pcie_hw_rd_conf(port, bus, devfn,
853 where, size, val); 829 where, size, val);