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: 982388eaa9
("nvme: Add NVM Express driver support")
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Moritz Fischer <moritzf@google.com>
This commit is contained in:
@@ -835,8 +835,8 @@ int nvme_init(struct udevice *udev)
|
|||||||
ndev->udev = udev;
|
ndev->udev = udev;
|
||||||
INIT_LIST_HEAD(&ndev->namespaces);
|
INIT_LIST_HEAD(&ndev->namespaces);
|
||||||
if (readl(&ndev->bar->csts) == -1) {
|
if (readl(&ndev->bar->csts) == -1) {
|
||||||
ret = -ENODEV;
|
ret = -EBUSY;
|
||||||
printf("Error: %s: Out of memory!\n", udev->name);
|
printf("Error: %s: Controller not ready!\n", udev->name);
|
||||||
goto free_nvme;
|
goto free_nvme;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user