]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
xHCI: Clear PLC for USB2 root hub ports
authorAndiry Xu <andiry.xu@amd.com>
Fri, 23 Sep 2011 21:19:50 +0000 (14:19 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Nov 2011 17:43:57 +0000 (09:43 -0800)
commit 6fd4562178508a0949c9fdecd8558d8b10d671bd upstream.

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>
drivers/usb/host/xhci-ring.c

index 36df1733937de64e51a14fb9f2e30e41593ca7aa..dd3eb6f05d02b0c40dc04c6e508b4060c88c9ed7 100644 (file)
@@ -1356,6 +1356,10 @@ static void handle_port_status(struct xhci_hcd *xhci,
                }
        }
 
+       if (hcd->speed != HCD_USB3)
+               xhci_test_and_clear_bit(xhci, port_array, faked_port_index,
+                                       PORT_PLC);
+
 cleanup:
        /* Update event ring dequeue pointer before dropping the lock */
        inc_deq(xhci, xhci->event_ring, true);