]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
bootstd: sata: bootdev scanning for ahci sata with no drive attached
authorTony Dinh <mibodhi@gmail.com>
Sat, 7 Oct 2023 03:34:28 +0000 (20:34 -0700)
committerTom Rini <trini@konsulko.com>
Mon, 23 Oct 2023 17:07:23 +0000 (13:07 -0400)
It's normal to have no SATA drive attached to the controller, so return a
successful status when there is no block device found after probing.

Note: this patch depends on the previous patch
https://patchwork.ozlabs.org/project/uboot/patch/20230917230649.30357-1-mibodhi@gmail.com/

Resend the right patch.

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
drivers/ata/sata.c

index f126b84e0501731ee638c303465461313b397f1d..dcb5fcf476b5323be89bce5fe0a1bf0109811011 100644 (file)
@@ -79,6 +79,12 @@ int sata_rescan(bool verbose)
 
        ret = uclass_probe_all(UCLASS_AHCI);
 
+       if (ret == -ENODEV) {
+               if (verbose)
+                       printf("No SATA block device found\n");
+               return 0;
+       }
+
        return ret;
 }