All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Kamaljit Singh <kamaljit.singh@opensource.wdc.com>
Cc: axboe@kernel.dk, hch@lst.de, sagi@grimberg.me,
	linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
	cassel@kernel.org, dlemoal@kernel.org, kamaljit.singh1@wdc.com
Subject: Re: [PATCH v1 1/1] nvme-core: exclude ioccsz/iorcsz checks for admin ctrlr
Date: Fri, 5 Sep 2025 15:49:23 -0600	[thread overview]
Message-ID: <aLta40FO1Ud6TZ4T@kbusch-mbp> (raw)
In-Reply-To: <20250905211002.1937414-2-kamaljit.singh@opensource.wdc.com>

On Fri, Sep 05, 2025 at 02:10:01PM -0700, Kamaljit Singh wrote:
> An administrative controller does not support I/O queues, hence it
> should exclude existing checks for IOCCSZ/IORCSZ.
> 
> Signed-off-by: Kamaljit Singh <kamaljit.singh@opensource.wdc.com>
> ---
>  drivers/nvme/host/core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index d67545bd7abb..ac72bae800a9 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -3491,14 +3491,14 @@ static int nvme_check_ctrl_fabric_info(struct nvme_ctrl *ctrl, struct nvme_id_ct
>  		return -EINVAL;
>  	}
>  
> -	if (!nvme_discovery_ctrl(ctrl) && ctrl->ioccsz < 4) {
> +	if (!nvmf_discovery_ctrl(ctrl) && !nvme_admin_ctrl(ctrl) && ctrl->ioccsz < 4) {
>  		dev_err(ctrl->device,
>  			"I/O queue command capsule supported size %d < 4\n",
>  			ctrl->ioccsz);
>  		return -EINVAL;
>  	}
>  
> -	if (!nvme_discovery_ctrl(ctrl) && ctrl->iorcsz < 1) {
> +	if (!nvmf_discovery_ctrl(ctrl) && !nvme_admin_ctrl(ctrl) && ctrl->iorcsz < 1) {

Excessive line length over 80 chars.

Perhaps, though, we should have a helper to indicate IO controllers
rather than chaining conditions for everything that isn't one.


  reply	other threads:[~2025-09-06  0:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-05 21:10 [PATCH v1 0/1] Preclude IOCCSZ/IORCSZ validation for admin controller connect Kamaljit Singh
2025-09-05 21:10 ` [PATCH v1 1/1] nvme-core: exclude ioccsz/iorcsz checks for admin ctrlr Kamaljit Singh
2025-09-05 21:49   ` Keith Busch [this message]
2025-09-05 22:14     ` Kamaljit Singh

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=aLta40FO1Ud6TZ4T@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=cassel@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=hch@lst.de \
    --cc=kamaljit.singh1@wdc.com \
    --cc=kamaljit.singh@opensource.wdc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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.