aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorBrian Campbell <bacam@z273.org.uk>2015-07-21 17:20:28 +0300
committerBen Hutchings <ben@decadent.org.uk>2015-08-12 16:33:22 +0200
commit35d4cd24c5defd0689e7b51b780ea41a9a37b8b8 (patch)
treef1bb44730d8cc37fdf54dc2b80656244ef4716e3 /drivers/usb
parent40e09def7acb51c3db71974bd36a78683a1fdd14 (diff)
downloadkernel_samsung_smdk4412-35d4cd24c5defd0689e7b51b780ea41a9a37b8b8.zip
kernel_samsung_smdk4412-35d4cd24c5defd0689e7b51b780ea41a9a37b8b8.tar.gz
kernel_samsung_smdk4412-35d4cd24c5defd0689e7b51b780ea41a9a37b8b8.tar.bz2
xhci: Calculate old endpoints correctly on device reset
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> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/xhci.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 5c535a8..950a8cc 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -3361,6 +3361,9 @@ int xhci_discover_or_reset_device(struct usb_hcd *hcd, struct usb_device *udev)
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.