aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2013-02-19 12:17:58 -0500
committerMatthew Wilcox <matthew.r.wilcox@intel.com>2013-04-16 15:43:55 -0400
commit5e82e952f04681c10f35e02ee0a4a43ec027137a (patch)
treeac827583d123873bf5fbfdeb2b6b68389a1322af /include/linux
parent1c9b52651dad0ff1fa71fc6205c86d972f25bcc0 (diff)
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 <keith.busch@intel.com> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/nvme.h5
1 files changed, 5 insertions, 0 deletions
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 {
507 507
508#ifdef __KERNEL__ 508#ifdef __KERNEL__
509#include <linux/pci.h> 509#include <linux/pci.h>
510#include <linux/miscdevice.h>
511#include <linux/kref.h>
510 512
511#define NVME_IO_TIMEOUT (5 * HZ) 513#define NVME_IO_TIMEOUT (5 * HZ)
512 514
@@ -527,6 +529,9 @@ struct nvme_dev {
527 struct msix_entry *entry; 529 struct msix_entry *entry;
528 struct nvme_bar __iomem *bar; 530 struct nvme_bar __iomem *bar;
529 struct list_head namespaces; 531 struct list_head namespaces;
532 struct kref kref;
533 struct miscdevice miscdev;
534 char name[12];
530 char serial[20]; 535 char serial[20];
531 char model[40]; 536 char model[40];
532 char firmware_rev[8]; 537 char firmware_rev[8];