Commit aca3a048 authored by Zhuang Jin Can's avatar Zhuang Jin Can Committed by Greg Kroah-Hartman

xhci: do not report PLC when link is in internal resume state

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.

Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarZhuang Jin Can <jin.can.zhuang@intel.com>
Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fac4271d
...@@ -591,7 +591,14 @@ static u32 xhci_get_port_status(struct usb_hcd *hcd, ...@@ -591,7 +591,14 @@ static u32 xhci_get_port_status(struct usb_hcd *hcd,
status |= USB_PORT_STAT_C_RESET << 16; status |= USB_PORT_STAT_C_RESET << 16;
/* USB3.0 only */ /* USB3.0 only */
if (hcd->speed == HCD_USB3) { 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; status |= USB_PORT_STAT_C_LINK_STATE << 16;
if ((raw_port_status & PORT_WRC)) if ((raw_port_status & PORT_WRC))
status |= USB_PORT_STAT_C_BH_RESET << 16; status |= USB_PORT_STAT_C_BH_RESET << 16;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment