summaryrefslogtreecommitdiffstats
path: root/drivers/nvme
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-04-21 10:43:13 +0200
committerChristoph Hellwig <hch@lst.de>2017-04-24 09:18:26 +0200
commit8ad76cf10012b625800a9764c5af08dbc0948ff7 (patch)
tree5468ede68a159d4cc719b545ffaa588715867ca0 /drivers/nvme
parentnvmet-fc: mark the sqhd field as __le16 (diff)
downloadlinux-8ad76cf10012b625800a9764c5af08dbc0948ff7.tar.xz
linux-8ad76cf10012b625800a9764c5af08dbc0948ff7.zip
nvmet-fc: properly endian swap sq_head
Found by sparse. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: James Smart <james.smart@broadcom.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/target/fc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/target/fc.c b/drivers/nvme/target/fc.c
index 4392b514725b..62eba29c85fb 100644
--- a/drivers/nvme/target/fc.c
+++ b/drivers/nvme/target/fc.c
@@ -1700,7 +1700,7 @@ nvmet_fc_prep_fcp_rsp(struct nvmet_fc_tgtport *tgtport,
xfr_length != fod->total_length ||
(le16_to_cpu(cqe->status) & 0xFFFE) || cqewd[0] || cqewd[1] ||
(sqe->flags & (NVME_CMD_FUSE_FIRST | NVME_CMD_FUSE_SECOND)) ||
- queue_90percent_full(fod->queue, cqe->sq_head))
+ queue_90percent_full(fod->queue, le16_to_cpu(cqe->sq_head)))
send_ersp = true;
/* re-set the fields */