|
@@ -764,8 +764,14 @@ static int ehci_urb_enqueue (
|
|
|
INIT_LIST_HEAD (&qtd_list);
|
|
|
|
|
|
switch (usb_pipetype (urb->pipe)) {
|
|
|
- // case PIPE_CONTROL:
|
|
|
- // case PIPE_BULK:
|
|
|
+ case PIPE_CONTROL:
|
|
|
+ /* qh_completions() code doesn't handle all the fault cases
|
|
|
+ * in multi-TD control transfers. Even 1KB is rare anyway.
|
|
|
+ */
|
|
|
+ if (urb->transfer_buffer_length > (16 * 1024))
|
|
|
+ return -EMSGSIZE;
|
|
|
+ /* FALLTHROUGH */
|
|
|
+ /* case PIPE_BULK: */
|
|
|
default:
|
|
|
if (!qh_urb_transaction (ehci, urb, &qtd_list, mem_flags))
|
|
|
return -ENOMEM;
|