]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
USB: don't run ehci_reset in ehci_run for tdi device
authorMatthieu CASTET <matthieu.castet@parrot.com>
Tue, 15 Feb 2011 17:40:28 +0000 (18:40 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 17 Feb 2011 18:57:13 +0000 (10:57 -0800)
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>
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-orion.c

index 74dcf49bd015a99384b04678dff4f9f576f4a809..4c77a818fd805e17b0b69a2cb40d81c569d617cb 100644 (file)
@@ -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;
        }
index 0f87dc72820a2d6f61e99c378e29a6d5989dce86..281e094e1c18b2849a568d5e0466c7c8a53b0d51 100644 (file)
@@ -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;
@@ -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);