• Thomas Petazzoni's avatar
    pci: mvebu: allow the enumeration of devices beyond physical bridges · 197fc226
    Thomas Petazzoni authored
    Until now, the Marvell PCIe driver was only allowing the enumeration
    of the devices in the secondary bus of the emulated PCI-to-PCI
    bridge. This works fine when a PCIe device is directly connected into
    a PCIe slot of the Marvell board.
    
    However, when the device connected in the PCIe slot is a physical PCIe
    bridge, beyond which a real PCIe device is connected, it no longer
    worked, as the driver was preventing the Linux PCI core from seeing
    such devices.
    
    This commit fixes that by ensuring that configuration transactions on
    subordinate busses are properly forwarded on the right PCIe interface.
    
    Thanks to this patch, a PCIe card beyond a PCIe bridge, itself beyond
    the emulated PCI-to-PCI bridge is properly detected, with the
    following layout:
    
    -[0000:00]-+-01.0-[01]----00.0
               +-09.0-[02-07]----00.0-[03-07]--+-01.0-[04]--
               |                               +-05.0-[05]--
               |                               +-07.0-[06]--
               |                               \-09.0-[07]----00.0
               \-0a.0-[08]----00.0
    
    Where the PCIe interface that sits beyond the emulated PCI-to-PCI
    bridge at 09.0 allows to access the secondary bus 02, on which there
    is a PCIe bridge that allows to access the 3 to 7 busses, that are
    subordinates to this bridge. And on one of this bus (bus 7), there is
    one real PCIe device connected.
    Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
    Acked-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    Signed-off-by: default avatarJason Cooper <jason@lakedaemon.net>
    197fc226
pci-mvebu.c 23.1 KB