Fwd: [PATCH 2/2] xHCI: Clear PLC for USB2 root hub ports

Steve Conklin sconklin at canonical.com
Mon Nov 7 17:59:20 UTC 2011



-------- Original Message --------
Subject: 	[PATCH 2/2] xHCI: Clear PLC for USB2 root hub ports
Date: 	Fri, 4 Nov 2011 13:20:56 -0700
From: 	Sarah Sharp <sarah.a.sharp at linux.intel.com>
To: 	stable at vger.kernel.org
CC: 	Andiry Xu <andiry.xu at amd.com>, Don Zickus <dzickus at redhat.com>,
Steve Conklin <sconklin at canonical.com>



From: Andiry Xu <andiry.xu at amd.com>

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 at amd.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp at linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
---
 drivers/usb/host/xhci-ring.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 831d0d4..0338ca9 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -1354,6 +1354,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);
-- 
1.7.5.4


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20111107/42248841/attachment.html>


More information about the kernel-team mailing list