提交 e2e2f0ea 编写于 作者: F Federico Manzan 提交者: Greg Kroah-Hartman

usbfs: Increase arbitrary limit for USB 3 isopkt length

Increase the current arbitrary limit for isocronous packet size to a
value large enough to account for USB 3.0 super bandwidth streams,
bMaxBurst (0~15 allowed, 1~16 packets)
bmAttributes (bit 1:0, mult 0~2, 1~3 packets)
so the size max for one USB 3 isocronous transfer is
1024 byte * 16 * 3 = 49152 byte
Acked-by: NAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: NFederico Manzan <f.manzan@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 5cbfa3ac
...@@ -1287,9 +1287,13 @@ static int proc_do_submiturb(struct dev_state *ps, struct usbdevfs_urb *uurb, ...@@ -1287,9 +1287,13 @@ static int proc_do_submiturb(struct dev_state *ps, struct usbdevfs_urb *uurb,
goto error; goto error;
} }
for (totlen = u = 0; u < uurb->number_of_packets; u++) { for (totlen = u = 0; u < uurb->number_of_packets; u++) {
/* arbitrary limit, /*
* sufficient for USB 2.0 high-bandwidth iso */ * arbitrary limit need for USB 3.0
if (isopkt[u].length > 8192) { * bMaxBurst (0~15 allowed, 1~16 packets)
* bmAttributes (bit 1:0, mult 0~2, 1~3 packets)
* sizemax: 1024 * 16 * 3 = 49152
*/
if (isopkt[u].length > 49152) {
ret = -EINVAL; ret = -EINVAL;
goto error; goto error;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册