diff options
author | Kwan (Hingkwan) Huen-SSI <kwan.huen@samsung.com> | 2017-08-09 14:26:29 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2017-08-10 13:53:44 -0400 |
commit | a082b426286d1ead97fb87646ea361d528be023d (patch) | |
tree | c1b780f80bbaf854dc07447a8ccd281ffc791eda /drivers | |
parent | 634b8325905031eeafa61951623681ebc1329385 (diff) |
nvme: fix directive command numd calculation
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/nvme/host/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 6212cf4e9829..37046ac2c441 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c | |||
@@ -336,7 +336,7 @@ static int nvme_get_stream_params(struct nvme_ctrl *ctrl, | |||
336 | 336 | ||
337 | c.directive.opcode = nvme_admin_directive_recv; | 337 | c.directive.opcode = nvme_admin_directive_recv; |
338 | c.directive.nsid = cpu_to_le32(nsid); | 338 | c.directive.nsid = cpu_to_le32(nsid); |
339 | c.directive.numd = cpu_to_le32(sizeof(*s)); | 339 | c.directive.numd = cpu_to_le32((sizeof(*s) >> 2) - 1); |
340 | c.directive.doper = NVME_DIR_RCV_ST_OP_PARAM; | 340 | c.directive.doper = NVME_DIR_RCV_ST_OP_PARAM; |
341 | c.directive.dtype = NVME_DIR_STREAMS; | 341 | c.directive.dtype = NVME_DIR_STREAMS; |
342 | 342 | ||