Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145436020
D48218.id.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
D48218.id.diff
View Options
diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h
--- a/sys/dev/nvme/nvme.h
+++ b/sys/dev/nvme/nvme.h
@@ -40,6 +40,7 @@
#define NVME_RESET_CONTROLLER _IO('n', 1)
#define NVME_GET_NSID _IOR('n', 2, struct nvme_get_nsid)
#define NVME_GET_MAX_XFER_SIZE _IOR('n', 3, uint64_t)
+#define NVME_GET_CONTROLLER_DATA _IOR('n', 4, struct nvme_controller_data)
#define NVME_IO_TEST _IOWR('n', 100, struct nvme_io_test)
#define NVME_BIO_TEST _IOWR('n', 101, struct nvme_io_test)
diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c
--- a/sys/dev/nvme/nvme_ctrlr.c
+++ b/sys/dev/nvme/nvme_ctrlr.c
@@ -1443,6 +1443,9 @@
case NVME_GET_MAX_XFER_SIZE:
*(uint64_t *)arg = ctrlr->max_xfer_size;
break;
+ case NVME_GET_CONTROLLER_DATA:
+ memcpy(arg, &ctrlr->cdata, sizeof(ctrlr->cdata));
+ break;
/* Linux Compatible (see nvme_linux.h) */
case NVME_IOCTL_ID:
td->td_retval[0] = 0xfffffffful;
diff --git a/sys/dev/nvmf/host/nvmf.c b/sys/dev/nvmf/host/nvmf.c
--- a/sys/dev/nvmf/host/nvmf.c
+++ b/sys/dev/nvmf/host/nvmf.c
@@ -1107,6 +1107,9 @@
case NVME_GET_MAX_XFER_SIZE:
*(uint64_t *)arg = sc->max_xfer_size;
return (0);
+ case NVME_GET_CONTROLLER_DATA:
+ memcpy(arg, sc->cdata, sizeof(*sc->cdata));
+ return (0);
case NVMF_RECONNECT_PARAMS:
nv = (struct nvmf_ioc_nv *)arg;
return (nvmf_reconnect_params(sc, nv));
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Feb 20, 8:53 PM (19 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28903370
Default Alt Text
D48218.id.diff (1 KB)
Attached To
Mode
D48218: nvme/nvmf: Add NVME_GET_CONTROLLER_DATA ioctl to fetch cached cdata
Attached
Detach File
Event Timeline
Log In to Comment