Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939391AbXFHHtY (ORCPT ); Fri, 8 Jun 2007 03:49:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S938405AbXFHHY5 (ORCPT ); Fri, 8 Jun 2007 03:24:57 -0400 Received: from 216-99-217-87.dsl.aracnet.com ([216.99.217.87]:55300 "EHLO sous-sol.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938390AbXFHHYw (ORCPT ); Fri, 8 Jun 2007 03:24:52 -0400 Message-Id: <20070608072220.735514000@sous-sol.org> References: <20070608072127.352723000@sous-sol.org> User-Agent: quilt/0.46-1 Date: Fri, 08 Jun 2007 00:22:02 -0700 From: Chris Wright To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Alan Stern , Greg Kroah-Hartman Subject: [patch 35/54] USB: set the correct Interrupt interval in usb_bulk_msg Content-Disposition: inline; filename=usb-set-the-correct-interrupt-interval-in-usb_bulk_msg.patch Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1576 Lines: 44 -stable review patch. If anyone has any objections, please let us know. --------------------- From: Alan Stern This patch (as902) fixes a mistake I introduced into usb_bulk_msg(). usb_fill_int_urb() already does the bit-shifting calculation for high-speed Interrupt intervals; it shouldn't be done twice. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman Signed-off-by: Chris Wright --- drivers/usb/core/message.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) --- linux-2.6.21.4.orig/drivers/usb/core/message.c +++ linux-2.6.21.4/drivers/usb/core/message.c @@ -221,15 +221,10 @@ int usb_bulk_msg(struct usb_device *usb_ if ((ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT) { - int interval; - - if (usb_dev->speed == USB_SPEED_HIGH) - interval = 1 << min(15, ep->desc.bInterval - 1); - else - interval = ep->desc.bInterval; pipe = (pipe & ~(3 << 30)) | (PIPE_INTERRUPT << 30); usb_fill_int_urb(urb, usb_dev, pipe, data, len, - usb_api_blocking_completion, NULL, interval); + usb_api_blocking_completion, NULL, + ep->desc.bInterval); } else usb_fill_bulk_urb(urb, usb_dev, pipe, data, len, usb_api_blocking_completion, NULL); -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/