summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core
diff options
context:
space:
mode:
authorMike Krinkin <krinkin.m.u@gmail.com>2016-11-13 13:31:16 +0300
committerFelipe Balbi <felipe.balbi@linux.intel.com>2016-11-18 13:54:41 +0200
commit5909cbc881d021b02a00413b3083c771c5a8e309 (patch)
treef008f78e06b450357a20dbcf8c9b299f0d8dddfd /drivers/usb/core
parent7ac51a12ea11058e34ba6542671ed6c6aa00d7f7 (diff)
downloadlinux-stable-5909cbc881d021b02a00413b3083c771c5a8e309.tar.gz
linux-stable-5909cbc881d021b02a00413b3083c771c5a8e309.tar.bz2
linux-stable-5909cbc881d021b02a00413b3083c771c5a8e309.zip
usb: core: urb make use of usb_endpoint_maxp_mult
Since usb_endpoint_maxp now returns only lower 11 bits mult calculation here isn't correct anymore and that breaks webcam for me. Patch make use of usb_endpoint_maxp_mult instead of direct calculation. Fixes: abb621844f6a ("usb: ch9: make usb_endpoint_maxp() return only packet size") Signed-off-by: Mike Krinkin <krinkin.m.u@gmail.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r--drivers/usb/core/urb.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
index a9039696476e..bd688a0661f9 100644
--- a/drivers/usb/core/urb.c
+++ b/drivers/usb/core/urb.c
@@ -407,11 +407,8 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
}
/* "high bandwidth" mode, 1-3 packets/uframe? */
- if (dev->speed == USB_SPEED_HIGH) {
- int mult = 1 + ((max >> 11) & 0x03);
- max &= 0x07ff;
- max *= mult;
- }
+ if (dev->speed == USB_SPEED_HIGH)
+ max *= usb_endpoint_maxp_mult(&ep->desc);
if (urb->number_of_packets <= 0)
return -EINVAL;