aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Dinh <mibodhi@gmail.com>2023-10-06 20:34:28 -0700
committerTom Rini <trini@konsulko.com>2023-10-23 13:07:23 -0400
commit1052920aa987061f4d2aaa768dfe0ba15b6f10f7 (patch)
tree798e669b565ccf85a7256ca97509f02089ca48b3
parenta7527fbbf20619e16f4b3bf13139f6f9a881b964 (diff)
downloadu-boot-WIP/2023-10-23-bootstd-fixes-and-improvements.zip
u-boot-WIP/2023-10-23-bootstd-fixes-and-improvements.tar.gz
u-boot-WIP/2023-10-23-bootstd-fixes-and-improvements.tar.bz2
bootstd: sata: bootdev scanning for ahci sata with no drive attachedWIP/2023-10-23-bootstd-fixes-and-improvements
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>
-rw-r--r--drivers/ata/sata.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/ata/sata.c b/drivers/ata/sata.c
index f126b84..dcb5fcf 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;
}