diff options
author | Alex Chiang <achiang@hp.com> | 2009-03-20 14:56:20 -0600 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-03-20 14:57:36 -0700 |
commit | 9dd90cafa7a712d283e2e0c625b022e19f746762 (patch) | |
tree | 78e3dffc9174a62fac539c7c0cbae36e15b83740 /drivers | |
parent | b73e97d95c168cbc19bd1208c894077f25931ba1 (diff) | |
download | linux-9dd90cafa7a712d283e2e0c625b022e19f746762.tar.bz2 |
PCI: do not enable bridges more than once
In preparation for PCI core hotplug, we need to ensure that we do
not attempt to re-enable bridges that have already been enabled.
Reported-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/bus.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index 118c77778d29..68f91a252595 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c @@ -184,8 +184,10 @@ void pci_enable_bridges(struct pci_bus *bus) list_for_each_entry(dev, &bus->devices, bus_list) { if (dev->subordinate) { - retval = pci_enable_device(dev); - pci_set_master(dev); + if (atomic_read(&dev->enable_cnt) == 0) { + retval = pci_enable_device(dev); + pci_set_master(dev); + } pci_enable_bridges(dev->subordinate); } } |