From mboxrd@z Thu Jan 1 00:00:00 1970 From: Felipe Balbi Date: Tue, 19 Aug 2014 10:48:42 -0500 Subject: [U-Boot] [UBOOT RFC PATCH 07/13] usb: gadget: g_dnl: Explicitly set the max packet size in descriptor In-Reply-To: <53F37065.7050602@ti.com> References: <1408372115-4570-1-git-send-email-kishon@ti.com> <1408372115-4570-8-git-send-email-kishon@ti.com> <20140818143856.GF9662@saruman.home> <53F36E6E.8080003@ti.com> <20140819153918.GK16085@saruman.home> <53F37065.7050602@ti.com> Message-ID: <20140819154842.GM16085@saruman.home> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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: