Re: git: 4d1161f094dd - main - subr_bus: report DEVICE_SUSPEND failures

From: eweweew rob <der_marner15_at_hotmail.de>
Date: Mon, 01 Apr 2024 10:12:11 UTC
Good afternoon,

Could you please unsubscribe me from the group?

Greets

André
________________________________
From: owner-dev-commits-src-all@freebsd.org <owner-dev-commits-src-all@freebsd.org> on behalf of Quincy Mcrae <qgmcrae@yahoo.com>
Sent: Sunday, January 28, 2024 5:28:23 PM
To: Andriy Gapon <avg@freebsd.org>
Cc: src-committers@freebsd.org <src-committers@freebsd.org>; dev-commits-src-all@freebsd.org <dev-commits-src-all@freebsd.org>; dev-commits-src-main@freebsd.org <dev-commits-src-main@freebsd.org>
Subject: Re: git: 4d1161f094dd - main - subr_bus: report DEVICE_SUSPEND failures

Good afternoon,

Could you please unsubscribe me from the group?

Quincy
Sent from my iPhone

> On Jan 28, 2024, at 9:21 AM, Andriy Gapon <avg@freebsd.org> wrote:
>
> The branch main has been updated by avg:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=4d1161f094dd90428847f7e5989767e9957055f4
>
> commit 4d1161f094dd90428847f7e5989767e9957055f4
> Author:     Andriy Gapon <avg@FreeBSD.org>
> AuthorDate: 2023-01-03 08:39:32 +0000
> Commit:     Andriy Gapon <avg@FreeBSD.org>
> CommitDate: 2024-01-28 13:21:09 +0000
>
>    subr_bus: report DEVICE_SUSPEND failures
>
>    This greatly aids with diagnosing system suspend failures when
>    they are due to a device driver or hardware.
> ---
> sys/kern/subr_bus.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
> index 21c2835f2ae6..c06f3df0c9c9 100644
> --- a/sys/kern/subr_bus.c
> +++ b/sys/kern/subr_bus.c
> @@ -3463,8 +3463,12 @@ bus_generic_suspend_child(device_t dev, device_t child)
>
>    error = DEVICE_SUSPEND(child);
>
> -    if (error == 0)
> +    if (error == 0) {
>        child->flags |= DF_SUSPENDED;
> +    } else {
> +        printf("DEVICE_SUSPEND(%s) failed: %d\n",
> +            device_get_nameunit(child), error);
> +    }
>
>    return (error);
> }
>