On 10/7/23 05:34, Tony Dinh wrote:
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.

Signed-off-by: Tony Dinh <[email protected]>

Reviewed-by: Stefan Roese <[email protected]>

Thanks,
Stefan

---

  drivers/ata/sata.c | 6 ++++++
  1 file changed, 6 insertions(+)

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;
  }

Viele Grüße,
Stefan Roese

--
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]

Reply via email to