]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "PCI: Don't scan random busses in pci_scan_bridge()"
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 19 Sep 2014 16:56:06 +0000 (10:56 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 19 Sep 2014 16:56:06 +0000 (10:56 -0600)
commite982eb6070230b7dc45bd417a289c0cecd802be4
treedecf885604ed476c54a4f7a3beb0329eac2ea39f
parent9f5334a136615e43f753f3fac079b760d4fd1291
Revert "PCI: Don't scan random busses in pci_scan_bridge()"

This reverts commit d699d93465c0 ("PCI: Don't scan random busses in
pci_scan_bridge()") because it breaks CardBus on some machines.

David tested a Dell Latitude D505 that worked like this prior to
d699d93465c0:

    pci 0000:00:1e.0: PCI bridge to [bus 01]
    pci 0000:01:01.0: CardBus bridge to [bus 02-05]

Note that the 01:01.0 CardBus bridge has a bus number aperture of
[bus 02-05], but those buses are all outside the 00:1e.0 PCI bridge bus
number aperture, so accesses to buses 02-05 never reach CardBus.  This is
later patched up by yenta_fixup_parent_bridge(), which changes the
subordinate bus number of the 00:1e.0 PCI bridge:

    pci_bus 0000:01: Raising subordinate bus# of parent bus (#01) from #01 to #05

With d699d93465c0, pci_scan_bridge() fails immediately when it notices that
we can't allocate a valid secondary bus number for the CardBus bridge, and
CardBus doesn't work at all:

    pci 0000:01:01.0: can't allocate child bus 01 from [bus 01]

I'd prefer to fix this by integrating the yenta_fixup_parent_bridge() logic
into pci_scan_bridge() so we fix the bus number apertures up front.  But
I don't think we can do that before v3.17, so I'm going to revert this to
avoid the problem while we're working on the long-term fix.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=83441
Link: http://lkml.kernel.org/r/1409303414-5196-1-git-send-email-david.henningsson@canonical.com
Reported-by: David Henningsson <david.henningsson@canonical.com>
Tested-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: stable@vger.kernel.org # v3.15+
drivers/pci/probe.c