[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aLta40FO1Ud6TZ4T@kbusch-mbp>
Date: Fri, 5 Sep 2025 15:49:23 -0600
From: Keith Busch <kbusch@...nel.org>
To: Kamaljit Singh <kamaljit.singh@...nsource.wdc.com>
Cc: axboe@...nel.dk, hch@....de, sagi@...mberg.me,
linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org,
cassel@...nel.org, dlemoal@...nel.org, kamaljit.singh1@....com
Subject: Re: [PATCH v1 1/1] nvme-core: exclude ioccsz/iorcsz checks for admin
ctrlr
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@...nsource.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.
Powered by blists - more mailing lists