ChangeSet 1.1587.3.52, 2004/05/11 15:57:51-07:00, [EMAIL PROTECTED]

[PATCH] USB: khubd turns port power back on after reset

This goes with the OHCI anti-deadlock patch, and is what
ensures that when a root hub loses power during suspend,
khubd can turn port power back on so devices can enumerate.


 drivers/usb/core/hub.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletion(-)


diff -Nru a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
--- a/drivers/usb/core/hub.c    Fri May 14 15:28:32 2004
+++ b/drivers/usb/core/hub.c    Fri May 14 15:28:32 2004
@@ -1282,9 +1282,16 @@
        /* Disconnect any existing devices under this port */
        if (hub->children[port])
                usb_disconnect(&hub->children[port]);
- 
+
        /* Return now if nothing is connected */
        if (!(portstatus & USB_PORT_STAT_CONNECTION)) {
+
+               /* maybe switch power back on (e.g. root hub was reset) */
+               if ((hubstate->descriptor->wHubCharacteristics
+                                       & HUB_CHAR_LPSM) < 2
+                               && !(portstatus & (1 << USB_PORT_FEAT_POWER)))
+                       set_port_feature(hub, port + 1, USB_PORT_FEAT_POWER);
+ 
                if (portstatus & USB_PORT_STAT_ENABLE)
                        goto done;
                return;



-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id%62&alloc_ida84&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to