diff options
author | Mathias Nyman <[email protected]> | 2023-09-15 17:31:06 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2023-10-02 16:33:46 +0200 |
commit | d7cdfc319b2bcf6899ab0a05eec0958bc802a9a1 (patch) | |
tree | 5078a8a850f1853efabe979eb1fcd9673289444f /scripts/bpf_doc.py | |
parent | 41a43013d2366db5b88b42bbcd8e8f040b6ccf21 (diff) |
xhci: track port suspend state correctly in unsuccessful resume cases
xhci-hub.c tracks suspended ports in a suspended_port bitfield.
This is checked when responding to a Get_Status(PORT) request to see if a
port in running U0 state was recently resumed, and adds the required
USB_PORT_STAT_C_SUSPEND change bit in those cases.
The suspended_port bit was left uncleared if a device is disconnected
during suspend. The bit remained set even when a new device was connected
and enumerated. The set bit resulted in a incorrect Get_Status(PORT)
response with a bogus USB_PORT_STAT_C_SUSPEND change
bit set once the new device reached U0 link state.
USB_PORT_STAT_C_SUSPEND change bit is only used for USB2 ports, but
xhci-hub keeps track of both USB2 and USB3 suspended ports.
Cc: [email protected]
Reported-by: Wesley Cheng <[email protected]>
Closes: https://lore.kernel.org/linux-usb/[email protected]/
Fixes: 1d5810b6923c ("xhci: Rework port suspend structures for limited ports.")
Tested-by: Wesley Cheng <[email protected]>
Signed-off-by: Mathias Nyman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'scripts/bpf_doc.py')
0 files changed, 0 insertions, 0 deletions