On Wed, Dec 09, 2020 at 11:55:07PM +0100, Hinko Kocevar wrote: > Adding a bunch of printk()'s to portdrv_pci.c led to (partial) success! > > So, the pcie_portdrv_error_detected() returns PCI_ERS_RESULT_CAN_RECOVER and > therefore the pcie_portdrv_slot_reset() is not called. > > But the pcie_portdrv_err_resume() is called! Adding these two lines to > pcie_portdrv_err_resume(), before the call to device_for_each_child(): > > pci_restore_state(dev); > pci_save_state(dev); You need to do that with the current kernel or are you still using a 3.10? A more recent kernel shouldn't have needed such a fix after the following commit was introduced: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=874b3251113a1e2cbe79c24994dc03fe4fe4b99b