From: Tony Dinh Date: Sat, 7 Oct 2023 03:34:28 +0000 (-0700) Subject: bootstd: sata: bootdev scanning for ahci sata with no drive attached X-Git-Url: http://git.dujemihanovic.xyz/html/index.html?a=commitdiff_plain;h=1052920aa987061f4d2aaa768dfe0ba15b6f10f7;p=u-boot.git bootstd: sata: bootdev scanning for ahci sata with no drive attached 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 Reviewed-by: Simon Glass Reviewed-by: Stefan Roese --- diff --git a/drivers/ata/sata.c b/drivers/ata/sata.c index f126b84e05..dcb5fcf476 100644 --- a/drivers/ata/sata.c +++ b/drivers/ata/sata.c @@ -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; }