summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorZhuang Jin Can <jin.can.zhuang@intel.com>2015-07-21 17:20:31 +0300
committerJiri Slaby <jslaby@suse.cz>2015-08-19 08:36:42 +0200
commitcb770faea83c695f0a3cea9d60f31b349a494a34 (patch)
tree461b13f2a9a9630c0d1ee4fcf5336b1695959924 /drivers
parent6c89fe35a637091dfdf2822021c69d394f31466f (diff)
downloadlwn-cb770faea83c695f0a3cea9d60f31b349a494a34.tar.gz
lwn-cb770faea83c695f0a3cea9d60f31b349a494a34.zip
xhci: do not report PLC when link is in internal resume state
commit aca3a0489ac019b58cf32794d5362bb284cb9b94 upstream. Port link change with port in resume state should not be reported to usbcore, as this is an internal state to be handled by xhci driver. Reporting PLC to usbcore may cause usbcore clearing PLC first and port change event irq won't be generated. Signed-off-by: Zhuang Jin Can <jin.can.zhuang@intel.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/host/xhci-hub.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
index 4adc1be24b4a..55b3aa33bc06 100644
--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -586,7 +586,14 @@ static u32 xhci_get_port_status(struct usb_hcd *hcd,
status |= USB_PORT_STAT_C_RESET << 16;
/* USB3.0 only */
if (hcd->speed == HCD_USB3) {
- if ((raw_port_status & PORT_PLC))
+ /* Port link change with port in resume state should not be
+ * reported to usbcore, as this is an internal state to be
+ * handled by xhci driver. Reporting PLC to usbcore may
+ * cause usbcore clearing PLC first and port change event
+ * irq won't be generated.
+ */
+ if ((raw_port_status & PORT_PLC) &&
+ (raw_port_status & PORT_PLS_MASK) != XDEV_RESUME)
status |= USB_PORT_STAT_C_LINK_STATE << 16;
if ((raw_port_status & PORT_WRC))
status |= USB_PORT_STAT_C_BH_RESET << 16;