All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "xhci: Calculate old endpoints correctly on device reset" has been added to the 3.14-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: bacam, gregkh, mathias.nyman; +Cc: stable, stable-commits


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

    xhci: Calculate old endpoints correctly on device reset

to the 3.14-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-calculate-old-endpoints-correctly-on-device-reset.patch
and it can be found in the queue-3.14 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 326124a027abc9a7f43f72dc94f6f0f7a55b02b3 Mon Sep 17 00:00:00 2001
From: Brian Campbell <bacam@z273.org.uk>
Date: Tue, 21 Jul 2015 17:20:28 +0300
Subject: xhci: Calculate old endpoints correctly on device reset

From: Brian Campbell <bacam@z273.org.uk>

commit 326124a027abc9a7f43f72dc94f6f0f7a55b02b3 upstream.

When resetting a device the number of active TTs may need to be
corrected by xhci_update_tt_active_eps, but the number of old active
endpoints supplied to it was always zero, so the number of TTs and the
bandwidth reserved for them was not updated, and could rise
unnecessarily.

This affected systems using Intel's Patherpoint chipset, which rely on
software bandwidth checking.  For example, a Lenovo X230 would lose the
ability to use ports on the docking station after enough suspend/resume
cycles because the bandwidth calculated would rise with every cycle when
a suitable device is attached.

The correct number of active endpoints is calculated in the same way as
in xhci_reserve_bandwidth.

Signed-off-by: Brian Campbell <bacam@z273.org.uk>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/host/xhci.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -3424,6 +3424,9 @@ int xhci_discover_or_reset_device(struct
 			return -EINVAL;
 	}
 
+	if (virt_dev->tt_info)
+		old_active_eps = virt_dev->tt_info->active_eps;
+
 	if (virt_dev->udev != udev) {
 		/* If the virt_dev and the udev does not match, this virt_dev
 		 * may belong to another udev.


Patches currently in stable-queue which might be from bacam@z273.org.uk are

queue-3.14/xhci-calculate-old-endpoints-correctly-on-device-reset.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: Calculate old endpoints correctly on device reset" has been added to the 3.14-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.