public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Moritz Fischer <moritzf@google.com>
To: bmeng.cn@gmail.com, sjg@chromium.org, wenbin.song@nxp.com,
	 u-boot@lists.denx.de, trini@konsulko.com
Cc: mdf@kernel.org, patrick@blueri.se, Moritz Fischer <moritzf@google.com>
Subject: [PATCH v2 RESEND 1/2] nvme: Fix error code and log to indicate busy
Date: Wed, 10 Jan 2024 05:04:47 +0000	[thread overview]
Message-ID: <20240110050448.1441657-1-moritzf@google.com> (raw)

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>
---
 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


             reply	other threads:[~2024-01-10  5:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-10  5:04 Moritz Fischer [this message]
2024-01-10  5:04 ` [PATCH v2 RESEND 2/2] nvme: Update nvme_scan_namespace to keep trying on busy Moritz Fischer
2024-01-18 22:29   ` Moritz Fischer
2024-01-18 23:03     ` Tom Rini
2024-01-19 16:09   ` Tom Rini
2024-01-19 16:09 ` [PATCH v2 RESEND 1/2] nvme: Fix error code and log to indicate busy Tom Rini

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=20240110050448.1441657-1-moritzf@google.com \
    --to=moritzf@google.com \
    --cc=bmeng.cn@gmail.com \
    --cc=mdf@kernel.org \
    --cc=patrick@blueri.se \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=wenbin.song@nxp.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox