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

    xhci: Handle HS bulk/ctrl endpoints that don't NAK.

to the 3.4-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-handle-hs-bulk-ctrl-endpoints-that-don-t-nak.patch
and it can be found in the queue-3.4 subdirectory.

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


>From 55c1945edaac94c5338a3647bc2e85ff75d9cf36 Mon Sep 17 00:00:00 2001
From: Sarah Sharp <[email protected]>
Date: Mon, 17 Dec 2012 14:12:35 -0800
Subject: xhci: Handle HS bulk/ctrl endpoints that don't NAK.

From: Sarah Sharp <[email protected]>

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 <[email protected]>
Suggested-by: Alan Stern <[email protected]>
Signed-off-by: Sarah Sharp <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 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
@@ -1250,6 +1250,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);
 }


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

queue-3.4/usb-ignore-port-state-until-reset-completes.patch
queue-3.4/xhci-avoid-dead-ports-add-roothub-port-polling.patch
queue-3.4/usb-ignore-xhci-reset-device-status.patch
queue-3.4/usb-handle-warm-reset-failure-on-empty-port.patch
queue-3.4/usb-increase-reset-timeout.patch
queue-3.4/usb-handle-auto-transition-from-hot-to-warm-reset.patch
queue-3.4/xhci-handle-hs-bulk-ctrl-endpoints-that-don-t-nak.patch
queue-3.4/usb-allow-usb-3.0-ports-to-be-disabled.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to