• I
    MIPS: pci-rt2880: fix slot 0 configuration · 8e98b697
    Ilya Lipnitskiy 提交于
    pci_fixup_irqs() used to call pcibios_map_irq on every PCI device, which
    for RT2880 included bus 0 slot 0. After pci_fixup_irqs() got removed,
    only slots/funcs with devices attached would be called. While arguably
    the right thing, that left no chance for this driver to ever initialize
    slot 0, effectively bricking PCI and USB on RT2880 devices such as the
    Belkin F5D8235-4 v1.
    
    Slot 0 configuration needs to happen after PCI bus enumeration, but
    before any device at slot 0x11 (func 0 or 1) is talked to. That was
    determined empirically by testing on a Belkin F5D8235-4 v1 device. A
    minimal BAR 0 config write followed by read, then setting slot 0
    PCI_COMMAND to MASTER | IO | MEMORY is all that seems to be required for
    proper functionality.
    
    Tested by ensuring that full- and high-speed USB devices get enumerated
    on the Belkin F5D8235-4 v1 (with an out of tree DTS file from OpenWrt).
    
    Fixes: 04c81c72 ("MIPS: PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks")
    Signed-off-by: NIlya Lipnitskiy <ilya.lipnitskiy@gmail.com>
    Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
    Cc: Tobias Wolf <dev-NTEO@vplace.de>
    Cc: <stable@vger.kernel.org> # v4.14+
    Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
    8e98b697
pci-rt2880.c 7.3 KB