diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2007-04-23 17:30:32 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-05-23 02:45:49 -0400 |
commit | 8d062b9a3516c6fbcf749bcc864fdb8b3def1caa (patch) | |
tree | af943f9b6774b2c10e0b8d71da9055c8e6beec34 | |
parent | 762e92fa1742007dedd90ff6b1ea74842f0cd34b (diff) |
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>
-rw-r--r-- | drivers/usb/core/message.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index b7434787db5f..f9fed34bf7d8 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c | |||
@@ -221,15 +221,10 @@ int usb_bulk_msg(struct usb_device *usb_dev, unsigned int pipe, | |||
221 | 221 | ||
222 | if ((ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | 222 | if ((ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == |
223 | USB_ENDPOINT_XFER_INT) { | 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 | pipe = (pipe & ~(3 << 30)) | (PIPE_INTERRUPT << 30); | 224 | pipe = (pipe & ~(3 << 30)) | (PIPE_INTERRUPT << 30); |
231 | usb_fill_int_urb(urb, usb_dev, pipe, data, len, | 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 | } else | 228 | } else |
234 | usb_fill_bulk_urb(urb, usb_dev, pipe, data, len, | 229 | usb_fill_bulk_urb(urb, usb_dev, pipe, data, len, |
235 | usb_api_blocking_completion, NULL); | 230 | usb_api_blocking_completion, NULL); |