Re: BUG: one patch causes imx51 Babbage board detect usb hub failed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 19 May 2012, Ming Lei wrote:

> IMO, it is not a good idea.
> 
> Firstly, after writing RESET on command register, the default value of
> CMD register
> should be restored to '00080000h (00080B00h if Asynchronous Schedule Park
> Capability is a one)'[1], and both 'Interrupt Threshold Control' and
> 'Park mode' has
> been set in ehci_init(), so using ehci->command after ehci_reset is correct.
> 
> Secondly, remaining other bits from HW is not good since HW may be buggy
> and the default value after reset may be uncertain, and it is better
> to not depend
> on them.  For some newer hardware, if the reserved fields are to be
> used, just do
> it in ehci_init like setting lpm bits.
> 
> Finally, before the commit 3d9545cc375d117554a9b35dfddadf9189c62775(
> EHCI: maintain the ehci->command value properly), the ehci->command is used
> just directly in ehci_run and the other HW bits are not kept from HW,
> so it is better
> to be consistent as before to avoid introducing possible regression.
> 
> [1], 4.1 Host Controller Initialization of EHCI Specification 1.0
> 
> > Would anyone like to code that up?
> 
> Looks removing the line of 'ehci->command = ehci_readl(ehci,
> &ehci->regs->command);' in ehci_reset is OK.

You have convinced me.  In addition, my earlier reasoning didn't make 
much sense.  Nobody is developing new versions of EHCI these days; 
they're all working on USB-3.

I'll send in a new patch simply to remove that line of code.  Or you 
can, if you like.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux