[patch 2.6.23-rc3 1/4] EHCI restart speedup

David Brownell <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
From: Marcelo Tosatti <[email protected]>

It is not necessary to powerdown the ports on ehci_pci_reinit() when the
chip reset already did that.  Removing this saves 20ms during restart
after poweroff paths (which OLPC uses a lot).

To ensure driver startup then behaves consistently, force a reset during
driver startup.  (Not doing this was an accident of some previous changes
to the init sequence.)

Make the corresponding change in the PS3 support.  It's not clear what
ehci-fsl should do here; it has similar code to the PS3.

Signed-off-by: Marcelo Tosatti <[email protected]>
Signed-off-by: David Brownell <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
 drivers/usb/host/ehci-pci.c |    5 +----
 drivers/usb/host/ehci-ps3.c |    2 +-
 2 files changed, 2 insertions(+), 5 deletions(-)

--- g26.orig/drivers/usb/host/ehci-pci.c	2007-07-12 17:50:02.000000000 -0700
+++ g26/drivers/usb/host/ehci-pci.c	2007-08-17 23:15:09.000000000 -0700
@@ -58,8 +58,6 @@ static int ehci_pci_reinit(struct ehci_h
 	if (!retval)
 		ehci_dbg(ehci, "MWI active\n");
 
-	ehci_port_power(ehci, 0);
-
 	return 0;
 }
 
@@ -156,8 +154,7 @@ static int ehci_pci_setup(struct usb_hcd
 		break;
 	}
 
-	if (ehci_is_TDI(ehci))
-		ehci_reset(ehci);
+	ehci_reset(ehci);
 
 	/* at least the Genesys GL880S needs fixup here */
 	temp = HCS_N_CC(ehci->hcs_params) * HCS_N_PCC(ehci->hcs_params);
--- g26.orig/drivers/usb/host/ehci-ps3.c	2007-08-17 23:16:22.000000000 -0700
+++ g26/drivers/usb/host/ehci-ps3.c	2007-08-17 23:16:28.000000000 -0700
@@ -47,7 +47,7 @@ static int ps3_ehci_hc_reset(struct usb_
 	if (result)
 		return result;
 
-	ehci_port_power(ehci, 0);
+	ehci_reset(ehci);
 
 	return result;
 }

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.