Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316446
b: refs/heads/master
c: a8e4b9c
h: refs/heads/master
v: v3
  • Loading branch information
Yinghai Lu authored and Bjorn Helgaas committed Jun 13, 2012
1 parent e3f79bb commit ca7664f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 85019faf4a88477cc72f56b6e371955ea0bb7a2a
refs/heads/master: a8e4b9c101ae58cc64cda0201229d3318701a7f0
23 changes: 23 additions & 0 deletions trunk/drivers/pci/hotplug-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,29 @@
#include <linux/export.h>
#include "pci.h"

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;

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)
return -1;

return 0;
}
EXPORT_SYMBOL_GPL(pci_hp_add_bridge);

unsigned int __devinit pci_do_scan_bus(struct pci_bus *bus)
{
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/pci/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ static inline int pci_proc_detach_bus(struct pci_bus *bus) { return 0; }
#endif

/* Functions for PCI Hotplug drivers to use */
int pci_hp_add_bridge(struct pci_dev *dev);
extern unsigned int pci_do_scan_bus(struct pci_bus *bus);

#ifdef HAVE_PCI_LEGACY
Expand Down

0 comments on commit ca7664f

Please sign in to comment.