public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Joel Granados <j.granados@samsung.com>
To: Christoph Hellwig <hch@lst.de>
Cc: kbusch@kernel.org, sagi@grimberg.me, joshi.k@samsung.com,
	linux-nvme@lists.infradead.org, gost.dev@samsung.com,
	k.jensen@samsung.com, "Javier González" <javier.gonz@samsung.com>,
	"Chaitanya Kulkarni" <kch@nvidia.com>
Subject: Re: [PATCH 3/6] nvme: generalize the nvme_multi_css check in nvme_scan_ns
Date: Thu, 21 Jul 2022 11:54:20 +0200	[thread overview]
Message-ID: <20220721095420.gzvrf7o3ndsszxd2@localhost> (raw)
In-Reply-To: <20220721060320.1704646-4-hch@lst.de>

[-- Attachment #1: Type: text/plain, Size: 1728 bytes --]

On Thu, Jul 21, 2022 at 08:03:17AM +0200, Christoph Hellwig wrote:
> Check for multiple command set support early on an error out if is
> not supported when a !NVM command set namespace is found.  This
> prepares for adding command set independent passthrough support.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Javier González <javier.gonz@samsung.com>
> Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
> Reviewed-by: Kanchan Joshi <joshi.k@samsung.com>
> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
> ---
>  drivers/nvme/host/core.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index af3b90ca9131d..5ba09d010daba 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -4295,6 +4295,12 @@ static void nvme_scan_ns(struct nvme_ctrl *ctrl, unsigned nsid)
>  	if (nvme_identify_ns_descs(ctrl, nsid, &ids))
>  		return;
>  
> +	if (ids.csi != NVME_CSI_NVM && !nvme_multi_css(ctrl)) {
> +		dev_warn(ctrl->device,
> +			"command set not reported for nsid: %d\n", nsid);
> +		return;
> +	}
> +
>  	/*
>  	 * Check if the namespace is ready.  If not ignore it, we will get an
>  	 * AEN once it becomes ready and restart the scan.
> @@ -4326,12 +4332,6 @@ static void nvme_scan_ns(struct nvme_ctrl *ctrl, unsigned nsid)
>  				nsid);
>  			break;
>  		}
> -		if (!nvme_multi_css(ctrl)) {
> -			dev_warn(ctrl->device,
> -				"command set not reported for nsid: %d\n",
> -				nsid);
> -			break;
> -		}
>  		nvme_alloc_ns(ctrl, nsid, &ids);
>  		break;
>  	default:
> -- 
> 2.30.2
> 
LGTM
Reviewed-by: Joel Granados <j.granados@samsung.com>


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2022-07-21  9:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-21  6:03 enable generic interface (/dev/ngX) for unknown command sets v3 Christoph Hellwig
2022-07-21  6:03 ` [PATCH 1/6] nvme: catch -ENODEV from nvme_revalidate_zones again Christoph Hellwig
2022-07-21  9:53   ` Joel Granados
2022-07-21  6:03 ` [PATCH 2/6] nvme: rename nvme_validate_or_alloc_ns to nvme_scan_ns Christoph Hellwig
2022-07-21  6:03 ` [PATCH 3/6] nvme: generalize the nvme_multi_css check in nvme_scan_ns Christoph Hellwig
2022-07-21  9:54   ` Joel Granados [this message]
2022-07-21  6:03 ` [PATCH 4/6] nvme: refactor namespace probing Christoph Hellwig
2022-07-21  9:36   ` Joel Granados
2022-07-21  6:03 ` [PATCH 5/6] nvme: factor out a nvme_ns_is_readonly helper Christoph Hellwig
2022-07-21  9:54   ` Joel Granados
2022-07-21  6:03 ` [PATCH 6/6] nvme: enable generic interface (/dev/ngXnY) for unknown command sets Christoph Hellwig
2022-07-21 22:17 ` enable generic interface (/dev/ngX) for unknown command sets v3 Sagi Grimberg

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=20220721095420.gzvrf7o3ndsszxd2@localhost \
    --to=j.granados@samsung.com \
    --cc=gost.dev@samsung.com \
    --cc=hch@lst.de \
    --cc=javier.gonz@samsung.com \
    --cc=joshi.k@samsung.com \
    --cc=k.jensen@samsung.com \
    --cc=kbusch@kernel.org \
    --cc=kch@nvidia.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox