* [PATCH v2 RESEND 1/2] nvme: Fix error code and log to indicate busy
@ 2024-01-10 5:04 Moritz Fischer
2024-01-10 5:04 ` [PATCH v2 RESEND 2/2] nvme: Update nvme_scan_namespace to keep trying on busy Moritz Fischer
2024-01-19 16:09 ` [PATCH v2 RESEND 1/2] nvme: Fix error code and log to indicate busy Tom Rini
0 siblings, 2 replies; 6+ messages in thread
From: Moritz Fischer @ 2024-01-10 5:04 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>
---
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] 6+ messages in thread* [PATCH v2 RESEND 2/2] nvme: Update nvme_scan_namespace to keep trying on busy
2024-01-10 5:04 [PATCH v2 RESEND 1/2] nvme: Fix error code and log to indicate busy Moritz Fischer
@ 2024-01-10 5:04 ` Moritz Fischer
2024-01-18 22:29 ` Moritz Fischer
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
1 sibling, 2 replies; 6+ messages in thread
From: Moritz Fischer @ 2024-01-10 5:04 UTC (permalink / raw)
To: bmeng.cn, sjg, wenbin.song, u-boot, trini; +Cc: mdf, patrick, Moritz Fischer
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>
---
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
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH v2 RESEND 2/2] nvme: Update nvme_scan_namespace to keep trying on busy
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
1 sibling, 1 reply; 6+ messages in thread
From: Moritz Fischer @ 2024-01-18 22:29 UTC (permalink / raw)
To: Moritz Fischer; +Cc: bmeng.cn, sjg, wenbin.song, u-boot, trini, patrick
On Tue, Jan 9, 2024 at 9:05 PM Moritz Fischer <moritzf@google.com> wrote:
>
> 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>
> ---
> 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
>
Gently ping on this. Is anything wrong with this series or why does it
keep falling through the cracks?
- Moritz
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH v2 RESEND 2/2] nvme: Update nvme_scan_namespace to keep trying on busy
2024-01-18 22:29 ` Moritz Fischer
@ 2024-01-18 23:03 ` Tom Rini
0 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2024-01-18 23:03 UTC (permalink / raw)
To: Moritz Fischer
Cc: Moritz Fischer, bmeng.cn, sjg, wenbin.song, u-boot, patrick
[-- Attachment #1: Type: text/plain, Size: 1563 bytes --]
On Thu, Jan 18, 2024 at 02:29:11PM -0800, Moritz Fischer wrote:
> On Tue, Jan 9, 2024 at 9:05 PM Moritz Fischer <moritzf@google.com> wrote:
> >
> > 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>
> > ---
> > 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
> >
>
> Gently ping on this. Is anything wrong with this series or why does it
> keep falling through the cracks?
Randomly, I'm testing this (and your other patches, and some others) at
the moment. Sorry for the delay.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 RESEND 2/2] nvme: Update nvme_scan_namespace to keep trying on busy
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-19 16:09 ` Tom Rini
1 sibling, 0 replies; 6+ messages in thread
From: Tom Rini @ 2024-01-19 16:09 UTC (permalink / raw)
To: Moritz Fischer; +Cc: bmeng.cn, sjg, wenbin.song, u-boot, mdf, patrick
[-- Attachment #1: Type: text/plain, Size: 492 bytes --]
On Wed, Jan 10, 2024 at 05:04:48AM +0000, Moritz Fischer wrote:
> 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>
Applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 RESEND 1/2] nvme: Fix error code and log to indicate busy
2024-01-10 5:04 [PATCH v2 RESEND 1/2] nvme: Fix error code and log to indicate busy Moritz Fischer
2024-01-10 5:04 ` [PATCH v2 RESEND 2/2] nvme: Update nvme_scan_namespace to keep trying on busy Moritz Fischer
@ 2024-01-19 16:09 ` Tom Rini
1 sibling, 0 replies; 6+ messages in thread
From: Tom Rini @ 2024-01-19 16:09 UTC (permalink / raw)
To: Moritz Fischer; +Cc: bmeng.cn, sjg, wenbin.song, u-boot, mdf, patrick
[-- Attachment #1: Type: text/plain, Size: 395 bytes --]
On Wed, Jan 10, 2024 at 05:04:47AM +0000, Moritz Fischer wrote:
> 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>
Applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-01-19 16:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-10 5:04 [PATCH v2 RESEND 1/2] nvme: Fix error code and log to indicate busy Moritz Fischer
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox