History

Merge branch 'for-3.20' of git://git.infradead.org/users/kbusch/linux-nvme into for-linus

Merge 3.20 NVMe changes from Keith.

Jens Axboe committed 11 years ago

Commit decf6d72 parents 045c47c 0c0f9b94 files · +414 −213Browse files

Showing the changes to include (2 of 4 files). Show all

Unified · Split

2 files
  1. include/linux/nvme.h +4 −5
  2. include/uapi/linux/nvme.h +25 −1
include/linux/nvme.h+4−5
@@ -17,7 +17,6 @@ · 16 unmodified lines
1717
1818 #include <uapi/linux/nvme.h>
1919 #include <linux/pci.h>
20−#include <linux/miscdevice.h>
2120 #include <linux/kref.h>
2221 #include <linux/blk-mq.h>
2322
@@ -62,8 +61,6 @@ enum { · 38 unmodified lines
6261 NVME_CSTS_SHST_MASK = 3 << 2,
6362 };
6463
65−#define NVME_VS(major, minor) (major << 16 | minor)
66−
6764 extern unsigned char nvme_io_timeout;
6865 #define NVME_IO_TIMEOUT (nvme_io_timeout * HZ)
6966
@@ -91,9 +88,10 @@ struct nvme_dev { · 21 unmodified lines
9188 struct nvme_bar __iomem *bar;
9289 struct list_head namespaces;
9390 struct kref kref;
94− struct miscdevice miscdev;
91+ struct device *device;
9592 work_func_t reset_workfn;
9693 struct work_struct reset_work;
94+ struct work_struct probe_work;
9795 char name[12];
9896 char serial[20];
9997 char model[40];
@@ -105,7 +103,6 @@ struct nvme_dev { · 5 unmodified lines
105103 u16 abort_limit;
106104 u8 event_limit;
107105 u8 vwc;
108− u8 initialized;
109106 };
110107
111108 /*
@@ -121,6 +118,7 @@ struct nvme_ns { · 9 unmodified lines
121118 unsigned ns_id;
122119 int lba_shift;
123120 int ms;
121+ int pi_type;
124122 u64 mode_select_num_blocks;
125123 u32 mode_select_block_len;
126124 };
@@ -138,6 +136,7 @@ struct nvme_iod { · 11 unmodified lines
138136 int nents; /* Used in scatterlist */
139137 int length; /* Of data, in bytes */
140138 dma_addr_t first_dma;
139+ struct scatterlist meta_sg[1]; /* metadata requires single contiguous buffer */
141140 struct scatterlist sg[0];
142141 };
143142
include/uapi/linux/nvme.h+25−1
@@ -115,7 +115,13 @@ struct nvme_id_ns { · 114 unmodified lines
115115 __le16 nawun;
116116 __le16 nawupf;
117117 __le16 nacwu;
118− __u8 rsvd40[80];
118+ __le16 nabsn;
119+ __le16 nabo;
120+ __le16 nabspf;
121+ __u16 rsvd46;
122+ __le64 nvmcap[2];
123+ __u8 rsvd64[40];
124+ __u8 nguid[16];
119125 __u8 eui64[8];
120126 struct nvme_lbaf lbaf[16];
121127 __u8 rsvd192[192];
@@ -124,10 +130,22 @@ struct nvme_id_ns { · 2 unmodified lines
124130
125131 enum {
126132 NVME_NS_FEAT_THIN = 1 << 0,
133+ NVME_NS_FLBAS_LBA_MASK = 0xf,
134+ NVME_NS_FLBAS_META_EXT = 0x10,
127135 NVME_LBAF_RP_BEST = 0,
128136 NVME_LBAF_RP_BETTER = 1,
129137 NVME_LBAF_RP_GOOD = 2,
130138 NVME_LBAF_RP_DEGRADED = 3,
139+ NVME_NS_DPC_PI_LAST = 1 << 4,
140+ NVME_NS_DPC_PI_FIRST = 1 << 3,
141+ NVME_NS_DPC_PI_TYPE3 = 1 << 2,
142+ NVME_NS_DPC_PI_TYPE2 = 1 << 1,
143+ NVME_NS_DPC_PI_TYPE1 = 1 << 0,
144+ NVME_NS_DPS_PI_FIRST = 1 << 3,
145+ NVME_NS_DPS_PI_MASK = 0x7,
146+ NVME_NS_DPS_PI_TYPE1 = 1,
147+ NVME_NS_DPS_PI_TYPE2 = 2,
148+ NVME_NS_DPS_PI_TYPE3 = 3,
131149 };
132150
133151 struct nvme_smart_log {
@@ -261,6 +279,10 @@ enum { · 127 unmodified lines
261279 NVME_RW_DSM_LATENCY_LOW = 3 << 4,
262280 NVME_RW_DSM_SEQ_REQ = 1 << 6,
263281 NVME_RW_DSM_COMPRESSED = 1 << 7,
282+ NVME_RW_PRINFO_PRCHK_REF = 1 << 10,
283+ NVME_RW_PRINFO_PRCHK_APP = 1 << 11,
284+ NVME_RW_PRINFO_PRCHK_GUARD = 1 << 12,
285+ NVME_RW_PRINFO_PRACT = 1 << 13,
264286 };
265287
266288 struct nvme_dsm_cmd {
@@ -549,6 +571,8 @@ struct nvme_passthru_cmd { · 282 unmodified lines
549571 __u32 result;
550572 };
551573
574+#define NVME_VS(major, minor) (((major) << 16) | ((minor) << 8))
575+
552576 #define nvme_admin_cmd nvme_passthru_cmd
553577
554578 #define NVME_IOCTL_ID _IO('N', 0x40)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t