[PATCH] bootstd: sata: bootdev scanning for ahci sata with no drive attached

Tony Dinh mibodhi at gmail.com
Sat Oct 7 04:31:24 CEST 2023


On Fri, Oct 6, 2023 at 5:49 PM Tony Dinh <mibodhi at gmail.com> 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/20230917230649.30357-1-mibodhi@gmail.com/
>
> Signed-off-by: Tony Dinh <mibodhi at gmail.com>
> ---
>
>  drivers/ata/sata.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/ata/sata.c b/drivers/ata/sata.c
> index f126b84e05..59c40a829f 100644
> --- a/drivers/ata/sata.c
> +++ b/drivers/ata/sata.c
> @@ -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;
>  }
>
> --
> 2.39.2
>

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

All the best,
Tony


More information about the U-Boot mailing list