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

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

 



Hi Peter,

On Sun, May 20, 2012 at 11:42 AM, Peter Chen <peter.chen@xxxxxxxxxxxxx> wrote:
> At first, I also think just remove ehci->command store code at ehci_reset
> is ok. But, after thinking a bit more, we may need to make clearly
> what value of ehci->command is correct?
>
> 1. Its default value after command reset or (|) the value changed
> at ehci_init;

In theory, the default value of command register after writing RESET should
be a specific value per ehci spec, but it is probably that some buggy ehci
HW may violate spec and return value which is sometimes different with
the value figured out in ehci_init, then cause bug.

For example, suppose one ehci controller is not capable of park mode,
and bit CMD_PARK in ehci->command is not set by ehci_init, but the bit
may be set in command register after writing RESET.

> 2. Use the software decided value after ehci_init.
> Choosing 1 or 2 depends on
> - Does the hardware reset value (expect for the value we will
> change at ehci_init) is correct or not?
> - Is it possible the ehci_init will override some correct
> default value at usbcmd?

If ehci->command is computed as not correct in ehci_init, it is simply
a bug in ehci_init, so we should always think ehci->command
is correct, and not suppose that the default value of command register
after writing RESET is always correct.

>
> The reason why I thought Alan's proposal patch is correct is I thought (1)
> was correct. But just like Ming mentioned before Alan's patch
> (EHCI: maintain the ehci->command value properly), we are OK with our
> EHCI host controller which value is software decided, so it is better
> use (2) to align with current code.

Yes, I still think so.


Thanks,
--
Ming Lei
--
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