提交 5909cbc8 编写于 作者: M Mike Krinkin 提交者: Felipe Balbi

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: abb62184 ("usb: ch9: make usb_endpoint_maxp() return
       only packet size")
Signed-off-by: NMike Krinkin <krinkin.m.u@gmail.com>
Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
上级 7ac51a12
...@@ -407,11 +407,8 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags) ...@@ -407,11 +407,8 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
} }
/* "high bandwidth" mode, 1-3 packets/uframe? */ /* "high bandwidth" mode, 1-3 packets/uframe? */
if (dev->speed == USB_SPEED_HIGH) { if (dev->speed == USB_SPEED_HIGH)
int mult = 1 + ((max >> 11) & 0x03); max *= usb_endpoint_maxp_mult(&ep->desc);
max &= 0x07ff;
max *= mult;
}
if (urb->number_of_packets <= 0) if (urb->number_of_packets <= 0)
return -EINVAL; return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册