[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0ifKFXk=odx-dZZZg4G-2+O_8rXRb7++TzPMfN4fFuGVg@mail.gmail.com>
Date: Tue, 3 Sep 2024 14:32:14 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: David Wang <00107082@....com>, rafael@...nel.org, pavel@....cz,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pm: sleep: do not set is_prepared when no_pm_callbacks is set
On Tue, Sep 3, 2024 at 12:42 PM Greg KH <gregkh@...uxfoundation.org> wrote:
>
> On Mon, Sep 02, 2024 at 08:59:33PM +0800, David Wang wrote:
> > When resume, a parent device with no pm callbacks
> > would have "is_prepared" and "direct_complete" bit
> > set, and skip the "fib" chance to unset "is_prepared"
> > in device_resume because of the direct_complete bit.
> > This will trigger a kernel warning when resume its child
> > For example, when suspend system with an USB webcam
> > opened, following warning would show up during resume:
> >
> > >usb 3-1.1: reset high-speed USB device number 4 using xhci_hcd
> > >..
> > >ep_81: PM: parent 3-1.1:1.1 should not be sleeping
> >
> > The device parenting relationships are:
> > [usb 3-1.1] << [uvcvideo 3-1.1:1.1] << [ep_81].
> > When resume, since the virtual [uvcvideo 3-1.1:1.1] device
> > has no pm callbacks, it would not clear "is_prepared"
> > once set. Then, when resume [ep_81], pm module would
> > yield a warn seeing [ep_81]'s parent [uvcvideo 3-1.1:1.1]
> > having "is_prepared".
> >
> > Do not set "is_prepared" for virtual devices having
> > no pm callbacks can clear those kernel warnings.
> >
> > Signed-off-by: David Wang <00107082@....com>
> > ---
> > drivers/base/power/main.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
>
> What commit id does this fix?
It doesn't fix anything, it is introducing a potential issue.
Powered by blists - more mailing lists