aboutsummaryrefslogtreecommitdiff
path: root/drivers/nvme/nvme.c
diff options
context:
space:
mode:
authorMoritz Fischer <moritzf@google.com>2024-01-10 05:04:48 +0000
committerTom Rini <trini@konsulko.com>2024-01-18 20:24:13 -0500
commit85946d69d6f5a309564e7e89386cfcaff75d0b86 (patch)
tree5abcbbc2b628b84b896a24691656855d86ff306d /drivers/nvme/nvme.c
parent5775b0f78774ceb352ca73c4a070d99d1c6dc52b (diff)
downloadu-boot-85946d69d6f5a309564e7e89386cfcaff75d0b86.zip
u-boot-85946d69d6f5a309564e7e89386cfcaff75d0b86.tar.gz
u-boot-85946d69d6f5a309564e7e89386cfcaff75d0b86.tar.bz2
nvme: Update nvme_scan_namespace to keep trying on busy
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>
Diffstat (limited to 'drivers/nvme/nvme.c')
-rw-r--r--drivers/nvme/nvme.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c
index ec45f83..59a139b 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;
}
}