aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorZhuang Jin Can <jin.can.zhuang@intel.com>2015-07-21 17:20:31 +0300
committerBen Hutchings <ben@decadent.org.uk>2015-08-12 16:33:23 +0200
commit6db7fe2b119d350fbe755e8f0babb51638f6fc85 (patch)
tree19e75cca178719e1ee832713b483467d30eeba15 /drivers/usb
parentdca8f172a6116fca13321e83aad7f90154dc538e (diff)
downloadkernel_samsung_smdk4412-6db7fe2b119d350fbe755e8f0babb51638f6fc85.zip
kernel_samsung_smdk4412-6db7fe2b119d350fbe755e8f0babb51638f6fc85.tar.gz
kernel_samsung_smdk4412-6db7fe2b119d350fbe755e8f0babb51638f6fc85.tar.bz2
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org> [bwh: Backported to 3.2: - Adjust indentation - s/raw_port_status/temp/] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers/usb')
-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 353fe60..8605813 100644
--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -595,7 +595,14 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
status |= USB_PORT_STAT_C_RESET << 16;
/* USB3.0 only */
if (hcd->speed == HCD_USB3) {
- if ((temp & 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 ((temp & PORT_PLC) &&
+ (temp & PORT_PLS_MASK) != XDEV_RESUME)
status |= USB_PORT_STAT_C_LINK_STATE << 16;
if ((temp & PORT_WRC))
status |= USB_PORT_STAT_C_BH_RESET << 16;