Skip to content

Commit

Permalink
nvme: fix directive command numd calculation
Browse files Browse the repository at this point in the history
The numd field of directive receive command takes number of dwords to
transfer. This fix has the correct calculation for numd.

Signed-off-by: Kwan (Hingkwan) Huen-SSI <kwan.huen@samsung.com>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
Kwan (Hingkwan) Huen-SSI authored and Christoph Hellwig committed Aug 10, 2017
1 parent 634b832 commit a082b42
Showing 1 changed file with 1 addition and 1 deletion.
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 = cpu_to_le32(sizeof(*s));
c.directive.numd = cpu_to_le32((sizeof(*s) >> 2) - 1);
c.directive.doper = NVME_DIR_RCV_ST_OP_PARAM;
c.directive.dtype = NVME_DIR_STREAMS;

Expand Down

0 comments on commit a082b42

Please sign in to comment.