aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/composite.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/composite.c')
-rw-r--r--drivers/usb/gadget/composite.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 390749bbb0c3..3f72110da1b0 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -117,6 +117,7 @@ int config_ep_by_speed(struct usb_gadget *g,
117 struct usb_function *f, 117 struct usb_function *f,
118 struct usb_ep *_ep) 118 struct usb_ep *_ep)
119{ 119{
120 struct usb_composite_dev *cdev = get_gadget_data(g);
120 struct usb_endpoint_descriptor *chosen_desc = NULL; 121 struct usb_endpoint_descriptor *chosen_desc = NULL;
121 struct usb_descriptor_header **speed_desc = NULL; 122 struct usb_descriptor_header **speed_desc = NULL;
122 123
@@ -180,10 +181,12 @@ ep_found:
180 _ep->mult = comp_desc->bmAttributes & 0x3; 181 _ep->mult = comp_desc->bmAttributes & 0x3;
181 case USB_ENDPOINT_XFER_BULK: 182 case USB_ENDPOINT_XFER_BULK:
182 case USB_ENDPOINT_XFER_INT: 183 case USB_ENDPOINT_XFER_INT:
183 _ep->maxburst = comp_desc->bMaxBurst; 184 _ep->maxburst = comp_desc->bMaxBurst + 1;
184 break; 185 break;
185 default: 186 default:
186 /* Do nothing for control endpoints */ 187 if (comp_desc->bMaxBurst != 0)
188 ERROR(cdev, "ep0 bMaxBurst must be 0\n");
189 _ep->maxburst = 1;
187 break; 190 break;
188 } 191 }
189 } 192 }