]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Add device disconnected state
authorKeith Busch <keith.busch@intel.com>
Thu, 30 Mar 2017 03:48:59 +0000 (22:48 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 30 Mar 2017 03:54:46 +0000 (22:54 -0500)
commitb80d188343943c6df79291e023c7a2b1fd8be33b
tree4e874d870f8fd310aa954153c590f6ae93517868
parent8f59cea3c7a83bdb05fb4e64a7ef746a5a2dd8a9
PCI: Add device disconnected state

Add a new state to pci_dev to be set when it is unexpectedly disconnected.
The PCI driver tear down functions can observe this new device state so
they may skip operations that will fail.

The pciehp and pcie-dpc drivers are aware when the link is down, so these
set the flag when their handlers detect the device is disconnected.

Tested-by: Krishna Dhulipala <krishnad@fb.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Wei Zhang <wzhang@fb.com>
drivers/pci/hotplug/pciehp_pci.c
drivers/pci/pci.h
drivers/pci/pcie/pcie-dpc.c
include/linux/pci.h