summaryrefslogtreecommitdiff
path: root/include/linux/nvme.h
diff options
context:
space:
mode:
authorMichael Kelley <mikelley@microsoft.com>2022-06-08 21:52:21 +0300
committerJens Axboe <axboe@kernel.dk>2022-08-03 02:14:47 +0300
commit2c61c97fb12b806e1c8eb15f04c277ad097ec95e (patch)
tree15ecd40af4fb6d14c2e71be97471f20ea3d319f0 /include/linux/nvme.h
parentb7df575f8aac538878c1b2b3099f6d594626dfe8 (diff)
downloadlinux-2c61c97fb12b806e1c8eb15f04c277ad097ec95e.tar.xz
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> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/nvme.h')
-rw-r--r--include/linux/nvme.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 07cfc922f8e4..3b8fc6c69529 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -712,6 +712,10 @@ enum {
};
enum {
+ NVME_AER_ERROR_PERSIST_INT_ERR = 0x03,
+};
+
+enum {
NVME_AER_NOTICE_NS_CHANGED = 0x00,
NVME_AER_NOTICE_FW_ACT_STARTING = 0x01,
NVME_AER_NOTICE_ANA = 0x03,