From: David Brownell <[EMAIL PROTECTED]>

This fixes a small regression in USB controller power usage for many
OHCI controllers, notably including every non-PCI version of OHCI:  on
those systems, the runtime autosuspend mechanism is no longer enabled.

The change moves to saner defaults.  All root hubs are expected to handle
remote wakeup (and hence autosuspend), although drivers for buggy silicon
may override that default.

Signed-off-by: David Brownell <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>

---

 drivers/usb/core/hcd.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

db4cefaaea4c6d67cdaebfd315abc791c5c9d22f
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index fbd938d..e2e00ba 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -1805,6 +1805,12 @@ int usb_add_hcd(struct usb_hcd *hcd,
                        USB_SPEED_FULL;
        hcd->self.root_hub = rhdev;
 
+       /* wakeup flag init defaults to "everything works" for root hubs,
+        * but drivers can override it in reset() if needed, along with
+        * recording the overall controller's system wakeup capability.
+        */
+       device_init_wakeup(&rhdev->dev, 1);
+
        /* "reset" is misnamed; its role is now one-time init. the controller
         * should already have been reset (and boot firmware kicked off etc).
         */
@@ -1813,13 +1819,6 @@ int usb_add_hcd(struct usb_hcd *hcd,
                goto err_hcd_driver_setup;
        }
 
-       /* wakeup flag init is in transition; for now we can't rely on PCI to
-        * initialize these bits properly, so we let reset() override it.
-        * This init should _precede_ the reset() once PCI behaves.
-        */
-       device_init_wakeup(&rhdev->dev,
-                       device_can_wakeup(hcd->self.controller));
-
        /* NOTE: root hub and controller capabilities may not be the same */
        if (device_can_wakeup(hcd->self.controller)
                        && device_can_wakeup(&hcd->self.root_hub->dev))
-- 
1.3.2



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to