]> Git Repo - J-u-boot.git/commitdiff
nvme: Fix error code and log to indicate busy
authorMoritz Fischer <[email protected]>
Wed, 10 Jan 2024 05:04:47 +0000 (05:04 +0000)
committerTom Rini <[email protected]>
Fri, 19 Jan 2024 01:24:13 +0000 (20:24 -0500)
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 <[email protected]>
Signed-off-by: Moritz Fischer <[email protected]>
drivers/nvme/nvme.c

index c39cd41aa38e3bdc9c9047407cd6a965c12cbff2..ec45f831a36f840e29be0b8a5fb39ee318fc3b69 100644 (file)
@@ -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;
        }
 
This page took 0.035482 seconds and 4 git commands to generate.