aboutsummaryrefslogtreecommitdiff
path: root/drivers/nvme/nvme.c
diff options
context:
space:
mode:
authorMoritz Fischer <moritzf@google.com>2024-01-10 05:04:47 +0000
committerTom Rini <trini@konsulko.com>2024-01-18 20:24:13 -0500
commit5775b0f78774ceb352ca73c4a070d99d1c6dc52b (patch)
treed990bf59de88e7a8004a592c4bf9317d00e66967 /drivers/nvme/nvme.c
parent040834703497bafb81fce88a92d8e54c8837fcaa (diff)
downloadu-boot-5775b0f78774ceb352ca73c4a070d99d1c6dc52b.zip
u-boot-5775b0f78774ceb352ca73c4a070d99d1c6dc52b.tar.gz
u-boot-5775b0f78774ceb352ca73c4a070d99d1c6dc52b.tar.bz2
nvme: Fix error code and log to indicate busy
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>
Diffstat (limited to 'drivers/nvme/nvme.c')
-rw-r--r--drivers/nvme/nvme.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c
index c39cd41..ec45f83 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;
}