Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xHCI: Clear PLC for USB2 root hub ports

When the link state changes, xHC will report a port status change event
and set the PORT_PLC bit, for both USB3 and USB2 root hub ports.

The PLC will be cleared by usbcore for USB3 root hub ports, but not for
USB2 ports, because they do not report USB_PORT_STAT_C_LINK_STATE in
wPortChange.

Clear it for USB2 root hub ports in handle_port_status().

Signed-off-by: Andiry Xu <andiry.xu@amd.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Andiry Xu and committed by
Greg Kroah-Hartman
6fd45621 d2f52c9e

+4
+4
drivers/usb/host/xhci-ring.c
··· 1352 1352 } 1353 1353 } 1354 1354 1355 + if (hcd->speed != HCD_USB3) 1356 + xhci_test_and_clear_bit(xhci, port_array, faked_port_index, 1357 + PORT_PLC); 1358 + 1355 1359 cleanup: 1356 1360 /* Update event ring dequeue pointer before dropping the lock */ 1357 1361 inc_deq(xhci, xhci->event_ring, true);