diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-09 15:49:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-09 15:49:01 -0400 |
commit | 126e76ffbf78d9e948b641aadb265d16c57f5a3d (patch) | |
tree | 656e7838f0ec057936b80e15a774911df05c6005 /include/linux/nvme.h | |
parent | fbd01410e89a66f346ba1b3c0161e1198449b746 (diff) | |
parent | 175206cf9ab63161dec74d9cd7f9992e062491f5 (diff) |
Merge branch 'for-4.14/block-postmerge' of git://git.kernel.dk/linux-block
Pull followup block layer updates from Jens Axboe:
"I ended up splitting the main pull request for this series into two,
mainly because of clashes between NVMe fixes that went into 4.13 after
the for-4.14 branches were split off. This pull request is mostly
NVMe, but not exclusively. In detail, it contains:
- Two pull request for NVMe changes from Christoph. Nothing new on
the feature front, basically just fixes all over the map for the
core bits, transport, rdma, etc.
- Series from Bart, cleaning up various bits in the BFQ scheduler.
- Series of bcache fixes, which has been lingering for a release or
two. Coly sent this in, but patches from various people in this
area.
- Set of patches for BFQ from Paolo himself, updating both
documentation and fixing some corner cases in performance.
- Series from Omar, attempting to now get the 4k loop support
correct. Our confidence level is higher this time.
- Series from Shaohua for loop as well, improving O_DIRECT
performance and fixing a use-after-free"
* 'for-4.14/block-postmerge' of git://git.kernel.dk/linux-block: (74 commits)
bcache: initialize dirty stripes in flash_dev_run()
loop: set physical block size to logical block size
bcache: fix bch_hprint crash and improve output
bcache: Update continue_at() documentation
bcache: silence static checker warning
bcache: fix for gc and write-back race
bcache: increase the number of open buckets
bcache: Correct return value for sysfs attach errors
bcache: correct cache_dirty_target in __update_writeback_rate()
bcache: gc does not work when triggering by manual command
bcache: Don't reinvent the wheel but use existing llist API
bcache: do not subtract sectors_to_gc for bypassed IO
bcache: fix sequential large write IO bypass
bcache: Fix leak of bdev reference
block/loop: remove unused field
block/loop: fix use after free
bfq: Use icq_to_bic() consistently
bfq: Suppress compiler warnings about comparisons
bfq: Check kstrtoul() return value
bfq: Declare local functions static
...
Diffstat (limited to 'include/linux/nvme.h')
-rw-r--r-- | include/linux/nvme.h | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/include/linux/nvme.h b/include/linux/nvme.h index 8efff888bd9b..5144f9103723 100644 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h | |||
@@ -32,6 +32,8 @@ | |||
32 | 32 | ||
33 | #define NVME_RDMA_IP_PORT 4420 | 33 | #define NVME_RDMA_IP_PORT 4420 |
34 | 34 | ||
35 | #define NVME_NSID_ALL 0xffffffff | ||
36 | |||
35 | enum nvme_subsys_type { | 37 | enum nvme_subsys_type { |
36 | NVME_NQN_DISC = 1, /* Discovery type target subsystem */ | 38 | NVME_NQN_DISC = 1, /* Discovery type target subsystem */ |
37 | NVME_NQN_NVME = 2, /* NVME type target subsystem */ | 39 | NVME_NQN_NVME = 2, /* NVME type target subsystem */ |
@@ -133,19 +135,26 @@ enum { | |||
133 | enum { | 135 | enum { |
134 | NVME_CC_ENABLE = 1 << 0, | 136 | NVME_CC_ENABLE = 1 << 0, |
135 | NVME_CC_CSS_NVM = 0 << 4, | 137 | NVME_CC_CSS_NVM = 0 << 4, |
138 | NVME_CC_EN_SHIFT = 0, | ||
139 | NVME_CC_CSS_SHIFT = 4, | ||
136 | NVME_CC_MPS_SHIFT = 7, | 140 | NVME_CC_MPS_SHIFT = 7, |
137 | NVME_CC_ARB_RR = 0 << 11, | 141 | NVME_CC_AMS_SHIFT = 11, |
138 | NVME_CC_ARB_WRRU = 1 << 11, | 142 | NVME_CC_SHN_SHIFT = 14, |
139 | NVME_CC_ARB_VS = 7 << 11, | 143 | NVME_CC_IOSQES_SHIFT = 16, |
140 | NVME_CC_SHN_NONE = 0 << 14, | 144 | NVME_CC_IOCQES_SHIFT = 20, |
141 | NVME_CC_SHN_NORMAL = 1 << 14, | 145 | NVME_CC_AMS_RR = 0 << NVME_CC_AMS_SHIFT, |
142 | NVME_CC_SHN_ABRUPT = 2 << 14, | 146 | NVME_CC_AMS_WRRU = 1 << NVME_CC_AMS_SHIFT, |
143 | NVME_CC_SHN_MASK = 3 << 14, | 147 | NVME_CC_AMS_VS = 7 << NVME_CC_AMS_SHIFT, |
144 | NVME_CC_IOSQES = NVME_NVM_IOSQES << 16, | 148 | NVME_CC_SHN_NONE = 0 << NVME_CC_SHN_SHIFT, |
145 | NVME_CC_IOCQES = NVME_NVM_IOCQES << 20, | 149 | NVME_CC_SHN_NORMAL = 1 << NVME_CC_SHN_SHIFT, |
150 | NVME_CC_SHN_ABRUPT = 2 << NVME_CC_SHN_SHIFT, | ||
151 | NVME_CC_SHN_MASK = 3 << NVME_CC_SHN_SHIFT, | ||
152 | NVME_CC_IOSQES = NVME_NVM_IOSQES << NVME_CC_IOSQES_SHIFT, | ||
153 | NVME_CC_IOCQES = NVME_NVM_IOCQES << NVME_CC_IOCQES_SHIFT, | ||
146 | NVME_CSTS_RDY = 1 << 0, | 154 | NVME_CSTS_RDY = 1 << 0, |
147 | NVME_CSTS_CFS = 1 << 1, | 155 | NVME_CSTS_CFS = 1 << 1, |
148 | NVME_CSTS_NSSRO = 1 << 4, | 156 | NVME_CSTS_NSSRO = 1 << 4, |
157 | NVME_CSTS_PP = 1 << 5, | ||
149 | NVME_CSTS_SHST_NORMAL = 0 << 2, | 158 | NVME_CSTS_SHST_NORMAL = 0 << 2, |
150 | NVME_CSTS_SHST_OCCUR = 1 << 2, | 159 | NVME_CSTS_SHST_OCCUR = 1 << 2, |
151 | NVME_CSTS_SHST_CMPLT = 2 << 2, | 160 | NVME_CSTS_SHST_CMPLT = 2 << 2, |
@@ -251,6 +260,7 @@ enum { | |||
251 | NVME_CTRL_ONCS_WRITE_UNCORRECTABLE = 1 << 1, | 260 | NVME_CTRL_ONCS_WRITE_UNCORRECTABLE = 1 << 1, |
252 | NVME_CTRL_ONCS_DSM = 1 << 2, | 261 | NVME_CTRL_ONCS_DSM = 1 << 2, |
253 | NVME_CTRL_ONCS_WRITE_ZEROES = 1 << 3, | 262 | NVME_CTRL_ONCS_WRITE_ZEROES = 1 << 3, |
263 | NVME_CTRL_ONCS_TIMESTAMP = 1 << 6, | ||
254 | NVME_CTRL_VWC_PRESENT = 1 << 0, | 264 | NVME_CTRL_VWC_PRESENT = 1 << 0, |
255 | NVME_CTRL_OACS_SEC_SUPP = 1 << 0, | 265 | NVME_CTRL_OACS_SEC_SUPP = 1 << 0, |
256 | NVME_CTRL_OACS_DIRECTIVES = 1 << 5, | 266 | NVME_CTRL_OACS_DIRECTIVES = 1 << 5, |
@@ -376,6 +386,13 @@ struct nvme_smart_log { | |||
376 | __u8 rsvd216[296]; | 386 | __u8 rsvd216[296]; |
377 | }; | 387 | }; |
378 | 388 | ||
389 | struct nvme_fw_slot_info_log { | ||
390 | __u8 afi; | ||
391 | __u8 rsvd1[7]; | ||
392 | __le64 frs[7]; | ||
393 | __u8 rsvd64[448]; | ||
394 | }; | ||
395 | |||
379 | enum { | 396 | enum { |
380 | NVME_SMART_CRIT_SPARE = 1 << 0, | 397 | NVME_SMART_CRIT_SPARE = 1 << 0, |
381 | NVME_SMART_CRIT_TEMPERATURE = 1 << 1, | 398 | NVME_SMART_CRIT_TEMPERATURE = 1 << 1, |
@@ -386,6 +403,7 @@ enum { | |||
386 | 403 | ||
387 | enum { | 404 | enum { |
388 | NVME_AER_NOTICE_NS_CHANGED = 0x0002, | 405 | NVME_AER_NOTICE_NS_CHANGED = 0x0002, |
406 | NVME_AER_NOTICE_FW_ACT_STARTING = 0x0102, | ||
389 | }; | 407 | }; |
390 | 408 | ||
391 | struct nvme_lba_range_type { | 409 | struct nvme_lba_range_type { |
@@ -677,6 +695,7 @@ enum { | |||
677 | NVME_FEAT_ASYNC_EVENT = 0x0b, | 695 | NVME_FEAT_ASYNC_EVENT = 0x0b, |
678 | NVME_FEAT_AUTO_PST = 0x0c, | 696 | NVME_FEAT_AUTO_PST = 0x0c, |
679 | NVME_FEAT_HOST_MEM_BUF = 0x0d, | 697 | NVME_FEAT_HOST_MEM_BUF = 0x0d, |
698 | NVME_FEAT_TIMESTAMP = 0x0e, | ||
680 | NVME_FEAT_KATO = 0x0f, | 699 | NVME_FEAT_KATO = 0x0f, |
681 | NVME_FEAT_SW_PROGRESS = 0x80, | 700 | NVME_FEAT_SW_PROGRESS = 0x80, |
682 | NVME_FEAT_HOST_ID = 0x81, | 701 | NVME_FEAT_HOST_ID = 0x81, |