Skip to content

Commit

Permalink
USB: dbgp gadget: set MaxpacketSize0
Browse files Browse the repository at this point in the history
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 <svens@stackframe.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Sven Schnelle authored and Greg Kroah-Hartman committed Apr 30, 2011
1 parent 1744020 commit 83b7201
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/gadget/dbgp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 83b7201

Please sign in to comment.