diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2017-04-28 17:33:55 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-04-28 17:33:55 +0200 |
commit | f503ee4cbef9c5459d9e176542e4d0e0ed3915f6 (patch) | |
tree | 0d2c86dd676b14ff8b39b4ded4bb741e99b8e8a2 /drivers/pci/pcie | |
parent | Merge branch 'pci/switchtec' into next (diff) | |
parent | PCI: Include PCI-to-PCIe bridges as "Downstream Ports" (diff) | |
download | linux-f503ee4cbef9c5459d9e176542e4d0e0ed3915f6.tar.xz linux-f503ee4cbef9c5459d9e176542e4d0e0ed3915f6.zip |
Merge branch 'pci/enumeration' into next
* pci/enumeration:
PCI: Include PCI-to-PCIe bridges as "Downstream Ports"
PCI: Improve __pci_read_base() robustness
PCI: Short-circuit pci_device_is_present() for disconnected devices
PCI/MSI: Skip disabling disconnected devices
PCI: Don't attempt config access to disconnected devices
PCI: Add device disconnected state
PCI: Export PCI device config accessors
Diffstat (limited to 'drivers/pci/pcie')
-rw-r--r-- | drivers/pci/pcie/pcie-dpc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/pci/pcie/pcie-dpc.c b/drivers/pci/pcie/pcie-dpc.c index d4d70ef4a2d7..77d2ca99d2ec 100644 --- a/drivers/pci/pcie/pcie-dpc.c +++ b/drivers/pci/pcie/pcie-dpc.c @@ -14,6 +14,7 @@ #include <linux/init.h> #include <linux/pci.h> #include <linux/pcieport_if.h> +#include "../pci.h" struct dpc_dev { struct pcie_device *dev; @@ -66,6 +67,10 @@ static void interrupt_event_handler(struct work_struct *work) list_for_each_entry_safe_reverse(dev, temp, &parent->devices, bus_list) { pci_dev_get(dev); + pci_dev_set_disconnected(dev, NULL); + if (pci_has_subordinate(dev)) + pci_walk_bus(dev->subordinate, + pci_dev_set_disconnected, NULL); pci_stop_and_remove_bus_device(dev); pci_dev_put(dev); } |