From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:40493 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752305AbbJQXnA (ORCPT ); Sat, 17 Oct 2015 19:43:00 -0400 Subject: Patch "usb: Use the USB_SS_MULT() macro to get the burst multiplier." has been added to the 4.1-stable tree To: mathias.nyman@linux.intel.com, gregkh@linuxfoundation.org Cc: , From: Date: Sat, 17 Oct 2015 16:42:58 -0700 Message-ID: <144512537825075@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled usb: Use the USB_SS_MULT() macro to get the burst multiplier. to the 4.1-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: usb-use-the-usb_ss_mult-macro-to-get-the-burst-multiplier.patch and it can be found in the queue-4.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From ff30cbc8da425754e8ab96904db1d295bd034f27 Mon Sep 17 00:00:00 2001 From: Mathias Nyman Date: Mon, 21 Sep 2015 17:46:09 +0300 Subject: usb: Use the USB_SS_MULT() macro to get the burst multiplier. From: Mathias Nyman commit ff30cbc8da425754e8ab96904db1d295bd034f27 upstream. Bits 1:0 of the bmAttributes are used for the burst multiplier. The rest of the bits used to be reserved (zero), but USB3.1 takes bit 7 into use. Use the existing USB_SS_MULT() macro instead to make sure the mult value and hence max packet calculations are correct for USB3.1 devices. Note that burst multiplier in bmAttributes is zero based and that the USB_SS_MULT() macro adds one. Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/config.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/drivers/usb/core/config.c +++ b/drivers/usb/core/config.c @@ -112,7 +112,7 @@ static void usb_parse_ss_endpoint_compan cfgno, inum, asnum, ep->desc.bEndpointAddress); ep->ss_ep_comp.bmAttributes = 16; } else if (usb_endpoint_xfer_isoc(&ep->desc) && - desc->bmAttributes > 2) { + USB_SS_MULT(desc->bmAttributes) > 3) { dev_warn(ddev, "Isoc endpoint has Mult of %d in " "config %d interface %d altsetting %d ep %d: " "setting to 3\n", desc->bmAttributes + 1, @@ -121,7 +121,8 @@ static void usb_parse_ss_endpoint_compan } if (usb_endpoint_xfer_isoc(&ep->desc)) - max_tx = (desc->bMaxBurst + 1) * (desc->bmAttributes + 1) * + max_tx = (desc->bMaxBurst + 1) * + (USB_SS_MULT(desc->bmAttributes)) * usb_endpoint_maxp(&ep->desc); else if (usb_endpoint_xfer_int(&ep->desc)) max_tx = usb_endpoint_maxp(&ep->desc) * Patches currently in stable-queue which might be from mathias.nyman@linux.intel.com are queue-4.1/usb-xhci-exit-early-in-xhci_setup_device-if-we-re-halted-or-dying.patch queue-4.1/xhci-give-command-abortion-one-more-chance-before-killing-xhci.patch queue-4.1/usb-xhci-clear-xhci_state_dying-on-start.patch queue-4.1/usb-xhci-add-support-for-urb_zero_packet-to-bulk-sg-transfers.patch queue-4.1/xhci-init-command-timeout-timer-earlier-to-avoid-deleting-it-uninitialized.patch queue-4.1/usb-use-the-usb_ss_mult-macro-to-get-the-burst-multiplier.patch queue-4.1/usb-xhci-lock-mutex-on-xhci_stop.patch queue-4.1/xhci-change-xhci-1.0-only-restrictions-to-support-xhci-1.1.patch