Re: [PATCH] usb: xhci: prevent spurious root hub resume during suspend
From: Mathias Nyman
Date: Tue Jun 30 2026 - 04:11:27 EST
On 6/30/26 10:36, Pei Xiao wrote:
handle_port_status() unconditionally resumes the root hub when
hcd->state is HC_STATE_SUSPENDED, regardless of whether a device is
actually attached to the port. This can cause system suspend to fail
with -EBUSY if a spurious port change event arrives on an empty port
after its bus has entered suspend.
Fix this by checking PORT_CONNECT in handle_port_status() before
resuming the root hub. If no device is actually present on the port,
the event is spurious and should be silently ignored rather than
aborting suspend.
Doesn't this change prevent handling device disconnects on suspended hosts?
Thanks
Mathias