[U-Boot] [PATCH] usb:composite:fix Provide function data when addressing device with only one interface

Tom Rini
2013-03-06T01:38:12Z

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/05/2013 07:55 PM, Marek Vasut wrote:
> Dear Tom Rini,
>
>> On Wed, Mar 06, 2013 at 12:54:45AM +0100, Marek Vasut wrote:
>>> Dear Tom Rini,
>>>
>>>> On 03/05/2013 06:24 PM, Marek Vasut wrote:
>>>>> Dear Lukasz Majewski,
>>>>>
>>>>>> Hi Marek,
>>>>>>
>>>>>>> Dear Lukasz Majewski,
>>>>>>>
>>>>>>>> This commit fixes problems with some non-standard
>>>>>>>> requests send with device address instead of
>>>>>>>> interface address (bmRequestType.Receipent field).
>>>>>>>>
>>>>>>>> This happens with dfu-util (debian version: 0.5),
>>>>>>>> which address non standard requests (like
>>>>>>>> w_value=0x21 and bRequest=GET_DESCRIPTOR) to device.
>>>>>>>> Without this fix, the above request is STALLED, and
>>>>>>>> hence causes dfu-util to assume some standard
>>>>>>>> configuration (packet size = 1024B instead of 4096B)
>>>>>>>> In turn it displays following errors: Error
>>>>>>>> obtaining DFU functional descriptor Warning: Assuming
>>>>>>>> DFU version 1.0 Warning: Transfer size can not be
>>>>>>>> detected ... Warning: Trying default transfer size
>>>>>>>> 1024
>>>>>>>>
>>>>>>>> This fix allows passing non-standard request to
>>>>>>>> function setup code, where it shall be handled.
>>>>>>>>
>>>>>>>> Tested at: Trats (exynos4210) Tested with:DFU and
>>>>>>>> UMS gadgets
>>>>>>>
>>>>>>> Can you please repost all the patches you want applied
>>>>>>> on u-boot-usb ? I'm completely lost in all this DFU
>>>>>>> stuff.
>>>>>>
>>>>>> This is only one patch to replace patch done by
>>>>>> Pantelis:
>>>>>>
>>>>>> Patch to replace (revert): dfu: Send correct DFU response
>>>>>> from composite_setup SHA1:
>>>>>> fef31049fa06e516945114195eb14ac3549d0ad2
>>>>>>
>>>>>> And this shall be replaced with posted patch.
>>>>>>
>>>>>> Another patches (with UMS gadget support - done by Piotr
>>>>>> Wilczek), also shall be added to u-boot-usb tree:
>>>>>>
>>>>>> http://patchwork.ozlabs.org/patch/219744/
>>>>>> http://patchwork.ozlabs.org/patch/219746/
>>>>>> http://patchwork.ozlabs.org/patch/219745/
>>>>>
>>>>> Ok, please check the u-boot-usb ... if it's OK, I will send
>>>>> Tom a pullrq (finally). Tom, do you still accept those for
>>>>> .04 ?
>>>>
>>>> As of earlier in the day it still had Pantelis' patch for
>>>> sending files larger than memory which breaks all
>>>> filesystem-based writes, so that needs to go. Lukasz and I
>>>> are discussing how to deal with that.
>>>
>>> IIRC I killed that patch.
>>
>> In u-boot-usb/master currently: commit
>> a09f955db6ad7031bd715a615fb8b90d671a14d4 Author: Pantelis
>> Antoniou <panto@antoniou-consulting.com> Date: Fri Nov 30
>> 08:01:12 2012 +0000
>>
>> dfu: Support larger than memory transfers.
>>
>> Is one of the two that needed to go. The patch in this thread
>> replaced the other one that you did drop.
>
> True, we now have the proper one applied to my understanding.

No, the concept needs re-working as non-filesystem can work in chunks
but files must be done all at once.

- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRNp4EAAoJENk4IS6UOR1W61YQAJutQ0MUjAY5uw/P7YrY9o5C
KPiuxLrTgaTEl6cNeeGWS30YxqX7cz7w/SQd8igKno5sqeoNncggc0CwkAumpxRe
baBxb1VVePijS9NFoQC/zMMzJ8+H4Csx9OLYW1EqlYL30DDpNqS7T2aYznQ7hsth
wyOA7oasGm5KY6tgsi8e8Qfw/dNER//OWgCx+6KqsUJemg5MPSZCABAKQmtNz6yU
jgaXC/z5bx3bfrAa/yf8zaNnbtMLhjcM8Bwhd3oiOsaFgU0eGS/IFJe6gDK9Gpfw
NrehYEBmA3xKXROi7ph8c4yHUaPqA62nAPO0s60uTOQ+K6rXeh5eZ1OPe5Y99raG
Ka0Dx+GT2zT4PJcMTML8xWcF5o7ugD3kG8YbVyWM8OfT7deuZscvdsHaL6k7KOtM
pVrM/lfurHs2wgR4wCLHXCxoRYioHHl4ZgSFTI0RwX/fTphYokX3hloVEMlbRLtR
2QTknQIq7lwRvAOem0CrFczTfVMXtawZ9UDQ6qQ/jgIyQbfyUSyywsTWs2Ts8WSL
PTfOgRrTK9cXk5PCT+pKVv1160mYUCu7c0YYCImqmq9T2qw5QvACpc9FXoSpo/9n
JJ9tt5awX+2nZhrVGqc+d+cfM957xqMJ2ViD3M7Tw8wwy/076FOBvtDFbvA73pV+
HHh8svg50YA8O0dI9n5F
=s8vQ
-----END PGP SIGNATURE-----