Skip to content

Commit

Permalink
nvme: fix byte swapping in the streams code
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Jul 20, 2017
1 parent 7685168 commit dc1a0af
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion drivers/nvme/host/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ static int nvme_get_stream_params(struct nvme_ctrl *ctrl,

c.directive.opcode = nvme_admin_directive_recv;
c.directive.nsid = cpu_to_le32(nsid);
c.directive.numd = sizeof(*s);
c.directive.numd = cpu_to_le32(sizeof(*s));
c.directive.doper = NVME_DIR_RCV_ST_OP_PARAM;
c.directive.dtype = NVME_DIR_STREAMS;

Expand Down
14 changes: 7 additions & 7 deletions include/linux/nvme.h
Original file line number Diff line number Diff line change
Expand Up @@ -963,14 +963,14 @@ struct nvme_dbbuf {
};

struct streams_directive_params {
__u16 msl;
__u16 nssa;
__u16 nsso;
__le16 msl;
__le16 nssa;
__le16 nsso;
__u8 rsvd[10];
__u32 sws;
__u16 sgs;
__u16 nsa;
__u16 nso;
__le32 sws;
__le16 sgs;
__le16 nsa;
__le16 nso;
__u8 rsvd2[6];
};

Expand Down

0 comments on commit dc1a0af

Please sign in to comment.