[PATCH 3/6] nvme: generalize the nvme_multi_css check in nvme_scan_ns
Joel Granados
j.granados at samsung.com
Thu Jul 21 02:54:20 PDT 2022
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 at lst.de>
> Reviewed-by: Javier González <javier.gonz at samsung.com>
> Reviewed-by: Sagi Grimberg <sagi at grimberg.me>
> Reviewed-by: Kanchan Joshi <joshi.k at samsung.com>
> Reviewed-by: Chaitanya Kulkarni <kch at 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 at samsung.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-nvme/attachments/20220721/9df6c077/attachment.sig>
More information about the Linux-nvme
mailing list