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 and Rechard,

On Fri, May 18, 2012 at 6:33 PM, Chen Peter-B29397 <B29397@xxxxxxxxxxxxx> wrote:
>
> Hi Ming,
>
> I have debugged it at this afternoon, your description for this problem
> is correct, the ehci_reset override the ehci->command which is assigned
> at ehci_init, and ehci->command at ehci_init is correct.
>
> My opinion for this fix is just remove the
> " ehci->command = ehci_readl(ehci, &ehci->regs->command);" at ehci_reset.
> Even someone called ehci_reset to reset controller, it can still use command
> value assigned at ehci_init.

After some check, I agree with you on fixing the problem by removing the line
in ehci_reset.

In fact, this line may introduce same overriding problem because CMD
register will be restored to its default value per ehci spec[1]. And
some ehci drivers may run ehci_reset during resume(for example,
pci_ehci/ehci_fsl, see ehci_pci_resume,...).

[1], 4.1 Host Controller Initialization of EHCI Specification 1.0

So could you test the below patch?

--
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index f644ba9..5597e60 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -352,7 +352,6 @@ static int ehci_reset (struct ehci_hcd *ehci)
 	if (ehci->debug)
 		dbgp_external_startup();

-	ehci->command = ehci_readl(ehci, &ehci->regs->command);
 	ehci->port_c_suspend = ehci->suspended_ports =
 			ehci->resuming_ports = 0;
 	return retval;

Alan, any comments on the patch?


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