Page MenuHomeFreeBSD

D41085.diff
No OneTemporary

D41085.diff

diff --git a/sys/cam/cam.h b/sys/cam/cam.h
--- a/sys/cam/cam.h
+++ b/sys/cam/cam.h
@@ -240,7 +240,12 @@
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 */
diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c
--- a/sys/cam/cam_periph.c
+++ b/sys/cam/cam_periph.c
@@ -1996,6 +1996,7 @@
relsim_flags = RELSIM_RELEASE_AFTER_TIMEOUT;
/* FALLTHROUGH */
case CAM_ATA_STATUS_ERROR:
+ case CAM_NVME_STATUS_ERROR:
case CAM_SMP_STATUS_ERROR:
case CAM_REQ_CMP_ERR:
case CAM_CMD_TIMEOUT:
diff --git a/sys/cam/nvme/nvme_da.c b/sys/cam/nvme/nvme_da.c
--- a/sys/cam/nvme/nvme_da.c
+++ b/sys/cam/nvme/nvme_da.c
@@ -1285,6 +1285,7 @@
#endif
break;
case CAM_REQ_CMP_ERR:
+ case CAM_NVME_STATUS_ERROR:
#ifdef CAM_IO_STATS
softc->errors++;
#endif
diff --git a/sys/dev/nvme/nvme_sim.c b/sys/dev/nvme/nvme_sim.c
--- a/sys/dev/nvme/nvme_sim.c
+++ b/sys/dev/nvme/nvme_sim.c
@@ -74,7 +74,7 @@
memcpy(&ccb->nvmeio.cpl, cpl, sizeof(*cpl));
ccb->ccb_h.status &= ~CAM_SIM_QUEUED;
if (nvme_completion_is_error(cpl)) {
- ccb->ccb_h.status = CAM_REQ_CMP_ERR;
+ ccb->ccb_h.status = CAM_NVME_STATUS_ERROR;
xpt_done(ccb);
} else {
ccb->ccb_h.status = CAM_REQ_CMP;

File Metadata

Mime Type
text/plain
Expires
Tue, Jan 28, 5:28 AM (10 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16252159
Default Alt Text
D41085.diff (1 KB)

Event Timeline