Skip to contentSkip to conversation

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

PATCH RESEND In review Tony Dinh 4 participants 4 messages Oct 7, 2023 – Oct 23, 2023 libata

lore
Share & tools
lore

Tony Dinh

author
#0 lore raw

PATCH RESEND 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]/

Resend the right patch.

---

 drivers/ata/sata.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/ata/sata.c +6 -0
index f126b84e05..dcb5fcf476 100644
@@ -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;
 }
 
Signature · 1 line
2.39.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 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]/

Quoted 7 lines

Resend the right patch.

---

 drivers/ata/sata.c | 6 ++++++
 1 file changed, 6 insertions(+)
Reviewed-by on v1 1/1
#2 lore raw
In reply to Tony Dinh
Quoted 9 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]/

Resend the right patch.

Thanks,
Stefan

Quoted 12 lines

---

  drivers/ata/sata.c | 6 ++++++
  1 file changed, 6 insertions(+)
drivers/ata/sata.c +0 -0
index f126b84e05..dcb5fcf476 100644
@@ -79,6 +79,12 @@ int sata_rescan(bool verbose)
 
  	ret = uclass_probe_all(UCLASS_AHCI);

drivers/ata/sata.c int sata_rescan(bool verbose) · line 90

Quoted 10 lines
drivers/ata/sata.c +6 -0
 
+	if (ret == -ENODEV) {
+		if (verbose)
+			printf("No SATA block device found\n");
+		return 0;
+	}
+
  	return ret;
  }
 

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]