Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: set the correct Interrupt interval in usb_bulk_msg

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>

authored by

Alan Stern and committed by
Greg Kroah-Hartman
8d062b9a 762e92fa

+2 -7
+2 -7
drivers/usb/core/message.c
··· 221 221 222 222 if ((ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == 223 223 USB_ENDPOINT_XFER_INT) { 224 - int interval; 225 - 226 - if (usb_dev->speed == USB_SPEED_HIGH) 227 - interval = 1 << min(15, ep->desc.bInterval - 1); 228 - else 229 - interval = ep->desc.bInterval; 230 224 pipe = (pipe & ~(3 << 30)) | (PIPE_INTERRUPT << 30); 231 225 usb_fill_int_urb(urb, usb_dev, pipe, data, len, 232 - usb_api_blocking_completion, NULL, interval); 226 + usb_api_blocking_completion, NULL, 227 + ep->desc.bInterval); 233 228 } else 234 229 usb_fill_bulk_urb(urb, usb_dev, pipe, data, len, 235 230 usb_api_blocking_completion, NULL);