powernv/eeh: Use generic code to handle hot resets
authorOliver O'Halloran <oohall@gmail.com>
Tue, 3 Sep 2019 10:15:58 +0000 (20:15 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 5 Sep 2019 04:22:38 +0000 (14:22 +1000)
commit98fd32cde59ed71c2c9a6da4101e85f50c9425f3
treec31eb5507914fa40e2992995a02c81416d7ffe4b
parent50554533358571d0c23a88fa1fe3d0b44c6fc7b5
powernv/eeh: Use generic code to handle hot resets

When we reset PCI devices managed by a hotplug driver the reset may
generate spurious hotplug events that cause the PCI device we're resetting
to be torn down accidently. This is a problem for EEH (when the driver is
EEH aware) since we want to leave the OS PCI device state intact so that
the device can be re-set without losing any resources (network, disks,
etc) provided by the driver.

Generic PCI code provides the pci_bus_error_reset() function to handle
resetting a PCI Device (or bus) by using the reset method provided by the
hotplug slot driver. We can use this function if the EEH core has
requested a hot reset (common case) without tripping over the hotplug
driver.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190903101605.2890-8-oohall@gmail.com
arch/powerpc/platforms/powernv/eeh-powernv.c