| From stable-bounces@linux.kernel.org Fri Apr 27 11:34:08 2007 |
| From: Alan Stern <stern@rowland.harvard.edu> |
| Date: Fri, 27 Apr 2007 14:32:47 -0400 (EDT) |
| Subject: USB: set the correct Interrupt interval in usb_bulk_msg |
| To: stable@kernel.org |
| Message-ID: <Pine.LNX.4.44L0.0704271431020.4842-100000@iolanthe.rowland.org> |
| |
| |
| 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 <stern@rowland.harvard.edu> |
| Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> |
| Signed-off-by: Chris Wright <chrisw@sous-sol.org> |
| |
| --- |
| 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); |