Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108549422
D37696.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D37696.diff
View Options
diff --git a/sbin/nvmecontrol/resv.c b/sbin/nvmecontrol/resv.c
--- a/sbin/nvmecontrol/resv.c
+++ b/sbin/nvmecontrol/resv.c
@@ -255,6 +255,7 @@
memset(&pt, 0, sizeof(pt));
pt.cmd.opc = NVME_OPC_RESERVATION_ACQUIRE;
+ pt.cmd.nsid = htole32(nsid);
pt.cmd.cdw10 = htole32((acquire_opt.racqa & 7) |
(acquire_opt.rtype << 8));
pt.buf = &data;
@@ -293,6 +294,7 @@
memset(&pt, 0, sizeof(pt));
pt.cmd.opc = NVME_OPC_RESERVATION_REGISTER;
+ pt.cmd.nsid = htole32(nsid);
pt.cmd.cdw10 = htole32((register_opt.rrega & 7) |
(register_opt.iekey << 3) | (register_opt.cptpl << 30));
pt.buf = &data;
@@ -330,6 +332,7 @@
memset(&pt, 0, sizeof(pt));
pt.cmd.opc = NVME_OPC_RESERVATION_RELEASE;
+ pt.cmd.nsid = htole32(nsid);
pt.cmd.cdw10 = htole32((release_opt.rrela & 7) |
(release_opt.rtype << 8));
pt.buf = &data;
@@ -369,6 +372,7 @@
bzero(data, sizeof(data));
memset(&pt, 0, sizeof(pt));
pt.cmd.opc = NVME_OPC_RESERVATION_REPORT;
+ pt.cmd.nsid = htole32(nsid);
pt.cmd.cdw10 = htole32(sizeof(data) / 4 - 1);
pt.cmd.cdw11 = htole32(report_opt.eds); /* EDS */
pt.buf = &data;
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
@@ -441,7 +441,8 @@
*/
cam_periph_unlock(periph);
cam_periph_unmapmem(ccb, &mapinfo);
- error = (ccb->ccb_h.status == CAM_REQ_CMP) ? 0 : EIO;
+ error = (ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP ?
+ 0 : EIO;
out:
cam_periph_lock(periph);
xpt_release_ccb(ccb);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 5:40 AM (2 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16187664
Default Alt Text
D37696.diff (1 KB)
Attached To
Mode
D37696: nvme: fix resv commands with nda device
Attached
Detach File
Event Timeline
Log In to Comment