Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Russell King and committed by
Bjorn Helgaas
d1a082cc dc0352ab

-24
-24
drivers/pci/host/pci-mvebu.c
··· 794 794 if (!mvebu_pcie_link_up(port)) 795 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 797 /* Access the real PCIe interface */ 809 798 ret = mvebu_pcie_hw_wr_conf(port, bus, devfn, 810 799 where, size, val); ··· 820 831 return mvebu_sw_pci_bridge_read(port, where, size, val); 821 832 822 833 if (!mvebu_pcie_link_up(port)) { 823 - *val = 0xffffffff; 824 - return PCIBIOS_DEVICE_NOT_FOUND; 825 - } 826 - 827 - /* 828 - * On the secondary bus, we don't want to expose any other 829 - * device than the device physically connected in the PCIe 830 - * slot, visible in slot 0. In slot 1, there's a special 831 - * Marvell device that only makes sense when the Armada is 832 - * used as a PCIe endpoint. 833 - */ 834 - if (bus->number == port->bridge.secondary_bus && 835 - PCI_SLOT(devfn) != 0) { 836 834 *val = 0xffffffff; 837 835 return PCIBIOS_DEVICE_NOT_FOUND; 838 836 }