[PATCH RESEND] nvme-pci: Fix EEH failure on ppc after subsystem reset
Keith Busch
kbusch at kernel.org
Tue Feb 27 10:29:16 PST 2024
On Fri, Feb 09, 2024 at 10:32:16AM +0530, Nilay Shroff wrote:
> If the nvme subsyetm reset causes the loss of communication to the nvme
> adapter then EEH could potnetially recover the adapter. The detection of
> comminication loss to the adapter only happens when the nvme driver
> attempts to read an MMIO register.
>
> The nvme subsystem reset command writes 0x4E564D65 to NSSR register and
> schedule adapter reset.In the case nvme subsystem reset caused the loss
> of communication to the nvme adapter then either IO timeout event or
> adapter reset handler could detect it. If IO timeout even could detect
> loss of communication then EEH handler is able to recover the
> communication to the adapter. This change was implemented in 651438bb0af5
> (nvme-pci: Fix EEH failure on ppc). However if the adapter communication
> loss is detected in nvme reset work handler then EEH is unable to
> successfully finish the adapter recovery.
>
> This patch ensures that,
> - nvme driver reset handler would observer pci channel was offline after
> a failed MMIO read and avoids marking the controller state to DEAD and
> thus gives a fair chance to EEH handler to recover the nvme adapter.
>
> - if nvme controller is already in RESETTNG state and pci channel frozen
> error is detected then nvme driver pci-error-handler code sends the
> correct error code (PCI_ERS_RESULT_NEED_RESET) back to the EEH handler
> so that EEH handler could proceed with the pci slot reset.
A subsystem reset takes the link down. I'm pretty sure the proper way to
recover from it requires pcie hotplug support.
More information about the Linux-nvme
mailing list