]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit6d4247681a157bd45e6368ffb539ed483387b0f9
treec31eb5507914fa40e2992995a02c81416d7ffe4b
parent1e08e205c1411e9955dc495f6a9b1211d64ecbc0
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