diff options
author | Moritz Fischer <moritzf@google.com> | 2024-01-10 05:04:47 +0000 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-01-18 20:24:13 -0500 |
commit | 5775b0f78774ceb352ca73c4a070d99d1c6dc52b (patch) | |
tree | d990bf59de88e7a8004a592c4bf9317d00e66967 /drivers/nvme/nvme.c | |
parent | 040834703497bafb81fce88a92d8e54c8837fcaa (diff) | |
download | u-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.c | 4 |
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; } |