All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "xhci: report U3 when link is in resume state" has been added to the 3.10-stable tree
@ 2015-08-08 21:06 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-08-08 21:06 UTC (permalink / raw)
  To: jin.can.zhuang, gregkh, mathias.nyman; +Cc: stable, stable-commits


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 <stable@vger.kernel.org> know about it.


>From 243292a2ad3dc365849b820a64868927168894ac Mon Sep 17 00:00:00 2001
From: Zhuang Jin Can <jin.can.zhuang@intel.com>
Date: Tue, 21 Jul 2015 17:20:29 +0300
Subject: xhci: report U3 when link is in resume state

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

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.

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>

---
 drivers/usb/host/xhci-hub.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -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 jin.can.zhuang@intel.com 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-08-08 21:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-08 21:06 Patch "xhci: report U3 when link is in resume state" has been added to the 3.10-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.