Re: [linux-usb-devel] [PATCH] Re-power USB ports on wakeup
On 15 Mar 2005 at 17h03, David Brownell wrote:
Hi,
> This patch is self-evidently incorrect: by definition, a suspended
> port maintains VBUS power. Otherwise the device connected to the
> port will get disconnected, rather than suspended ... and it won't
> be able to issue wakeup events. All suspending does is stop sending
> USB traffic down the port, notably SOF tokens; the device connected
> to the port then enters a low power mode, typically consuming at most
> 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 <colin@colino.net>
--- 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->hcs_params); port > 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->hcs_params); port > 0; )
+ (void) ehci_hub_control(hcd,
+ SetPortFeature, USB_PORT_FEAT_POWER,
+ port--, NULL, 0);
+ msleep(20);
}
return retval;
Reply to: