|
|
|
RE: BUG: one patch causes imx51 Babbage board detect usb hub failed | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
|
> > The above commit causes failure of imx usb host hub detection.
>
> This commit may introduce an overriding problem on initial configuration
> of CMD: initial configuration of CMD is figured out in ehci_init, but is
> override later in the following ehci_reset, see ehci_setup.
>
> So could you please try the below patch to see if it can fix your problem?
>
Hi ming,
I have applied your patch at the top of usb-next
(0b623f871d7c993fac8ad7aaaa8f5f3cdb8ed480)
But there is still error after hub enumeration finishes (ep0 is finished).
below is the error message:
usb 1-1: new high-speed USB device number 2 using mxc-ehci
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 7 ports detected
mxc-ehci mxc-ehci.1: fatal error
mxc-ehci mxc-ehci.1: HC died; cleaning up
mxc-ehci mxc-ehci.1: force halt; handshake f5780344 00004000 00004000 -> -110
mxc-ehci mxc-ehci.1: HC died; cleaning up
hub 1-1:1.0: hub_port_status failed (err = -108)
usb 1-1: USB disconnect, device number 2
I will have a look this afternoon, hope there is a update this afternoon.
> diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
> index f644ba9..29a9057 100644
> --- a/drivers/usb/host/ehci-hcd.c
> +++ b/drivers/usb/host/ehci-hcd.c
> @@ -318,8 +318,7 @@ static void tdi_reset (struct ehci_hcd *ehci)
> ehci_writel(ehci, tmp, reg_ptr);
> }
>
> -/* reset a non-running (STS_HALT == 1) controller */
> -static int ehci_reset (struct ehci_hcd *ehci)
> +static int __ehci_reset (struct ehci_hcd *ehci)
> {
> int retval;
> u32 command = ehci_readl(ehci, &ehci->regs->command);
> @@ -352,12 +351,27 @@ 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;
> }
>
> +/* ehci hardware init */
> +static int ehci_hw_init (struct ehci_hcd *ehci)
> +{
> + return __ehci_reset(ehci);
> +}
> +
> +/* reset a non-running (STS_HALT == 1) controller */
> +static int ehci_reset (struct ehci_hcd *ehci)
> +{
> + int val;
> + val = __ehci_reset(ehci);
> + ehci->command = ehci_readl(ehci, &ehci->regs->command);
> +
> + return val;
> +}
> +
> /* idle the controller (from running) */
> static void ehci_quiesce (struct ehci_hcd *ehci)
> {
> @@ -836,7 +850,7 @@ static int __maybe_unused ehci_setup (struct usb_hcd
> *hcd)
> if (retval)
> return retval;
>
> - ehci_reset(ehci);
> + ehci_hw_init(ehci);
>
> return 0;
> }
>
> 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

[Linux Media] [Video for Linux] [Linux Input] [Linux Audio Users] [Photo] [Yosemite News] [Yosemite Photos] [Free Online Dating] [Linux Kernel] [Linux SCSI] [Old Linux USB Devel Archive] [More Archives]
![]() |
![]() |