Commit 80dcd36c authored by Lukas Wunner's avatar Lukas Wunner Committed by Bjorn Helgaas

PCI/portdrv: Remove unused resume err_handler

Commit 3e41a317 ("PCI/AER: Remove unused aer_error_resume()")
removed the resume err_handler from AER.  Since no other port service
implements the callback, support for it can be removed from portdrv.
It can be revived later if need be, preferably by re-using the
pcie_port_device_iter() iterator.

Link: https://lore.kernel.org/r/25334149b604e005058aeb0fdf51e01f991d5d74.1627638184.git.lukas@wunner.deSigned-off-by: default avatarLukas Wunner <lukas@wunner.de>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Cc: Keith Busch <kbusch@kernel.org>
parent ea401499
...@@ -87,9 +87,6 @@ struct pcie_port_service_driver { ...@@ -87,9 +87,6 @@ struct pcie_port_service_driver {
int (*slot_reset)(struct pcie_device *dev); int (*slot_reset)(struct pcie_device *dev);
/* Device driver may resume normal operations */
void (*error_resume)(struct pci_dev *dev);
int port_type; /* Type of the port this driver can handle */ int port_type; /* Type of the port this driver can handle */
u32 service; /* Port service this device represents */ u32 service; /* Port service this device represents */
......
...@@ -173,29 +173,6 @@ static pci_ers_result_t pcie_portdrv_mmio_enabled(struct pci_dev *dev) ...@@ -173,29 +173,6 @@ static pci_ers_result_t pcie_portdrv_mmio_enabled(struct pci_dev *dev)
return PCI_ERS_RESULT_RECOVERED; return PCI_ERS_RESULT_RECOVERED;
} }
static int resume_iter(struct device *device, void *data)
{
struct pcie_device *pcie_device;
struct pcie_port_service_driver *driver;
if (device->bus == &pcie_port_bus_type && device->driver) {
driver = to_service_driver(device->driver);
if (driver && driver->error_resume) {
pcie_device = to_pcie_device(device);
/* Forward error message to service drivers */
driver->error_resume(pcie_device->port);
}
}
return 0;
}
static void pcie_portdrv_err_resume(struct pci_dev *dev)
{
device_for_each_child(&dev->dev, NULL, resume_iter);
}
/* /*
* LINUX Device Driver Model * LINUX Device Driver Model
*/ */
...@@ -213,7 +190,6 @@ static const struct pci_error_handlers pcie_portdrv_err_handler = { ...@@ -213,7 +190,6 @@ static const struct pci_error_handlers pcie_portdrv_err_handler = {
.error_detected = pcie_portdrv_error_detected, .error_detected = pcie_portdrv_error_detected,
.slot_reset = pcie_portdrv_slot_reset, .slot_reset = pcie_portdrv_slot_reset,
.mmio_enabled = pcie_portdrv_mmio_enabled, .mmio_enabled = pcie_portdrv_mmio_enabled,
.resume = pcie_portdrv_err_resume,
}; };
static struct pci_driver pcie_portdriver = { static struct pci_driver pcie_portdriver = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment