Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1707704 > unrolled thread

[PATCH] nvme: fix directive command numd calculation

Started bykwan.huen@ssi.samsung.com
First post2017-08-09 20:30 +0200
Last post2017-08-10 18:50 +0200
Articles 5 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH] nvme: fix directive command numd calculation kwan.huen@ssi.samsung.com - 2017-08-09 20:30 +0200
    Re: [PATCH] nvme: fix directive command numd calculation Jens Axboe <axboe@kernel.dk> - 2017-08-09 21:30 +0200
      Re: [PATCH] nvme: fix directive command numd calculation Christoph Hellwig <hch@lst.de> - 2017-08-10 10:40 +0200
        Re: [PATCH] nvme: fix directive command numd calculation Christoph Hellwig <hch@lst.de> - 2017-08-10 13:10 +0200
          Re: [PATCH] nvme: fix directive command numd calculation Jens Axboe <axboe@kernel.dk> - 2017-08-10 18:50 +0200

#1707704 — [PATCH] nvme: fix directive command numd calculation

Fromkwan.huen@ssi.samsung.com
Date2017-08-09 20:30 +0200
Subject[PATCH] nvme: fix directive command numd calculation
Message-ID<ucDU0-2tC-57@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1707767

FromJens Axboe <axboe@kernel.dk>
Date2017-08-09 21:30 +0200
Message-ID<ucEQ2-39z-13@gated-at.bofh.it>
In reply to#1707704
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

[toc] | [prev] | [next] | [standalone]


#1708321

FromChristoph Hellwig <hch@lst.de>
Date2017-08-10 10:40 +0200
Message-ID<ucRay-2Vl-13@gated-at.bofh.it>
In reply to#1707767
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?

[toc] | [prev] | [next] | [standalone]


#1708448

FromChristoph Hellwig <hch@lst.de>
Date2017-08-10 13:10 +0200
Message-ID<ucTvJ-4OI-39@gated-at.bofh.it>
In reply to#1708321
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.

[toc] | [prev] | [next] | [standalone]


#1708855

FromJens Axboe <axboe@kernel.dk>
Date2017-08-10 18:50 +0200
Message-ID<ucYOJ-8aT-9@gated-at.bofh.it>
In reply to#1708448
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web