Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: ehci-orion: Call ehci_reset before ehci_halt

I noticed that USB initialization didn't setup correctly on my kirkwood
based board (OpenRD base) if I hadn't initialized USB in U-boot first.
The error message looks like this:

ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
orion-ehci orion-ehci.0: Marvell Orion EHCI
orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
orion-ehci orion-ehci.0: can't setup
orion-ehci orion-ehci.0: USB bus 1 deregistered
orion-ehci orion-ehci.0: init orion-ehci.0 fail, -110
orion-ehci: probe of orion-ehci.0 failed with error -110

which is caused by ehci_halt() timing out in the handshake() call. I
noticed that U-boot does a reset before calling handshake(), so this
patch does the same thing for Linux. USB now works for me.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Acked-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Simon Kagstrom and committed by
Greg Kroah-Hartman
bcfa4e68 8bf16ba7

+1 -1
+1 -1
drivers/usb/host/ehci-orion.c
··· 105 105 struct ehci_hcd *ehci = hcd_to_ehci(hcd); 106 106 int retval; 107 107 108 + ehci_reset(ehci); 108 109 retval = ehci_halt(ehci); 109 110 if (retval) 110 111 return retval; ··· 119 118 120 119 hcd->has_tt = 1; 121 120 122 - ehci_reset(ehci); 123 121 ehci_port_power(ehci, 0); 124 122 125 123 return retval;