Skip to contentSkip to conversation

bootstd: sata: bootdev scanning for ahci sata with no drive attached

PATCH Superseded Tony Dinh 1 participant 2 messages Oct 7, 2023 libata

lore
Share & tools
lore

Tony Dinh

author
#0 lore raw

PATCH 1/1 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/[email protected]/

---

 drivers/ata/sata.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/ata/sata.c +5 -0
index f126b84e05..59c40a829f 100644
@@ -79,6 +79,11 @@ int sata_rescan(bool verbose)
 
 	ret = uclass_probe_all(UCLASS_AHCI);
 
+	if (verbose && ret == -ENODEV) {
+		printf("No SATA block device found\n");
+		return 0;
+	}
+
 	return ret;
 }
 
Signature · 1 line
2.39.2
author
#1 lore raw
Quoted 30 lines · Tony Dinh

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/[email protected]/

---

 drivers/ata/sata.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/ata/sata.c +5 -1
index f126b84e05..59c40a829f 100644
@@ -79,6 +79,11 @@ int sata_rescan(bool verbose)
 
        ret = uclass_probe_all(UCLASS_AHCI);
 
+       if (verbose && ret == -ENODEV) {
+               printf("No SATA block device found\n");
+               return 0;
+       }
+
        return ret;
 }
 
--
Quoted 2 lines

2.39.2

Sorry, I need to resend this patch (fat finger).

All the best,
Tony