From: Sven Schnelle Date: Wed, 23 Mar 2011 20:24:55 +0000 (+0100) Subject: USB: dbgp gadget: set MaxpacketSize0 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=83b720199393fe2be38159354ef5a07a1b861e61;p=linux-beck.git USB: dbgp gadget: set MaxpacketSize0 The current code doesn't set it, so linux complains about it when connected, and ignores the device: [104611.068082] usb 1-5: new high speed USB device using ehci_hcd and address 127 [104611.088368] usb 1-5: Invalid ep0 maxpacket: 0 Signed-off-by: Sven Schnelle Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/gadget/dbgp.c b/drivers/usb/gadget/dbgp.c index 2932b48da0f9..795525c32474 100644 --- a/drivers/usb/gadget/dbgp.c +++ b/drivers/usb/gadget/dbgp.c @@ -312,6 +312,7 @@ static int __init dbgp_bind(struct usb_gadget *gadget) dbgp.req->length = DBGP_REQ_EP0_LEN; gadget->ep0->driver_data = gadget; + device_desc.bMaxPacketSize0 = gadget->ep0->maxpacket; #ifdef CONFIG_USB_G_DBGP_SERIAL dbgp.serial = kzalloc(sizeof(struct gserial), GFP_KERNEL);