Add an ioctl to get an NVMe device's maximum transfer size
Reviewed by: imp, chuck Obtained from: Dell EMC Isilon MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D26390
This commit is contained in:
parent
cba446e2c2
commit
e32d47f32d
@ -41,6 +41,7 @@
|
||||
#define NVME_PASSTHROUGH_CMD _IOWR('n', 0, struct nvme_pt_command)
|
||||
#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_IO_TEST _IOWR('n', 100, struct nvme_io_test)
|
||||
#define NVME_BIO_TEST _IOWR('n', 101, struct nvme_io_test)
|
||||
|
@ -1345,6 +1345,9 @@ nvme_ctrlr_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int flag,
|
||||
gnsid->nsid = 0;
|
||||
break;
|
||||
}
|
||||
case NVME_GET_MAX_XFER_SIZE:
|
||||
*(uint64_t *)arg = ctrlr->max_xfer_size;
|
||||
break;
|
||||
default:
|
||||
return (ENOTTY);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user