<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">Date: Wed, 16 Mar 2005 14:46:09 +0100
From: Colin Leroy &lt;colin@colino.net&gt;
To: David Brownell &lt;david-b@pacbell.net&gt;
Cc: linux-usb-devel@lists.sourceforge.net, debian-powerpc@lists.debian.org,
 Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;, Greg KH &lt;greg@kroah.com&gt;
Subject: Re: [linux-usb-devel] [PATCH] Re-power USB ports on wakeup
Message-ID: &lt;20050316144609.62da0122@jack.colino.net&gt;
In-Reply-To: &lt;200503151736.36430.david-b@pacbell.net&gt;
References: &lt;20050315173450.721b9525@jack.colino.net&gt;
	&lt;200503151736.36430.david-b@pacbell.net&gt;
X-Mailer: Sylpheed-Claws 1.0.1cvs22.2 (GTK+ 2.6.1; powerpc-unknown-linux-gnu)
X-Face: Fy:*XpRna1/tz}cJ@O'0^:qYs:8b[Rg`*8,+o^[fI?&lt;%5LeB,Xz8ZJK[r7V0hBs8G)*&amp;C+XA0qHoR=LoTohe@7X5K$A-@cN6n~~J/]+{[)E4h'lK$13WQf$.R+Pi;E09tk&amp;{t|;~dakRD%CLHrk6m!?gA,5|Sb=fJ=&gt;[9#n1Bu8?VngkVM4{'^'V_qgdA.8yn3)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

On 15 Mar 2005 at 17h03, David Brownell wrote:

Hi, 

&gt; This patch is self-evidently incorrect:  by definition, a suspended
&gt; port maintains VBUS power.  Otherwise the device connected to the
&gt; port will get disconnected, rather than suspended ... and it won't
&gt; be able to issue wakeup events.  All suspending does is stop sending
&gt; USB traffic down the port, notably SOF tokens; the device connected
&gt; to the port then enters a low power mode, typically consuming at most
&gt; 500uA from VBUS (vs typically 100mA when it's active/configured).

Another idea. Is it harmful to "re-power" already powered ports? For
example like this:

Signed-off-by: Colin Leroy &lt;colin@colino.net&gt;
--- a/drivers/usb/host/ehci-hcd.c	2005-03-15 17:28:52.000000000 +0100
+++ b/drivers/usb/host/ehci-hcd.c	2005-03-16 14:44:06.000000000 +0100
@@ -773,14 +775,12 @@
 		/* here we "know" root ports should always stay powered;
 		 * but some controllers may lost all power.
 		 */
-		if (powerup) {
-			ehci_dbg (ehci, "...powerup ports...\n");
-			for (port = HCS_N_PORTS (ehci-&gt;hcs_params); port &gt; 0; )
-				(void) ehci_hub_control(hcd,
-					SetPortFeature, USB_PORT_FEAT_POWER,
-						port--, NULL, 0);
-			msleep(20);
-		}
+		ehci_dbg (ehci, "...powerup ports...\n");
+		for (port = HCS_N_PORTS (ehci-&gt;hcs_params); port &gt; 0; )
+			(void) ehci_hub_control(hcd,
+				SetPortFeature, USB_PORT_FEAT_POWER,
+					port--, NULL, 0);
+		msleep(20);
 	}
 
 	return retval;
</pre></body></html>