summaryrefslogtreecommitdiff
path: root/include/linux/nvme.h
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2017-01-26 17:17:28 +0200
committerJens Axboe <axboe@fb.com>2017-02-22 13:34:00 -0700
commit986994a27587efd8ce4c595cab89b570f7475359 (patch)
treed15adc87e0864d0a79c1a1cfc01bd16edc076710 /include/linux/nvme.h
parent778f067c185ce56d06aedb5fba5a0e98bb464f7b (diff)
nvme: Use CNS as 8-bit field and avoid endianness conversion
This patch defines CNS field as 8-bit field and avoids cpu_to/from_le conversions. Also initialize nvme_command cns value explicitly to NVME_ID_CNS_NS for readability (don't rely on the fact that NVME_ID_CNS_NS = 0). Reviewed-by: Max Gurtovoy <maxg@mellanox.com> Signed-off-by: Parav Pandit <parav@mellanox.com> Reviewed-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/nvme.h')
-rw-r--r--include/linux/nvme.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 0b676a02cf3e..5b32521456d6 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -644,7 +644,9 @@ struct nvme_identify {
__le32 nsid;
__u64 rsvd2[2];
union nvme_data_ptr dptr;
- __le32 cns;
+ __u8 cns;
+ __u8 rsvd3;
+ __le16 ctrlid;
__u32 rsvd11[5];
};