[U-Boot] [UBOOT RFC PATCH 07/13] usb: gadget: g_dnl: Explicitly set the max packet size in descriptor

Felipe Balbi balbi at ti.com
Tue Aug 19 17:48:42 CEST 2014


Hi,

On Tue, Aug 19, 2014 at 09:12:29PM +0530, Kishon Vijay Abraham I wrote:
> >>>> @@ -987,7 +987,6 @@ static int composite_bind(struct usb_gadget *gadget)
> >>>>  
> >>>>  	memcpy(&cdev->desc, composite->dev,
> >>>>  	       sizeof(struct usb_device_descriptor));
> >>>> -	cdev->desc.bMaxPacketSize0 = gadget->ep0->maxpacket;
> >>>
> >>> why are you dropping this line ?
> >>
> >> Actually faced an issue with this. DWC3 gadget sets ep0 maxpacket size
> >> to 512 and if the device is operating at hight speed, the
> >> bMaxPacketSize0 field should be 64?
> > 
> > right, but that's changed on connection done IRQ.
> > 
> >> If the maxpacket size is set to 512, the host reports Invalid EP0
> >> Maxpacket.
> > 
> > huh ? who broke dwc3 ? connection done happens before we receive the
> > first setup packet, how can host complain about anything ?
> > 
> composite_bind() (where maxpacket is being set) happens much before connection
> done interrupt. So it's not dwc3's fault.

seems like you're just missing a few fixes to composite.c, such as
commit 765f5b830e547229bb752e7b232ee83e2b3d49d5

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140819/1ec75e6e/attachment.pgp>


More information about the U-Boot mailing list