Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
nvme.c File Reference
#include <linux/nvme.h>
#include <linux/bio.h>
#include <linux/bitops.h>
#include <linux/blkdev.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/genhd.h>
#include <linux/idr.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/kdev_t.h>
#include <linux/kthread.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/pci.h>
#include <linux/poison.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <asm-generic/io-64-nonatomic-lo-hi.h>

Go to the source code of this file.

Data Structures

struct  nvme_dev
 
struct  nvme_ns
 
struct  nvme_queue
 
struct  nvme_cmd_info
 
struct  nvme_iod
 
struct  sync_cmd_info
 

Macros

#define NVME_Q_DEPTH   1024
 
#define SQ_SIZE(depth)   (depth * sizeof(struct nvme_command))
 
#define CQ_SIZE(depth)   (depth * sizeof(struct nvme_completion))
 
#define NVME_MINORS   64
 
#define NVME_IO_TIMEOUT   (5 * HZ)
 
#define ADMIN_TIMEOUT   (60 * HZ)
 
#define CMD_CTX_BASE   ((void *)POISON_POINTER_DELTA)
 
#define CMD_CTX_CANCELLED   (0x30C + CMD_CTX_BASE)
 
#define CMD_CTX_COMPLETED   (0x310 + CMD_CTX_BASE)
 
#define CMD_CTX_INVALID   (0x314 + CMD_CTX_BASE)
 
#define CMD_CTX_FLUSH   (0x318 + CMD_CTX_BASE)
 
#define BIOVEC_NOT_VIRT_MERGEABLE(vec1, vec2)
 
#define nvme_error_detected   NULL
 
#define nvme_dump_registers   NULL
 
#define nvme_link_reset   NULL
 
#define nvme_slot_reset   NULL
 
#define nvme_error_resume   NULL
 
#define nvme_suspend   NULL
 
#define nvme_resume   NULL
 
#define PCI_CLASS_STORAGE_EXPRESS   0x010802
 

Typedefs

typedef void(* nvme_completion_fn )(struct nvme_dev *, void *, struct nvme_completion *)
 

Functions

 module_param (nvme_major, int, 0)
 
 module_param (use_threaded_interrupts, int, 0)
 
 MODULE_DEVICE_TABLE (pci, nvme_id_table)
 
 MODULE_AUTHOR ("Matthew Wilcox <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_VERSION ("0.8")
 
 module_init (nvme_init)
 
 module_exit (nvme_exit)
 

Macro Definition Documentation

#define ADMIN_TIMEOUT   (60 * HZ)

Definition at line 50 of file nvme.c.

#define BIOVEC_NOT_VIRT_MERGEABLE (   vec1,
  vec2 
)
Value:
((vec2)->bv_offset || \
(((vec1)->bv_offset + (vec1)->bv_len) % PAGE_SIZE))

Definition at line 473 of file nvme.c.

#define CMD_CTX_BASE   ((void *)POISON_POINTER_DELTA)

Definition at line 198 of file nvme.c.

#define CMD_CTX_CANCELLED   (0x30C + CMD_CTX_BASE)

Definition at line 199 of file nvme.c.

#define CMD_CTX_COMPLETED   (0x310 + CMD_CTX_BASE)

Definition at line 200 of file nvme.c.

#define CMD_CTX_FLUSH   (0x318 + CMD_CTX_BASE)

Definition at line 202 of file nvme.c.

#define CMD_CTX_INVALID   (0x314 + CMD_CTX_BASE)

Definition at line 201 of file nvme.c.

#define CQ_SIZE (   depth)    (depth * sizeof(struct nvme_completion))

Definition at line 47 of file nvme.c.

#define nvme_dump_registers   NULL

Definition at line 1722 of file nvme.c.

#define nvme_error_detected   NULL

Definition at line 1721 of file nvme.c.

#define nvme_error_resume   NULL

Definition at line 1725 of file nvme.c.

#define NVME_IO_TIMEOUT   (5 * HZ)

Definition at line 49 of file nvme.c.

#define nvme_link_reset   NULL

Definition at line 1723 of file nvme.c.

#define NVME_MINORS   64

Definition at line 48 of file nvme.c.

#define NVME_Q_DEPTH   1024

Definition at line 45 of file nvme.c.

#define nvme_resume   NULL

Definition at line 1727 of file nvme.c.

#define nvme_slot_reset   NULL

Definition at line 1724 of file nvme.c.

#define nvme_suspend   NULL

Definition at line 1726 of file nvme.c.

#define PCI_CLASS_STORAGE_EXPRESS   0x010802

Definition at line 1738 of file nvme.c.

#define SQ_SIZE (   depth)    (depth * sizeof(struct nvme_command))

Definition at line 46 of file nvme.c.

Typedef Documentation

typedef void(* nvme_completion_fn)(struct nvme_dev *, void *, struct nvme_completion *)

Definition at line 140 of file nvme.c.

Function Documentation

MODULE_AUTHOR ( "Matthew Wilcox <[email protected]>"  )
MODULE_DEVICE_TABLE ( pci  ,
nvme_id_table   
)
module_exit ( nvme_exit  )
module_init ( nvme_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( nvme_major  ,
int  ,
 
)
module_param ( use_threaded_interrupts  ,
int  ,
 
)
MODULE_VERSION ( "0.8"  )