Message ID | 20180510193254.32224-2-manoj.iyer@canonical.com |
---|---|
State | New |
Headers | show |
Series | [1/3] PCI: Avoid bus reset if bridge itself is broken | expand |
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index a47f55e3057a..2cce730f8ce9 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -4362,6 +4362,10 @@ static bool pci_bus_resetable(struct pci_bus *bus) { struct pci_dev *dev; + + if (bus->self && (bus->self->dev_flags & PCI_DEV_FLAGS_NO_BUS_RESET)) + return false; + list_for_each_entry(dev, &bus->devices, bus_list) { if (dev->dev_flags & PCI_DEV_FLAGS_NO_BUS_RESET || (dev->subordinate && !pci_bus_resetable(dev->subordinate)))