All of lore.kernel.org
 help / color / mirror / Atom feed
* [RESEND PATCH] bootstd: sata: bootdev scanning for ahci sata with no drive attached
@ 2023-10-07  3:34 Tony Dinh
  2023-10-07 23:10 ` Simon Glass
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tony Dinh @ 2023-10-07  3:34 UTC (permalink / raw)
  To: Simon Glass, U-Boot Mailing List; +Cc: Stefan Roese, Tom Rini, 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/20230917230649.30357-1-mibodhi@gmail.com/

Resend the right patch.

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
---

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [RESEND PATCH] bootstd: sata: bootdev scanning for ahci sata with no drive attached
  2023-10-07  3:34 [RESEND PATCH] bootstd: sata: bootdev scanning for ahci sata with no drive attached Tony Dinh
@ 2023-10-07 23:10 ` Simon Glass
  2023-10-16  8:32 ` Stefan Roese
  2023-10-23 19:08 ` Tom Rini
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Glass @ 2023-10-07 23:10 UTC (permalink / raw)
  To: Tony Dinh; +Cc: U-Boot Mailing List, Stefan Roese, Tom Rini

On Fri, 6 Oct 2023 at 21:34, Tony Dinh <mibodhi@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/
>
> Resend the right patch.
>
> Signed-off-by: Tony Dinh <mibodhi@gmail.com>
> ---
>
>  drivers/ata/sata.c | 6 ++++++
>  1 file changed, 6 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RESEND PATCH] bootstd: sata: bootdev scanning for ahci sata with no drive attached
  2023-10-07  3:34 [RESEND PATCH] bootstd: sata: bootdev scanning for ahci sata with no drive attached Tony Dinh
  2023-10-07 23:10 ` Simon Glass
@ 2023-10-16  8:32 ` Stefan Roese
  2023-10-23 19:08 ` Tom Rini
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Roese @ 2023-10-16  8:32 UTC (permalink / raw)
  To: Tony Dinh, Simon Glass, U-Boot Mailing List; +Cc: Tom Rini

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/20230917230649.30357-1-mibodhi@gmail.com/
> 
> Resend the right patch.
> 
> Signed-off-by: Tony Dinh <mibodhi@gmail.com>

Reviewed-by: Stefan Roese <sr@denx.de>

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: sr@denx.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RESEND PATCH] bootstd: sata: bootdev scanning for ahci sata with no drive attached
  2023-10-07  3:34 [RESEND PATCH] bootstd: sata: bootdev scanning for ahci sata with no drive attached Tony Dinh
  2023-10-07 23:10 ` Simon Glass
  2023-10-16  8:32 ` Stefan Roese
@ 2023-10-23 19:08 ` Tom Rini
  2 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2023-10-23 19:08 UTC (permalink / raw)
  To: u-boot, Simon Glass, Tony Dinh; +Cc: Stefan Roese

On Fri, 06 Oct 2023 20:34:28 -0700, 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/20230917230649.30357-1-mibodhi@gmail.com/
> 
> Resend the right patch.
> 
> [...]

Applied to u-boot/master, thanks!

-- 
Tom


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-10-23 19:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-07  3:34 [RESEND PATCH] bootstd: sata: bootdev scanning for ahci sata with no drive attached Tony Dinh
2023-10-07 23:10 ` Simon Glass
2023-10-16  8:32 ` Stefan Roese
2023-10-23 19:08 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.