Skip to content

Commit

Permalink
USB: ehci-orion: Call ehci_reset before ehci_halt
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Simon Kagstrom authored and Greg Kroah-Hartman committed Jul 28, 2009
1 parent 8bf16ba commit bcfa4e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/host/ehci-orion.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ static int ehci_orion_setup(struct usb_hcd *hcd)
struct ehci_hcd *ehci = hcd_to_ehci(hcd);
int retval;

ehci_reset(ehci);
retval = ehci_halt(ehci);
if (retval)
return retval;
Expand All @@ -118,7 +119,6 @@ static int ehci_orion_setup(struct usb_hcd *hcd)

hcd->has_tt = 1;

ehci_reset(ehci);
ehci_port_power(ehci, 0);

return retval;
Expand Down

0 comments on commit bcfa4e6

Please sign in to comment.