Skip to contentSkip to conversation

Patch "xhci: report U3 when link is in resume state" has been added to the 3.10-stable tree

PATCH [email protected] 1 participant 1 message Aug 8, 2015

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

xhci: report U3 when link is in resume state

to the 3.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
xhci-report-u3-when-link-is-in-resume-state.patch
and it can be found in the queue-3.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 243292a2ad3dc365849b820a64868927168894ac Mon Sep 17 00:00:00 2001

From: Zhuang Jin Can <[email protected]>
Date: Tue, 21 Jul 2015 17:20:29 +0300
Subject: xhci: report U3 when link is in resume state

From: Zhuang Jin Can <[email protected]>

commit 243292a2ad3dc365849b820a64868927168894ac upstream.

xhci_hub_report_usb3_link_state() returns pls as U0 when the link is in resume state, and this causes usb core to think the link is in U0 while actually it's in resume state. When usb core transfers control request on the link, it fails with TRB error as the link is not ready for transfer.

To fix the issue, report U3 when the link is in resume state, thus usb core knows the link it's not ready for transfer.

---
 drivers/usb/host/xhci-hub.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/usb/host/xhci-hub.c +5 -2
@@ -468,10 +468,13 @@ static void xhci_hub_report_link_state(s
 	u32 pls = status_reg & PORT_PLS_MASK;
 
 	/* resume state is a xHCI internal state.
-	 * Do not report it to usb core.
+	 * Do not report it to usb core, instead, pretend to be U3,
+	 * thus usb core knows it's not ready for transfer
 	 */
-	if (pls == XDEV_RESUME)
+	if (pls == XDEV_RESUME) {
+		*status |= USB_SS_PORT_LS_U3;
 		return;
+	}
 
 	/* When the CAS bit is set then warm reset
 	 * should be performed on port

Patches currently in stable-queue which might be from [email protected] are

queue-3.10/xhci-prevent-bus_suspend-if-ss-port-resuming-in-phase-1.patch queue-3.10/xhci-report-u3-when-link-is-in-resume-state.patch