]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.0-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Jan 2013 13:04:13 +0000 (05:04 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Jan 2013 13:04:13 +0000 (05:04 -0800)
added patches:
usb-hub-handle-claim-of-enabled-remote-wakeup-after-reset.patch
xhci-handle-hs-bulk-ctrl-endpoints-that-don-t-nak.patch

queue-3.0/series
queue-3.0/usb-hub-handle-claim-of-enabled-remote-wakeup-after-reset.patch [new file with mode: 0644]
queue-3.0/xhci-handle-hs-bulk-ctrl-endpoints-that-don-t-nak.patch [new file with mode: 0644]

index f98a4d2f2667bcf35605bc4ead290711d5ce408e..a7dee28d404b6b6d69b0a35710c73d662a1ff998 100644 (file)
@@ -61,3 +61,5 @@ usb-ftdi_sio-crucible-technologies-comet-caller-id-pid-added.patch
 usb-cdc-acm-add-support-for-psc-scanning-magellan-800i.patch
 usb-gadget-dummy-fix-enumeration-with-g_multi.patch
 usb-increase-reset-timeout.patch
+usb-hub-handle-claim-of-enabled-remote-wakeup-after-reset.patch
+xhci-handle-hs-bulk-ctrl-endpoints-that-don-t-nak.patch
diff --git a/queue-3.0/usb-hub-handle-claim-of-enabled-remote-wakeup-after-reset.patch b/queue-3.0/usb-hub-handle-claim-of-enabled-remote-wakeup-after-reset.patch
new file mode 100644 (file)
index 0000000..0625389
--- /dev/null
@@ -0,0 +1,50 @@
+From 07e72b95f5038cc82304b9a4a2eb7f9fc391ea68 Mon Sep 17 00:00:00 2001
+From: Oliver Neukum <oliver@neukum.org>
+Date: Thu, 29 Nov 2012 15:05:57 +0100
+Subject: USB: hub: handle claim of enabled remote wakeup after reset
+
+From: Oliver Neukum <oliver@neukum.org>
+
+commit 07e72b95f5038cc82304b9a4a2eb7f9fc391ea68 upstream.
+
+Some touchscreens have buggy firmware which claims
+remote wakeup to be enabled after a reset. They nevertheless
+crash if the feature is cleared by the host.
+Add a check for reset resume before checking for
+an enabled remote wakeup feature. On compliant
+devices the feature must be cleared after a reset anyway.
+
+Signed-off-by: Oliver Neukum <oneukum@suse.de>
+Acked-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/core/hub.c |   10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/core/hub.c
++++ b/drivers/usb/core/hub.c
+@@ -2413,7 +2413,7 @@ int usb_port_suspend(struct usb_device *
+ static int finish_port_resume(struct usb_device *udev)
+ {
+       int     status = 0;
+-      u16     devstatus;
++      u16     devstatus = 0;
+       /* caller owns the udev device lock */
+       dev_dbg(&udev->dev, "%s\n",
+@@ -2458,7 +2458,13 @@ static int finish_port_resume(struct usb
+       if (status) {
+               dev_dbg(&udev->dev, "gone after usb resume? status %d\n",
+                               status);
+-      } else if (udev->actconfig) {
++      /*
++       * There are a few quirky devices which violate the standard
++       * by claiming to have remote wakeup enabled after a reset,
++       * which crash if the feature is cleared, hence check for
++       * udev->reset_resume
++       */
++      } else if (udev->actconfig && !udev->reset_resume) {
+               le16_to_cpus(&devstatus);
+               if (devstatus & (1 << USB_DEVICE_REMOTE_WAKEUP)) {
+                       status = usb_control_msg(udev,
diff --git a/queue-3.0/xhci-handle-hs-bulk-ctrl-endpoints-that-don-t-nak.patch b/queue-3.0/xhci-handle-hs-bulk-ctrl-endpoints-that-don-t-nak.patch
new file mode 100644 (file)
index 0000000..0633540
--- /dev/null
@@ -0,0 +1,47 @@
+From 55c1945edaac94c5338a3647bc2e85ff75d9cf36 Mon Sep 17 00:00:00 2001
+From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Date: Mon, 17 Dec 2012 14:12:35 -0800
+Subject: xhci: Handle HS bulk/ctrl endpoints that don't NAK.
+
+From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+
+commit 55c1945edaac94c5338a3647bc2e85ff75d9cf36 upstream.
+
+A high speed control or bulk endpoint may have bInterval set to zero,
+which means it does not NAK.  If bInterval is non-zero, it means the
+endpoint NAKs at a rate of 2^(bInterval - 1).
+
+The xHCI code to compute the NAK interval does not handle the special
+case of zero properly.  The current code unconditionally subtracts one
+from bInterval and uses it as an exponent.  This causes a very large
+bInterval to be used, and warning messages like these will be printed:
+
+usb 1-1: ep 0x1 - rounding interval to 32768 microframes, ep desc says 0 microframes
+
+This may cause the xHCI host hardware to reject the Configure Endpoint
+command, which means the HS device will be unusable under xHCI ports.
+
+This patch should be backported to kernels as old as 2.6.31, that contain
+commit dfa49c4ad120a784ef1ff0717168aa79f55a483a "USB: xhci - fix math in
+xhci_get_endpoint_interval()".
+
+Reported-by: Vincent Pelletier <plr.vincent@gmail.com>
+Suggested-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/xhci-mem.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/usb/host/xhci-mem.c
++++ b/drivers/usb/host/xhci-mem.c
+@@ -1026,6 +1026,8 @@ static unsigned int xhci_microframes_to_
+ static unsigned int xhci_parse_microframe_interval(struct usb_device *udev,
+               struct usb_host_endpoint *ep)
+ {
++      if (ep->desc.bInterval == 0)
++              return 0;
+       return xhci_microframes_to_exponent(udev, ep,
+                       ep->desc.bInterval, 0, 15);
+ }