All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] nvme: Fix error code and log to indicate busy
@ 2023-12-16 20:11 Moritz Fischer
  2023-12-16 20:11 ` [PATCH v2 2/2] nvme: Update scan namespace to keep trying on busy Moritz Fischer
  0 siblings, 1 reply; 2+ messages in thread
From: Moritz Fischer @ 2023-12-16 20:11 UTC (permalink / raw)
  To: bmeng.cn, sjg, wenbin.song, u-boot, trini; +Cc: mdf, patrick, Moritz Fischer

Return -EBUSY if controller is found busy rather than -ENOMEM
and update the error message accordingly.

Fixes: 982388eaa991 ("nvme: Add NVM Express driver support")
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Moritz Fischer <moritzf@google.com>
---
Changes from V1:
- Added Simon's Reviewed-by
---
 drivers/nvme/nvme.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c
index c39cd41aa3..ec45f831a3 100644
--- a/drivers/nvme/nvme.c
+++ b/drivers/nvme/nvme.c
@@ -835,8 +835,8 @@ int nvme_init(struct udevice *udev)
 	ndev->udev = udev;
 	INIT_LIST_HEAD(&ndev->namespaces);
 	if (readl(&ndev->bar->csts) == -1) {
-		ret = -ENODEV;
-		printf("Error: %s: Out of memory!\n", udev->name);
+		ret = -EBUSY;
+		printf("Error: %s: Controller not ready!\n", udev->name);
 		goto free_nvme;
 	}
 
-- 
2.43.0.472.g3155946c3a-goog


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-16 20:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-16 20:11 [PATCH v2 1/2] nvme: Fix error code and log to indicate busy Moritz Fischer
2023-12-16 20:11 ` [PATCH v2 2/2] nvme: Update scan namespace to keep trying on busy Moritz Fischer

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.