[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230810225109.13973-1-alexandru.gagniuc@hp.com>
Date: Thu, 10 Aug 2023 22:51:09 +0000
From: Alexandru Gagniuc <alexandru.gagniuc@...com>
To: stern@...land.harvard.edu
Cc: alexandru.gagniuc@...com,
bjorn@...k.no,
davem@...emloft.net,
edumazet@...gle.com,
eniac-xw.zhang@...com,
hayeswang@...ltek.com,
jflf_kernel@....com,
kuba@...nel.org,
linux-kernel@...r.kernel.org,
linux-usb@...r.kernel.org,
netdev@...r.kernel.org,
pabeni@...hat.com,
stable@...r.kernel.org,
svenva@...omium.org
Subject: Re: [PATCH v2] r8152: Suspend USB device before shutdown when WoL is enabled
On Thu, Aug 10, 2023 at 01:34:39PM -0400, Alan Stern wrote:
> On Thu, Aug 10, 2023 at 04:22:16PM +0000, Alexandru Gagniuc wrote:
> > On Wed, Aug 02, 2023 at 11:23:46AM -0400, Alan Stern wrote:
> > >
> > > Indeed. And I am asking how you can be sure the host controller driver
> > > (or some other part of the software stack) doesn't have this bug.
> >
> > The only way that I have to show that is empirical. I observe that WoL from S5
> > does not work on a device with an r8153 chip. I apply the change, and verify
> > that WoL from S5 now works in this scenario. What are you thinking of in terms
> > of being sure no current or future bug exists?
>
> I was thinking that the host controller driver's shutdown method might
> turn off power to all of the ports.
>
> For example, in the ehci-hcd driver, ehci_shutdown() calls
> ehci_silence_controller(), which calls ehci_turn_off_all_ports(). I
> don't know if xhci-hcd does anything similar.
EHCI is a different beast. I don't think EHCI (USB2.0) has the U3 link state.
The equivalent for would be xhci_shutdown(). It makes a call to
usb_disable_xhci_ports() for XHCI_SPURIOUS_REBOOT quirk. As I have not
encountered it, I don't know how it will affect the link state of other ports.
The quirk appears to switch ports to EHCI mode, rather than turn off power.
Alex
Powered by blists - more mailing lists