Date: Mon, 21 Sep 2020 15:41:47 +0000 (UTC) From: David Bright <dab@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365946 - head/sys/dev/nvme Message-ID: <202009211541.08LFflrK002068@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dab Date: Mon Sep 21 15:41:47 2020 New Revision: 365946 URL: https://svnweb.freebsd.org/changeset/base/365946 Log: 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 Modified: head/sys/dev/nvme/nvme.h head/sys/dev/nvme/nvme_ctrlr.c Modified: head/sys/dev/nvme/nvme.h ============================================================================== --- head/sys/dev/nvme/nvme.h Mon Sep 21 15:24:44 2020 (r365945) +++ head/sys/dev/nvme/nvme.h Mon Sep 21 15:41:47 2020 (r365946) @@ -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) Modified: head/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- head/sys/dev/nvme/nvme_ctrlr.c Mon Sep 21 15:24:44 2020 (r365945) +++ head/sys/dev/nvme/nvme_ctrlr.c Mon Sep 21 15:41:47 2020 (r365946) @@ -1345,6 +1345,9 @@ nvme_ctrlr_ioctl(struct cdev *cdev, u_long cmd, caddr_ gnsid->nsid = 0; break; } + case NVME_GET_MAX_XFER_SIZE: + *(uint64_t *)arg = ctrlr->max_xfer_size; + break; default: return (ENOTTY); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009211541.08LFflrK002068>