On Fri, Jan 31, 2025 at 06:06:30PM +0800, Huacai Chen wrote: > Now we only enable the remote wakeup function for the USB wakeup source > itself at usb_port_suspend(). But on pre-XHCI controllers this is not > enough to enable the S3 wakeup function for USB keyboards, Why do you say this? It was enough on my system with an EHCI/UHCI controller when I wrote that code. What hardware do you have that isn't working? > so we also > enable the root_hub's remote wakeup (and disable it on error). Frankly > this is unnecessary for XHCI, but enable it unconditionally make code > simple and seems harmless. This does not make sense. For hubs (including root hubs), enabling remote wakeup means that the hub will generate a wakeup request when there is a connect, disconnect, or over-current change. That's not what you want to do, is it? And it has nothing to do with how the hub handles wakeup requests received from downstream devices. You need to explain what's going on here in much more detail. What exactly is going wrong, and why? What is the hardware actually doing, as compared to what we expect it to do? Alan Stern