[PATCH] EHCI controller timeouts experienced on the SoC Vortex86XD board during the bootup

From: Jaromir Capik
Date: Mon Jun 04 2012 - 14:14:37 EST


Hello guys.

As ehci-pci.c was previously maintained by David Brownell,
I'm searching for anyone who could merge the attached patch
I received from a friend of mine, who experienced
EHCI timeouts (error -110) on the SoC Vortex86XD board
during the bootup.
The problem doesn't appear on a regular basis (just sometimes
during the boot). He was trying almost everything in order
to make it work (including playing with kernel parameters),
but without success.
Jan Barinka (author of the patch) says, that the EHCI controller
is asked to be halted during the startup and should confirm that
by setting a corresponding flag, but sometimes that doesn't
happen and the operation times out. The controller then doesn't
work at all. Jan tried to set the timeout to 10 minutes,
but that didn't help either.
His patch resets the controller right before issuing
the halt command even if the device reset is not recommended
when the device might be running, but the issue disappeared
completely in his case.

Please, let me know if anyone could take care of the issue
and check the patch. Any questions are welcome.

Thank you.

Regards,
Jaromir.

--
Jaromir Capik
Red Hat Czech, s.r.o.
Software Engineer / BaseOS

Email: jcapik@xxxxxxxxxx
Web: www.cz.redhat.com
Red Hat Czech s.r.o., Purkynova 99/71, 612 45, Brno, Czech Republic
IC: 27690016


--- linux-3.2.9/drivers/usb/host/ehci-pci.c 2012-03-01 01:32:49.000000000 +0100
+++ linux-3.2.9-usb-patch/drivers/usb/host/ehci-pci.c 2012-03-05 03:04:46.000000000 +0100
@@ -97,6 +97,24 @@
break;
}
break;
+
+ /* RDC USB 2.0 device 0x6061 on Vortex Soc DX board sometimes
+ * timed out on halt command. Reseting controller before halt command
+ * helped.
+ *
+ * Trade Fides (JmJ) 7.3.2012
+ */
+ case PCI_VENDOR_ID_RDC:
+ ehci_info(ehci,
+ "RDC Semiconductor workaround - calling reset before halting\n");
+ retval = ehci_reset(ehci);
+ if (retval)
+ {
+ ehci_warn(ehci, "RDC reset workaround failed\n");
+ return retval;
+ }
+ break;
+
}

/* cache this readonly data; minimize chip reads */
@@ -104,7 +122,10 @@

retval = ehci_halt(ehci);
if (retval)
+ {
+ ehci_warn(ehci, "USB controller halt failed\n");
return retval;
+ }

if ((pdev->vendor == PCI_VENDOR_ID_AMD && pdev->device == 0x7808) ||
(pdev->vendor == PCI_VENDOR_ID_ATI && pdev->device == 0x4396)) {