ChangeSet 1.2181.4.42, 2005/03/21 22:24:51-08:00, [EMAIL PROTECTED]

        [PATCH] USBcore updates
        
        This is the fifth of five updates to usbcore:
        
                Add some extra debugging messages to the hub driver and make it
                set the power state for root hubs like it does for external 
hubs.
        
        Signed-off-by: Alan Stern <[EMAIL PROTECTED]>
        Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>



 hub.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)


diff -Nru a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
--- a/drivers/usb/core/hub.c    2005-03-30 15:13:03 -08:00
+++ b/drivers/usb/core/hub.c    2005-03-30 15:13:03 -08:00
@@ -1388,8 +1388,13 @@
                        dev_err(hub->intfdev,
                                        "cannot reset port %d (err = %d)\n",
                                        port1, status);
-               else
+               else {
                        status = hub_port_wait_reset(hub, port1, udev, delay);
+                       if (status)
+                               dev_dbg(hub->intfdev,
+                                               "port_wait_reset: err = %d\n",
+                                               status);
+               }
 
                /* return on disconnect or reset */
                switch (status) {
@@ -1620,9 +1625,11 @@
                struct usb_bus  *bus = udev->bus;
                if (bus && bus->op->hub_suspend) {
                        status = bus->op->hub_suspend (bus);
-                       if (status == 0)
+                       if (status == 0) {
+                               dev_dbg(&udev->dev, "usb suspend\n");
                                usb_set_device_state(udev,
                                                USB_STATE_SUSPENDED);
+                       }
                } else
                        status = -EOPNOTSUPP;
        } else
@@ -1840,9 +1847,11 @@
                } else
                        status = -EOPNOTSUPP;
                if (status == 0) {
+                       dev_dbg(&udev->dev, "usb resume\n");
                        /* TRSMRCY = 10 msec */
                        msleep(10);
                        usb_set_device_state (udev, USB_STATE_CONFIGURED);
+                       udev->dev.power.power_state = PMSG_ON;
                        status = hub_resume (udev
                                        ->actconfig->interface[0]);
                }
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to