summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorYu Zhao2009-06-26 08:04:46 +0200
committerJesse Barnes2009-06-29 21:13:13 +0200
commit654b75e044119bf8e7d773bce41ea039281bbfbe (patch)
tree5c749390a41cbbd59617d5dd1cee5160392b5feb /drivers/pci
parentPCI: remove pci_dac_dma_... APIs on mn10300 (diff)
downloadkernel-qcow2-linux-654b75e044119bf8e7d773bce41ea039281bbfbe.tar.gz
kernel-qcow2-linux-654b75e044119bf8e7d773bce41ea039281bbfbe.tar.xz
kernel-qcow2-linux-654b75e044119bf8e7d773bce41ea039281bbfbe.zip
PCI: check if bus has a proper bridge device before triggering SBR
For devices attached to the root bus, we can't trigger Secondary Bus Reset because there is no bridge device associated with the bus. So need to check bus->self again NULL first before using it. Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Yu Zhao <yu.zhao@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 6c93af5ced18..d5d6f5667d83 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -2171,7 +2171,7 @@ static int pci_parent_bus_reset(struct pci_dev *dev, int probe)
u16 ctrl;
struct pci_dev *pdev;
- if (dev->subordinate)
+ if (pci_is_root_bus(dev->bus) || dev->subordinate || !dev->bus->self)
return -ENOTTY;
list_for_each_entry(pdev, &dev->bus->devices, bus_list)