aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nvme.h
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew.r.wilcox@intel.com>2013-04-16 15:21:06 -0400
committerMatthew Wilcox <matthew.r.wilcox@intel.com>2013-04-16 15:21:06 -0400
commit1c9b52651dad0ff1fa71fc6205c86d972f25bcc0 (patch)
tree387be3d96798e7b5c4d35accd3067d4095552387 /include/linux/nvme.h
parentaf2d9ca744af5e03390eeb3864d08ce75c860899 (diff)
NVMe: Fix endian-related problems in user I/O submission path
When constructing the command, dsmgmt needs to be treated as a 32-bit value, not a 16-bit value. reftag, apptag and appmask all need to be converted from native-endian to little-endian. Again, sparse's bitwise warnings caught this problem. Thanks to Keith for pointing out the correct way to fix the reftag. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com> Acked-by: Keith Busch <keith.busch@intel.com>
Diffstat (limited to 'include/linux/nvme.h')
-rw-r--r--include/linux/nvme.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 09f419d4da4e..7ae7ecfc0947 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -207,11 +207,11 @@ struct nvme_common_command {
207 __u8 flags; 207 __u8 flags;
208 __u16 command_id; 208 __u16 command_id;
209 __le32 nsid; 209 __le32 nsid;
210 __u32 cdw2[2]; 210 __le32 cdw2[2];
211 __le64 metadata; 211 __le64 metadata;
212 __le64 prp1; 212 __le64 prp1;
213 __le64 prp2; 213 __le64 prp2;
214 __u32 cdw10[6]; 214 __le32 cdw10[6];
215}; 215};
216 216
217struct nvme_rw_command { 217struct nvme_rw_command {