All of lore.kernel.org
 help / color / mirror / Atom feed
From: minwoo.im.dev@gmail.com (Minwoo Im)
Subject: [PATCH v2 2/3] nvme: move sqsize setting to the core
Date: Tue, 23 Jul 2019 22:58:42 +0900	[thread overview]
Message-ID: <20190723135842.GE7148@minwoo-desktop> (raw)
In-Reply-To: <20190723000654.6448-3-sagi@grimberg.me>

On 19-07-22 17:06:53, Sagi Grimberg wrote:
> nvme_enable_ctrl reads the cap register right after, so
> no need to do that locally in the transport driver. Have
> sqsize setting in nvme_init_identify.

Okay, I think it looks better.  Please ignore my comments on previous
patch, but the review tag :)


> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> index bb970ca82517..e11d50599a51 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -1695,7 +1695,7 @@ static int nvme_pci_configure_admin_queue(struct nvme_dev *dev)
>  	lo_hi_writeq(nvmeq->sq_dma_addr, dev->bar + NVME_REG_ASQ);
>  	lo_hi_writeq(nvmeq->cq_dma_addr, dev->bar + NVME_REG_ACQ);
>  
> -	result = nvme_enable_ctrl(&dev->ctrl, dev->ctrl.cap);
> +	result = nvme_enable_ctrl(&dev->ctrl);
>  	if (result)
>  		return result;
>  
> @@ -2316,6 +2316,7 @@ static int nvme_pci_enable(struct nvme_dev *dev)
>  
>  	dev->q_depth = min_t(int, NVME_CAP_MQES(dev->ctrl.cap) + 1,
>  				io_queue_depth);
> +	dev->ctrl.sqsize = dev->q_depth - 1; /* 0's based queue depth */

Sagi,

It seems like could be split into another commit, couldn't it?  It's
because that PCIe host driver never set the sqsize in my experience.  If
so, can we have it in another commit?

If I miss something here, please let me know :)

Thanks,
	Minwoo Im

  reply	other threads:[~2019-07-23 13:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-23  0:06 [PATCH v2 0/3] small set of nvme cleanups Sagi Grimberg
2019-07-23  0:06 ` [PATCH v2 1/3] nvme: have nvme_init_identify set ctrl->cap Sagi Grimberg
2019-07-23 13:43   ` Minwoo Im
2019-07-23 15:59   ` James Smart
2019-07-23 17:31     ` Sagi Grimberg
2019-07-23  0:06 ` [PATCH v2 2/3] nvme: move sqsize setting to the core Sagi Grimberg
2019-07-23 13:58   ` Minwoo Im [this message]
2019-07-23  0:06 ` [PATCH v2 3/3] nvme: don't pass cap to nvme_disable_ctrl Sagi Grimberg
2019-07-23 13:59   ` Minwoo Im

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190723135842.GE7148@minwoo-desktop \
    --to=minwoo.im.dev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.