Page MenuHomeFreeBSD

D50632.1791121496.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D50632.1791121496.diff

diff --git a/sys/cam/cam.h b/sys/cam/cam.h
--- a/sys/cam/cam.h
+++ b/sys/cam/cam.h
@@ -350,6 +350,11 @@
CAM_EAF_PRINT_RESULT = 0x20
} cam_error_ata_flags;
+typedef enum {
+ CAM_ENF_PRINT_NONE = 0x00,
+ CAM_ENF_PRINT_STATUS = 0x10,
+} cam_error_nvme_flags;
+
typedef enum {
CAM_STRVIS_FLAG_NONE = 0x00,
CAM_STRVIS_FLAG_NONASCII_MASK = 0x03,
diff --git a/sys/cam/cam.c b/sys/cam/cam.c
--- a/sys/cam/cam.c
+++ b/sys/cam/cam.c
@@ -380,6 +380,20 @@
break;
}
break;
+ case XPT_NVME_IO:
+ case XPT_NVME_ADMIN:
+ switch (proto_flags & CAM_EPF_LEVEL_MASK) {
+ case CAM_EPF_NONE:
+ break;
+ case CAM_EPF_ALL:
+ case CAM_EPF_NORMAL:
+ case CAM_EPF_MINIMAL:
+ proto_flags |= CAM_ENF_PRINT_STATUS;
+ /* FALLTHROUGH */
+ default:
+ break;
+ }
+ break;
default:
break;
}
@@ -494,6 +508,20 @@
ccb->smpio.smp_response[2]);
}
/* There is no SMP equivalent to SCSI sense. */
+ break;
+ case XPT_NVME_IO:
+ case XPT_NVME_ADMIN:
+ if ((ccb->ccb_h.status & CAM_STATUS_MASK) !=
+ CAM_NVME_STATUS_ERROR)
+ break;
+
+ if (proto_flags & CAM_ESF_PRINT_STATUS) {
+ sbuf_cat(&sb, path_str);
+ sbuf_cat(&sb, "NVMe status: ");
+ nvme_status_sbuf(&ccb->nvmeio, &sb);
+ sbuf_putc(&sb, '\n');
+ }
+
break;
default:
break;

File Metadata

Mime Type
text/plain
Expires
Sun, Oct 4, 1:44 PM (2 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30159138
Default Alt Text
D50632.1791121496.diff (1 KB)

Event Timeline