linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nvme: fix directive command numd calculation
       [not found] <CGME20170809182322epcas2p177ff5f42184c24dcab4a73a9c640916b@epcas2p1.samsung.com>
@ 2017-08-09 18:26 ` kwan.huen
  2017-08-09 19:23   ` Jens Axboe
  0 siblings, 1 reply; 5+ messages in thread
From: kwan.huen @ 2017-08-09 18:26 UTC (permalink / raw)
  To: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg,
	linux-nvme, linux-kernel
  Cc: Kwan (Hingkwan) Huen-SSI

From: "Kwan (Hingkwan) Huen-SSI" <kwan.huen@samsung.com>

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>
---
 drivers/nvme/host/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index c49f1f8..95de9a5 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,
 
 	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;
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] nvme: fix directive command numd calculation
  2017-08-09 18:26 ` [PATCH] nvme: fix directive command numd calculation kwan.huen
@ 2017-08-09 19:23   ` Jens Axboe
  2017-08-10  8:36     ` Christoph Hellwig
  0 siblings, 1 reply; 5+ messages in thread
From: Jens Axboe @ 2017-08-09 19:23 UTC (permalink / raw)
  To: kwan.huen, Keith Busch, Christoph Hellwig, Sagi Grimberg,
	linux-nvme, linux-kernel
  Cc: Kwan (Hingkwan) Huen-SSI

On 08/09/2017 12:26 PM, kwan.huen@ssi.samsung.com wrote:
> From: "Kwan (Hingkwan) Huen-SSI" <kwan.huen@samsung.com>
> 
> The numd field of directive receive command takes number of dwords to 
> transfer. This fix has the correct calculation for numd.

Oops, that's my bad.

Reviewed-by: Jens Axboe <axboe@kernel.dk>

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] nvme: fix directive command numd calculation
  2017-08-09 19:23   ` Jens Axboe
@ 2017-08-10  8:36     ` Christoph Hellwig
  2017-08-10 11:09       ` Christoph Hellwig
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2017-08-10  8:36 UTC (permalink / raw)
  To: Jens Axboe
  Cc: kwan.huen, Keith Busch, Christoph Hellwig, Sagi Grimberg,
	linux-nvme, linux-kernel, Kwan (Hingkwan) Huen-SSI

On Wed, Aug 09, 2017 at 01:23:47PM -0600, Jens Axboe wrote:
> On 08/09/2017 12:26 PM, kwan.huen@ssi.samsung.com wrote:
> > From: "Kwan (Hingkwan) Huen-SSI" <kwan.huen@samsung.com>
> > 
> > The numd field of directive receive command takes number of dwords to 
> > transfer. This fix has the correct calculation for numd.
> 
> Oops, that's my bad.
> 
> Reviewed-by: Jens Axboe <axboe@kernel.dk>

Do you want to take it directly for the block tree?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] nvme: fix directive command numd calculation
  2017-08-10  8:36     ` Christoph Hellwig
@ 2017-08-10 11:09       ` Christoph Hellwig
  2017-08-10 16:46         ` Jens Axboe
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2017-08-10 11:09 UTC (permalink / raw)
  To: Jens Axboe
  Cc: kwan.huen, Keith Busch, Christoph Hellwig, Sagi Grimberg,
	linux-nvme, linux-kernel, Kwan (Hingkwan) Huen-SSI

On Thu, Aug 10, 2017 at 10:36:50AM +0200, Christoph Hellwig wrote:
> Do you want to take it directly for the block tree?

I've actually got a set of nvme 4.13 patches now that I did a sweep
over the list, so I'd be happy to take it.  There is one other
I want to merge pending an ok from Keith.  With that I could send
you a PR tomorrow, so we could still get it into -rc5.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] nvme: fix directive command numd calculation
  2017-08-10 11:09       ` Christoph Hellwig
@ 2017-08-10 16:46         ` Jens Axboe
  0 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2017-08-10 16:46 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: kwan.huen, Keith Busch, Sagi Grimberg, linux-nvme, linux-kernel,
	Kwan (Hingkwan) Huen-SSI

On 08/10/2017 05:09 AM, Christoph Hellwig wrote:
> On Thu, Aug 10, 2017 at 10:36:50AM +0200, Christoph Hellwig wrote:
>> Do you want to take it directly for the block tree?
> 
> I've actually got a set of nvme 4.13 patches now that I did a sweep
> over the list, so I'd be happy to take it.  There is one other
> I want to merge pending an ok from Keith.  With that I could send
> you a PR tomorrow, so we could still get it into -rc5.

Please do just pick it up, as long as it gets queued up for 4.13.

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-08-10 16:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20170809182322epcas2p177ff5f42184c24dcab4a73a9c640916b@epcas2p1.samsung.com>
2017-08-09 18:26 ` [PATCH] nvme: fix directive command numd calculation kwan.huen
2017-08-09 19:23   ` Jens Axboe
2017-08-10  8:36     ` Christoph Hellwig
2017-08-10 11:09       ` Christoph Hellwig
2017-08-10 16:46         ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).