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 2/2] nvme: Update scan namespace to keep trying on busy
Date: Sat, 16 Dec 2023 20:11:19 +0000 [thread overview]
Message-ID: <20231216201120.2735840-2-moritzf@google.com> (raw)
In-Reply-To: <20231216201120.2735840-1-moritzf@google.com>
A busy controller shouldn't be game-over for all controllers,
so keep trying on hitting -EBUSY.
This change brings the actual behavior of the routine in line
with what the descriptions says.
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, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c
index ec45f831a3..59a139baa0 100644
--- a/drivers/nvme/nvme.c
+++ b/drivers/nvme/nvme.c
@@ -695,7 +695,9 @@ int nvme_scan_namespace(void)
if (ret) {
log_err("Failed to probe '%s': err=%dE\n", dev->name,
ret);
- return ret;
+ /* Bail if we ran out of memory, else keep trying */
+ if (ret != -EBUSY)
+ return ret;
}
}
--
2.43.0.472.g3155946c3a-goog
prev parent reply other threads:[~2023-12-16 20:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Moritz Fischer [this message]
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=20231216201120.2735840-2-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 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.