Skip to content

Commit

Permalink
USB: don't run ehci_reset in ehci_run for tdi device
Browse files Browse the repository at this point in the history
TDI driver does the ehci_reset in their reset callback.
Don't reset in ehci_run because configuration settings done in
platform driver will be reset.

This will allow to make msm use ehci_run.

Signed-off-by: Matthieu CASTET <castet.matthieu@parrot.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Matthieu CASTET authored and Greg Kroah-Hartman committed Feb 17, 2011
1 parent e2904ee commit bcf4081
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion drivers/usb/host/ehci-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,12 @@ static int ehci_run (struct usb_hcd *hcd)
hcd->uses_new_polling = 1;

/* EHCI spec section 4.1 */
if ((retval = ehci_reset(ehci)) != 0) {
/*
* TDI driver does the ehci_reset in their reset callback.
* Don't reset here, because configuration settings will
* vanish.
*/
if (!ehci_is_TDI(ehci) && (retval = ehci_reset(ehci)) != 0) {
ehci_mem_cleanup(ehci);
return retval;
}
Expand Down
5 changes: 3 additions & 2 deletions drivers/usb/host/ehci-orion.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ static int ehci_orion_setup(struct usb_hcd *hcd)
struct ehci_hcd *ehci = hcd_to_ehci(hcd);
int retval;

ehci_reset(ehci);
hcd->has_tt = 1;

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

hcd->has_tt = 1;
ehci_reset(ehci);

ehci_port_power(ehci, 0);

Expand Down

0 comments on commit bcf4081

Please sign in to comment.