]> git.baikalelectronics.ru Git - kernel.git/commit
PCI/DPC: Use the generic pcie_do_fatal_recovery() path
authorOza Pawandeep <poza@codeaurora.org>
Thu, 17 May 2018 21:44:20 +0000 (16:44 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Sun, 3 Jun 2018 00:29:27 +0000 (19:29 -0500)
commitdc6331d106920a1b2a729d7dc3b5d5070ab19cfe
tree6f39bc0a908ea656c15486741f4375f8fd4a240f
parent3feef2a7215f8754066f9a2dcf9f8d8064af52c3
PCI/DPC: Use the generic pcie_do_fatal_recovery() path

Our goal is to handle ERR_FATAL errors similarly, whether they are reported
via AER or via DPC.  A previous commit changed AER so it handles ERR_FATAL
by calling driver .remove() methods and resetting the Link.  DPC already
does that (although the Link reset is done automatically by hardware and
happens before we call the driver .remove() methods).

Restructure the DPC code so it calls the same pcie_do_fatal_recovery()
interface used by AER.  This makes it clearer that we want to use the same
path.

Implement the .reset_link() method used by pcie_do_fatal_recovery().  For
DPC, the actual reset is done automatically by hardware, so we really only
have to wait for the Link to be inactive, then release the Port from DPC.

Signed-off-by: Oza Pawandeep <poza@codeaurora.org>
[bhelgaas: changelog, DPC_FATAL is not a bitfield, can be sequential]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pcie/dpc.c
include/linux/aer.h