Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1204035

[PATCH 3.2 099/110] xhci: do not report PLC when link is in internal resume state

From Ben Hutchings <ben@decadent.org.uk>
Newsgroups linux.kernel
Subject [PATCH 3.2 099/110] xhci: do not report PLC when link is in internal resume state
Date 2015-08-10 12:20 +0200
Message-ID <pVSls-3cZ-27@gated-at.bofh.it> (permalink)
References <pVSlr-3cZ-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


3.2.71-rc1 review patch.  If anyone has any objections, please let me know.

------------------

From: Zhuang Jin Can <jin.can.zhuang@intel.com>

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>
---
 drivers/usb/host/xhci-hub.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

--- 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
 			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;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 3.2 099/110] xhci: do not report PLC when link is in  internal resume state Ben Hutchings <ben@decadent.org.uk> - 2015-08-10 12:20 +0200

csiph-web