From: Ingo Brunberg <ingo_brunberg@web.de>
To: Christoph Hellwig <hch@infradead.org>
Cc: sagi@grimberg.me, linux-nvme@lists.infradead.org
Subject: Re: [PATCH] nvme: Namepace identification descriptor list is optional
Date: Tue, 28 Jul 2020 16:41:14 +0200 [thread overview]
Message-ID: <m3zh7jhfcl.fsf@web.de> (raw)
In-Reply-To: <20200728110825.GA20833@infradead.org> (message from Christoph Hellwig on Tue, 28 Jul 2020 12:08:25 +0100)
Christoph Hellwig <hch@infradead.org> writes:
> Please try this patch:
>
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 05aa568a60af62..0602e0f3e77de9 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -1287,18 +1287,6 @@ static int nvme_identify_ns_descs(struct nvme_ctrl *ctrl, unsigned nsid,
> if (status) {
> dev_warn(ctrl->device,
> "Identify Descriptors failed (%d)\n", status);
> - /*
> - * Don't treat non-retryable errors as fatal, as we potentially
> - * already have a NGUID or EUI-64. If we failed with DNR set,
> - * we want to silently ignore the error as we can still
> - * identify the device, but if the status has DNR set, we want
> - * to propagate the error back specifically for the disk
> - * revalidation flow to make sure we don't abandon the
> - * device just because of a temporal retry-able error (such
> - * as path of transport errors).
> - */
> - if (status > 0 && (status & NVME_SC_DNR) && !nvme_multi_css(ctrl))
> - status = 0;
> goto free_data;
> }
>
> @@ -1888,7 +1876,9 @@ static int nvme_report_ns_ids(struct nvme_ctrl *ctrl, unsigned int nsid,
> memcpy(ids->eui64, id->eui64, sizeof(id->eui64));
> if (ctrl->vs >= NVME_VS(1, 2, 0))
> memcpy(ids->nguid, id->nguid, sizeof(id->nguid));
> - if (ctrl->vs >= NVME_VS(1, 3, 0) || nvme_multi_css(ctrl))
> + if (nvme_multi_css(ctrl) ||
> + (ctrl->vs >= NVME_VS(1, 3, 0) &&
> + !(ctrl->quirks & NVME_QUIRK_NO_NS_DESC_LIST)))
> return nvme_identify_ns_descs(ctrl, nsid, ids);
> return 0;
> }
> diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
> index c5c1bac797aa5a..4cadaea9034ae4 100644
> --- a/drivers/nvme/host/nvme.h
> +++ b/drivers/nvme/host/nvme.h
> @@ -137,6 +137,13 @@ enum nvme_quirks {
> * Don't change the value of the temperature threshold feature
> */
> NVME_QUIRK_NO_TEMP_THRESH_CHANGE = (1 << 14),
> +
> + /*
> + * The controller doesn't handle the Identify Namespace
> + * Identification Descriptor list subcommand despite claiming
> + * NVMe 1.3 compliance.
> + */
> + NVME_QUIRK_NO_NS_DESC_LIST = (1 << 15),
> };
>
> /*
> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> index 61e612d52d61d6..bac3a3f9c79e0d 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -3181,6 +3181,8 @@ static const struct pci_device_id nvme_id_table[] = {
> { PCI_DEVICE(0x1cc1, 0x8201), /* ADATA SX8200PNP 512GB */
> .driver_data = NVME_QUIRK_NO_DEEPEST_PS |
> NVME_QUIRK_IGNORE_DEV_SUBNQN, },
> + { PCI_DEVICE(0x126f, 0x2263),
> + .driver_data = NVME_QUIRK_NO_NS_DESC_LIST, },
> { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) },
> { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2001),
> .driver_data = NVME_QUIRK_SINGLE_VECTOR },
Thanks, the patch works. Maybe it is not too late to make its way into
kernel 5.8.
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2020-07-28 14:47 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-02 15:56 [PATCH] nvme: Namepace identification descriptor list is optional Keith Busch
2019-12-02 15:56 ` Keith Busch
2019-12-02 16:15 ` Christoph Hellwig
2019-12-02 16:15 ` Christoph Hellwig
2019-12-02 16:22 ` Keith Busch
2019-12-02 16:22 ` Keith Busch
2019-12-02 16:27 ` Nadolski, Edmund
2019-12-02 16:27 ` Nadolski, Edmund
2019-12-02 16:29 ` Christoph Hellwig
2019-12-02 16:29 ` Christoph Hellwig
2019-12-02 16:45 ` Nadolski, Edmund
2019-12-02 16:45 ` Nadolski, Edmund
2019-12-02 16:49 ` Keith Busch
2019-12-02 16:49 ` Keith Busch
2019-12-02 17:34 ` Christoph Hellwig
2019-12-02 17:34 ` Christoph Hellwig
2019-12-02 21:21 ` Keith Busch
2019-12-02 21:21 ` Keith Busch
2020-07-10 8:22 ` Ingo Brunberg
2020-07-22 23:23 ` Sagi Grimberg
2020-07-23 1:23 ` Ingo Brunberg
2020-07-28 11:08 ` Christoph Hellwig
2020-07-28 14:41 ` Ingo Brunberg [this message]
2020-07-28 16:01 ` Sagi Grimberg
[not found] <d163890a-a469-e71c-45b7-f63e1efee04e@intel.com>
2020-07-12 9:31 ` Ingo Brunberg
2020-07-12 17:03 ` Rajashekar, Revanth
2020-07-14 15:21 ` Keith Busch
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=m3zh7jhfcl.fsf@web.de \
--to=ingo_brunberg@web.de \
--cc=hch@infradead.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.