* [PATCH v2] nvme: add a Identify Namespace Identification Descriptor list quirk
@ 2020-07-29 5:44 Christoph Hellwig
2020-07-29 5:56 ` Sagi Grimberg
2020-07-29 18:15 ` Chaitanya Kulkarni
0 siblings, 2 replies; 3+ messages in thread
From: Christoph Hellwig @ 2020-07-29 5:44 UTC (permalink / raw)
To: kbusch, linux-nvme; +Cc: Ingo Brunberg, Sagi Grimberg
Add a quirk for a device that does not support the Identify Namespace
Identification Descriptor list despite claiming 1.3 compliance.
Reported-by: Ingo Brunberg <ingo_brunberg@web.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Ingo Brunberg <ingo_brunberg@web.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
---
Now actually against nvme-5.8, and with cosmetic modifications to
reduce the amount of merge conflicts vs the 5.9 branch..
drivers/nvme/host/core.c | 15 +++------------
drivers/nvme/host/nvme.h | 7 +++++++
drivers/nvme/host/pci.c | 2 ++
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index add040168e67e2..4ee2330c603e77 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1102,6 +1102,9 @@ static int nvme_identify_ns_descs(struct nvme_ctrl *ctrl, unsigned nsid,
int pos;
int len;
+ if (ctrl->quirks & NVME_QUIRK_NO_NS_DESC_LIST)
+ return 0;
+
c.identify.opcode = nvme_admin_identify;
c.identify.nsid = cpu_to_le32(nsid);
c.identify.cns = NVME_ID_CNS_NS_DESC_LIST;
@@ -1115,18 +1118,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))
- status = 0;
goto free_data;
}
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 1de3f9b827aa56..09ffc3246f60e4 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -129,6 +129,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 25a187e43dbe74..d4b1ff7471231b 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3099,6 +3099,8 @@ static const struct pci_device_id nvme_id_table[] = {
{ PCI_VDEVICE(INTEL, 0x5845), /* Qemu emulated controller */
.driver_data = NVME_QUIRK_IDENTIFY_CNS |
NVME_QUIRK_DISABLE_WRITE_ZEROES, },
+ { PCI_DEVICE(0x126f, 0x2263), /* Silicon Motion unidentified */
+ .driver_data = NVME_QUIRK_NO_NS_DESC_LIST, },
{ PCI_DEVICE(0x1bb1, 0x0100), /* Seagate Nytro Flash Storage */
.driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY, },
{ PCI_DEVICE(0x1c58, 0x0003), /* HGST adapter */
--
2.27.0
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] nvme: add a Identify Namespace Identification Descriptor list quirk
2020-07-29 5:44 [PATCH v2] nvme: add a Identify Namespace Identification Descriptor list quirk Christoph Hellwig
@ 2020-07-29 5:56 ` Sagi Grimberg
2020-07-29 18:15 ` Chaitanya Kulkarni
1 sibling, 0 replies; 3+ messages in thread
From: Sagi Grimberg @ 2020-07-29 5:56 UTC (permalink / raw)
To: Christoph Hellwig, kbusch, linux-nvme; +Cc: Ingo Brunberg
This needs a fixes tag to catch the regression that exposed the quirky
controller.
Fixes: ea43d9709f72 ("nvme: fix identify error status silent ignore")
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] nvme: add a Identify Namespace Identification Descriptor list quirk
2020-07-29 5:44 [PATCH v2] nvme: add a Identify Namespace Identification Descriptor list quirk Christoph Hellwig
2020-07-29 5:56 ` Sagi Grimberg
@ 2020-07-29 18:15 ` Chaitanya Kulkarni
1 sibling, 0 replies; 3+ messages in thread
From: Chaitanya Kulkarni @ 2020-07-29 18:15 UTC (permalink / raw)
To: Christoph Hellwig, kbusch, linux-nvme; +Cc: Ingo Brunberg, Sagi Grimberg
On 7/28/20 22:52, Christoph Hellwig wrote:
> Add a quirk for a device that does not support the Identify Namespace
> Identification Descriptor list despite claiming 1.3 compliance.
>
> Reported-by: Ingo Brunberg<ingo_brunberg@web.de>
> Signed-off-by: Christoph Hellwig<hch@lst.de>
> Tested-by: Ingo Brunberg<ingo_brunberg@web.de>
> Reviewed-by: Sagi Grimberg<sagi@grimberg.me>
Looks good, with fixes tag.
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-29 18:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-29 5:44 [PATCH v2] nvme: add a Identify Namespace Identification Descriptor list quirk Christoph Hellwig
2020-07-29 5:56 ` Sagi Grimberg
2020-07-29 18:15 ` Chaitanya Kulkarni
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.