PCI/ERR: Remove service dependency in pcie_do_recovery()
authorKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Tue, 24 Mar 2020 00:26:02 +0000 (17:26 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Sat, 28 Mar 2020 18:18:54 +0000 (13:18 -0500)
commitb6cf1a42f916af0b056079c37fc5fa7bf8e4b2e2
tree0f41fe19ae3df4681d9adc1b2c24cf17be0238c6
parentbe06c1b42eea749547d2f0248dc0a7c1153f67b9
PCI/ERR: Remove service dependency in pcie_do_recovery()

Previously we passed the PCIe service type parameter to pcie_do_recovery(),
where reset_link() looked up the underlying pci_port_service_driver and its
.reset_link() function pointer. Instead of using this roundabout way, we
can just pass the driver-specific .reset_link() callback function when
calling pcie_do_recovery() function.

This allows us to call pcie_do_recovery() from code that is not a PCIe port
service driver, e.g., Error Disconnect Recover (EDR) support.

Remove pcie_port_find_service() and pcie_port_service_driver.reset_link
since they are now unused.

Link: https://lore.kernel.org/r/60e02b87b526cdf2930400059d98704bf0a147d1.1585000084.git.sathyanarayanan.kuppuswamy@linux.intel.com
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Documentation/PCI/pcieaer-howto.rst
drivers/pci/pci.h
drivers/pci/pcie/aer.c
drivers/pci/pcie/dpc.c
drivers/pci/pcie/err.c
drivers/pci/pcie/portdrv.h
drivers/pci/pcie/portdrv_core.c