nvme: handle the persistent internal error AER
authorMichael Kelley <mikelley@microsoft.com>
Wed, 8 Jun 2022 18:52:21 +0000 (11:52 -0700)
committerChristoph Hellwig <hch@lst.de>
Wed, 6 Jul 2022 16:14:04 +0000 (18:14 +0200)
commit48e1bc03b7983b3ad2f920ca70805bbc6b55609d
tree4f3a6bf4848a48a57ca45b23d876c9532a36f907
parent12c6870bf7efbbc275972edaab86071e21cfc2f1
nvme: handle the persistent internal error AER

In the NVM Express Revision 1.4 spec, Figure 145 describes possible
values for an AER with event type "Error" (value 000b). For a
Persistent Internal Error (value 03h), the host should perform a
controller reset.

Add support for this error using code that already exists for
doing a controller reset. As part of this support, introduce
two utility functions for parsing the AER type and subtype.

This new support was tested in a lab environment where we can
generate the persistent internal error on demand, and observe
both the Linux side and NVMe controller side to see that the
controller reset has been done.

Signed-off-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c
include/linux/nvme.h