]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
PCI: shpchp: register busn_res
authorYinghai Lu <yinghai@kernel.org>
Fri, 18 May 2012 01:51:13 +0000 (18:51 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 13 Jun 2012 21:42:25 +0000 (15:42 -0600)
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/hotplug/shpchp_pci.c

index d021eb031b3c6f8853b005c10c1ec2defa09152b..13069802b8c891711393d757a6e4ddc84103da0a 100644 (file)
@@ -66,6 +66,7 @@ int __ref shpchp_configure_device(struct slot *p_slot)
                        struct pci_bus *child;
                        unsigned char busnr, start = parent->busn_res.start;
                        unsigned char end = parent->busn_res.end;
+                       int max;
                        for (busnr = start; busnr <= end; busnr++) {
                                if (!pci_find_bus(pci_domain_nr(parent),
                                                        busnr))
@@ -84,7 +85,8 @@ int __ref shpchp_configure_device(struct slot *p_slot)
                                pci_dev_put(dev);
                                continue;
                        }
-                       child->busn_res.end = pci_do_scan_bus(child);
+                       max = pci_do_scan_bus(child);
+                       pci_bus_update_busn_res_end(child, max);
                        pci_bus_size_bridges(child);
                }
                pci_configure_slot(dev);