[U-Boot] [patch 1/2 V2] fix USB initialisation procedure
Remy Bohmer
linux at bohmer.net
Fri Jan 29 15:57:56 CET 2010
Hi,
2010/1/29 Daniel Hellstrom <daniel at gaisler.com>:
> Hello,
>
> Please see my comment on commit 48867208444cb2a82e2af9c3249e90b7ed4a1751
> below.
>
>
> Remy Bohmer wrote:
>
>> The max packet size is encoded as 0,1,2,3 for 8,16,32,64 bytes.
>> At some places directly 8,16,32,64 was used instead of the encoded
>> value. Made a enum for the options to make this more clear and to help
>> preventing similar errors in the future.
>>
>> After fixing this bug it became clear that another bug existed where
>> the 'pipe' is and-ed with PIPE_* flags, where it should have been
>> 'usb_pipetype(pipe)', or even better usb_pipeint(pipe).
>>
>> Also removed the triple 'get_device_descriptor' sequence, it has no use,
>> and Windows nor Linux behaves that way.
>>
>
>> There is also a poll going on with a timeout when usb_control_msg() fails.
>> However, the poll is useless, because the flag will never be set on a
>> error,
>> because there is no code that runs in a parallel that can set this flag.
>> Changed this to something more logical.
>>
>
> The USB-driver ISR may set dev->status, I believe that is why the code is
> waiting for for a couple of ms. This patch makes the LEON3 UHCI support fail
> in usb_control_msg(), changing back to the old code the LEON3 UHCI driver
> (cpu/leon3/usb_uhci.c) works again.
>
> I believe this is also the case for board/MAI/AmigaOneG3SE/usb_uhci.c and
> board/mpl/common/usb_uhci.c, they are also modifying the flag from the
> interrupt handler.
Could you make a patch?
Kind regards,
Remy
More information about the U-Boot
mailing list