aboutsummaryrefslogtreecommitdiff
path: root/sys/cam/cam.h
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2023-07-21 04:22:37 +0000
committerWarner Losh <imp@FreeBSD.org>2023-07-21 04:32:31 +0000
commit774ab87cf27beb3669693f14b9c89ebaf542eaf3 (patch)
tree47ca55ac95780a5ff9d1ce1f24c4044053f0ea45 /sys/cam/cam.h
parent0732617ec174854c0875bb7171d850473c61569f (diff)
downloadsrc-774ab87cf27beb3669693f14b9c89ebaf542eaf3.tar.gz
src-774ab87cf27beb3669693f14b9c89ebaf542eaf3.zip
cam: Add CAM_NVME_STATUS_ERROR error code
Add CAM_NVME_STATUS_ERROR error code. Flag all NVME commands that completed with an error status as CAM_NVME_STATUS_ERROR (a new value) instaead of CAM_REQ_CMP_ERR. This indicates to the upper layers of CAM that the 'cpl' field for nvmeio CCBs is valid and can be examined for error recovery, if desired. No functional change. nda will still see these as errors, call ndaerror() to get the error recovery action, etc. cam_periph_error will select the same case as before (even w/o the change, though the change makes it explicit). Sponsored by: Netflix Reviewed by: chuck, mav, jhb Differential Revision: https://reviews.freebsd.org/D41085
Diffstat (limited to 'sys/cam/cam.h')
-rw-r--r--sys/cam/cam.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/cam/cam.h b/sys/cam/cam.h
index 99f7b6a7f5c2..eacf3a248ce9 100644
--- a/sys/cam/cam.h
+++ b/sys/cam/cam.h
@@ -240,7 +240,12 @@ typedef enum {
CAM_REQ_SOFTTIMEOUT = 0x1f,
/*
- * 0x20 - 0x32 are unassigned
+ * NVME error, look at errro code in CCB
+ */
+ CAM_NVME_STATUS_ERROR = 0x20,
+
+ /*
+ * 0x21 - 0x32 are unassigned
*/
/* Initiator Detected Error */