aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2012-09-17 22:24:30 -0700
committerYinghai Lu <yinghai@kernel.org>2012-09-17 22:24:30 -0700
commit719e863587dbc1acc601d420084059170370579e (patch)
treef0e893ff78ce78903d2fb4d341143c7500af025a
parent2762c1e232bafb8017cb4e47ac0f003155610a08 (diff)
downloadlinux-yinghai-719e863587dbc1acc601d420084059170370579e.tar.gz
PCI, pciehp: Remove not needed bus number range checking
Found hotplug adding one EM with bridge fail, bios only leave one bus range for slot. [ 1169.621444] pciehp: No bus number available for hot-added bridge 0000:55:00.0 [ 1169.633277] pcieport 0000:40:03.0: PCI bridge to [bus 55-55] With busn_res tracking and allocating, we don't need that checking anymore. Parent bridges' bus number will be extended safely. Signed-off-by: Yinghai Lu <yinghai@kernel.org>
-rw-r--r--drivers/pci/hotplug-pci.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/pci/hotplug-pci.c b/drivers/pci/hotplug-pci.c
index 6258dc260d9f5..2221a279f6f40 100644
--- a/drivers/pci/hotplug-pci.c
+++ b/drivers/pci/hotplug-pci.c
@@ -7,18 +7,8 @@
int __ref pci_hp_add_bridge(struct pci_dev *dev)
{
struct pci_bus *parent = dev->bus;
- int pass, busnr, start = parent->busn_res.start;
- int end = parent->busn_res.end;
+ int pass, busnr = parent->busn_res.start;
- for (busnr = start; busnr <= end; busnr++) {
- if (!pci_find_bus(pci_domain_nr(parent), busnr))
- break;
- }
- if (busnr-- > end) {
- printk(KERN_ERR "No bus number available for hot-added bridge %s\n",
- pci_name(dev));
- return -1;
- }
for (pass = 0; pass < 2; pass++)
busnr = pci_scan_bridge(parent, dev, busnr, pass);
if (!dev->subordinate)