From 5e82e952f04681c10f35e02ee0a4a43ec027137a Mon Sep 17 00:00:00 2001 From: Keith Busch Date: Tue, 19 Feb 2013 10:17:58 -0700 Subject: NVMe: Add a character device for each nvme device Registers a miscellaneous device for each nvme controller probed. This creates character device files as /dev/nvmeN, where N is the device instance, and supports nvme admin ioctl commands so devices without namespaces can be managed. Signed-off-by: Keith Busch Signed-off-by: Matthew Wilcox --- include/linux/nvme.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/linux') diff --git a/include/linux/nvme.h b/include/linux/nvme.h index 7ae7ecfc0947..9b6fba872f47 100644 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h @@ -507,6 +507,8 @@ struct nvme_admin_cmd { #ifdef __KERNEL__ #include +#include +#include #define NVME_IO_TIMEOUT (5 * HZ) @@ -527,6 +529,9 @@ struct nvme_dev { struct msix_entry *entry; struct nvme_bar __iomem *bar; struct list_head namespaces; + struct kref kref; + struct miscdevice miscdev; + char name[12]; char serial[20]; char model[40]; char firmware_rev[8]; -- cgit v1.2.3