linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nvme: Namepace identification descriptor list is optional
@ 2019-12-02 15:56 Keith Busch
  2019-12-02 16:15 ` Christoph Hellwig
  2020-07-10  8:22 ` Ingo Brunberg
  0 siblings, 2 replies; 18+ messages in thread
From: Keith Busch @ 2019-12-02 15:56 UTC (permalink / raw)
  To: linux-nvme; +Cc: Keith Busch, Ingo Brunberg, hch, stable, Sagi Grimberg

Despite NVM Express specification 1.3 requires a controller claiming to
be 1.3 or higher implement Identify CNS 03h (Namespace Identification
Descriptor list), the driver doesn't really need this identification in
order to use a namespace. The code had already documented in comments
that we're not to consider an error to this command.

Return success if the controller provided any response to an
namespace identification descriptors command.

Fixes: 538af88ea7d9de24 ("nvme: make nvme_report_ns_ids propagate error back")
Reported-by: Ingo Brunberg <ingo_brunberg@web.de>
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: stable@vger.kernel.org # 5.4+
Signed-off-by: Keith Busch <kbusch@kernel.org>
---
 drivers/nvme/host/core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index e6ee34376c5e..2a84e1402244 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1735,6 +1735,8 @@ static int nvme_report_ns_ids(struct nvme_ctrl *ctrl, unsigned int nsid,
 		if (ret)
 			dev_warn(ctrl->device,
 				 "Identify Descriptors failed (%d)\n", ret);
+		if (ret > 0)
+			ret = 0;
 	}
 	return ret;
 }
-- 
2.21.0


_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply related	[flat|nested] 18+ messages in thread
[parent not found: <d163890a-a469-e71c-45b7-f63e1efee04e@intel.com>]

end of thread, other threads:[~2020-07-28 16:01 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-02 15:56 [PATCH] nvme: Namepace identification descriptor list is optional Keith Busch
2019-12-02 16:15 ` Christoph Hellwig
2019-12-02 16:22   ` Keith Busch
2019-12-02 16:27     ` Nadolski, Edmund
2019-12-02 16:29       ` Christoph Hellwig
2019-12-02 16:45         ` Nadolski, Edmund
2019-12-02 16:49         ` Keith Busch
2019-12-02 17:34           ` Christoph Hellwig
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).