|
@@ -117,6 +117,7 @@ int config_ep_by_speed(struct usb_gadget *g,
|
|
|
struct usb_function *f,
|
|
|
struct usb_ep *_ep)
|
|
|
{
|
|
|
+ struct usb_composite_dev *cdev = get_gadget_data(g);
|
|
|
struct usb_endpoint_descriptor *chosen_desc = NULL;
|
|
|
struct usb_descriptor_header **speed_desc = NULL;
|
|
|
|
|
@@ -180,10 +181,12 @@ ep_found:
|
|
|
_ep->mult = comp_desc->bmAttributes & 0x3;
|
|
|
case USB_ENDPOINT_XFER_BULK:
|
|
|
case USB_ENDPOINT_XFER_INT:
|
|
|
- _ep->maxburst = comp_desc->bMaxBurst;
|
|
|
+ _ep->maxburst = comp_desc->bMaxBurst + 1;
|
|
|
break;
|
|
|
default:
|
|
|
- /* Do nothing for control endpoints */
|
|
|
+ if (comp_desc->bMaxBurst != 0)
|
|
|
+ ERROR(cdev, "ep0 bMaxBurst must be 0\n");
|
|
|
+ _ep->maxburst = 1;
|
|
|
break;
|
|
|
}
|
|
|
}
|