PCI: Add generic pcie_wait_for_link() interface
authorOza Pawandeep <poza@codeaurora.org>
Thu, 17 May 2018 21:44:11 +0000 (16:44 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 17 May 2018 21:44:11 +0000 (16:44 -0500)
commit9f5a70f18c5893a30d6c339adc48de43c57dd7e2
treea9883d7afecbedeffb9379bc88c9c5d06793f1ab
parent2af8641b2ad3c0faf1ba63e989ca2f2f2134e10d
PCI: Add generic pcie_wait_for_link() interface

Clients such as hotplug and Downstream Port Containment (DPC) both need to
wait until a link becomes active or inactive.

Add a generic pcie_wait_link_active() interface and use it instead of
duplicating the code.

Signed-off-by: Oza Pawandeep <poza@codeaurora.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Keith Busch <keith.busch@intel.com>
drivers/pci/hotplug/pciehp_hpc.c
drivers/pci/pci.c
drivers/pci/pci.h
drivers/pci/pcie/dpc.c