From mboxrd@z Thu Jan 1 00:00:00 1970 From: Felipe Balbi Date: Thu, 21 Aug 2014 08:50:25 -0500 Subject: [U-Boot] [UBOOT RFC PATCH 07/13] usb: gadget: g_dnl: Explicitly set the max packet size in descriptor In-Reply-To: <20140821100046.254690b2@amdc2363> References: <1408372115-4570-1-git-send-email-kishon@ti.com> <1408372115-4570-8-git-send-email-kishon@ti.com> <20140818143856.GF9662@saruman.home> <20140818165646.4487059c@amdc2363> <53F36F58.7060308@ti.com> <20140819154402.GL16085@saruman.home> <20140820093413.21ab509d@amdc2363> <20140820161113.GI24500@saruman.home> <20140821100046.254690b2@amdc2363> Message-ID: <20140821135025.GC9608@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 On Thu, Aug 21, 2014 at 10:00:46AM +0200, Lukasz Majewski wrote: > Hi Felipe, > > > On Wed, Aug 20, 2014 at 09:34:13AM +0200, Lukasz Majewski wrote: > > > Hi Felipe, > > > > > > > On Tue, Aug 19, 2014 at 09:08:00PM +0530, Kishon Vijay Abraham I > > > > wrote: > > > > > > > > > > > > > > > On Monday 18 August 2014 08:26 PM, Lukasz Majewski wrote: > > > > > > Hi Kishon, > > > > > > > > > > > >>> Explicity set the max packet size in the device descriptor > > > > > >>> to 0x40 as specified in the device class specification for > > > > > >>> device firmware upgrade. Also changed debug to printf to > > > > > >>> explicitly notify the user if the device has been > > > > > >>> enumerated. > > > > > > > > > > > > It seems like this patch slipped without my attention ... > > > > > > > > > > > > Hence, I'd like to ask why you must hardcode the packet size > > > > > > here? > > > > > > > > > > http://www.usb.org/developers/devclass_docs/usbdfu10.pdf (in > > > > > section 4.2.1 DFU Mode Device Descriptor), specifies the > > > > > bMaxPacketSize0 can be 8,16,32,64. And the value we get from > > > > > gadget is 512. So hard coded it. > > > > > > > > as I mentioned, this should be changed on connection done > > > > interrupt. > > > > > > In the u-boot it is set up during binding the composite. > > > > look at dwc3. dwc3 has a connection done IRQ which also tells me the > > negotiated link speed. > > My point is that you will need to pool in u-boot to emulate this IRQ. you will need to poll anyways for a bunch of other things. There are some details in DWC3 which are mandated that you wait for event X before doing Y. For example control transfers, it's mandatory that you wait for a XferNotReady event before trying to start a Status Phase. > > > > DFU has one of the poorest documentations for a USB Class and has > > > > some moronic definitions. > > > > > > Frankly speaking I prefer to have the worst standard than some > > > "brilliant" in house developed protocols. > > > > nobody is talking about changing the protocol. DFU was written back > > when Full speed was the fastest USB on earth. > > As you can see the standard is a bit old now... and should be revised. right, once USB-IF does that, I hope they switch to bulk endpoints :-p -- balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: