
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.
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.
What happens if you want ot run DFU with a superspeed controller (such as dwc3) when connected to a superspeed port. We cannot use ep0 packet size as 64, right ?
Correct me if I'm wrong, but MaxPacket for SS ep0 is 2^9 = 512B. I'm curious if dfu-util will manage to handle ep0 MaxPacket size up to 512B. It not, then we shall be able to fallback to 64B.
should be a test away.