All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] nvme ioctl support
@ 2015-12-15 14:19 Johannes Thumshirn
  2015-12-15 15:43 ` Dave Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Johannes Thumshirn @ 2015-12-15 14:19 UTC (permalink / raw)
  To: davej; +Cc: trinity, Johannes Thumshirn

Add support for NVMe ioctls

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
---
 ioctls/nvme.c | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 ioctls/nvme.c

diff --git a/ioctls/nvme.c b/ioctls/nvme.c
new file mode 100644
index 0000000..5588e81
--- /dev/null
+++ b/ioctls/nvme.c
@@ -0,0 +1,39 @@
+#include <linux/ioctl.h>
+#include <linux/nvme.h>
+
+#include "utils.h"
+#include "ioctls.h"
+
+static const struct ioctl nvme_ioctls[] = {
+	IOCTL(NVME_IOCTL_ID),
+	IOCTL(NVME_IOCTL_ADMIN_CMD),
+	IOCTL(NVME_IOCTL_SUBMIT_IO),
+	IOCTL(NVME_IOCTL_IO_CMD),
+	IOCTL(NVME_IOCTL_RESET),
+};
+
+static const char *const nvme_devs[] = {
+	"nvme",
+};
+
+static const struct ioctl_group nvme_grp_misc = {
+	.devtype = DEV_CHAR,
+	.devs = nvme_devs,
+	.devs_cnt = ARRAY_SIZE(nvme_devs),
+	.sanitise = pick_random_ioctl,
+	.ioctls = nvme_ioctls,
+	.ioctls_cnt = ARRAY_SIZE(nvme_ioctls),
+};
+
+REG_IOCTL_GROUP(nvme_grp_misc)
+
+static const struct ioctl_group nvme_grp_block = {
+	.devtype = DEV_BLOCK,
+	.devs = nvme_devs,
+	.devs_cnt = ARRAY_SIZE(nvme_devs),
+	.sanitise = pick_random_ioctl,
+	.ioctls = nvme_ioctls,
+	.ioctls_cnt = ARRAY_SIZE(nvme_ioctls),
+};
+
+REG_IOCTL_GROUP(nvme_grp_block);
-- 
2.6.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [RFC PATCH] nvme ioctl support
  2015-12-15 14:19 [RFC PATCH] nvme ioctl support Johannes Thumshirn
@ 2015-12-15 15:43 ` Dave Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Jones @ 2015-12-15 15:43 UTC (permalink / raw)
  To: Johannes Thumshirn; +Cc: trinity

On Tue, Dec 15, 2015 at 03:19:04PM +0100, Johannes Thumshirn wrote:
 > Add support for NVMe ioctls
 > 
 > Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>

Looks good, applied and pushed out.

thanks,
	Dave

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-15 15:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-15 14:19 [RFC PATCH] nvme ioctl support Johannes Thumshirn
2015-12-15 15:43 ` Dave Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.