diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2011-09-27 15:54:22 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2011-09-27 15:54:22 -0400 |
commit | 30b1a7a32ca48fd8758f8ca44d60deebc0aa3d72 (patch) | |
tree | 156ed92a7a42e839722e27e6f4a8ad2937624730 /drivers | |
parent | 2e6ba515f50ef7ddf35b2703d014d3216c9b8b24 (diff) |
USB: Add wakeup info to debugging messages
This patch (as1487) improves the usbcore debugging output for port
suspend and bus suspend, by stating whether or not remote wakeup is
enabled.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/core/hcd.c | 9 | ||||
-rw-r--r-- | drivers/usb/core/hub.c | 7 |
2 files changed, 8 insertions, 8 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index da582f4e486b..877e0e27b90a 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -1959,8 +1959,9 @@ int hcd_bus_suspend(struct usb_device *rhdev, pm_message_t msg) | |||
1959 | int status; | 1959 | int status; |
1960 | int old_state = hcd->state; | 1960 | int old_state = hcd->state; |
1961 | 1961 | ||
1962 | dev_dbg(&rhdev->dev, "bus %s%s\n", | 1962 | dev_dbg(&rhdev->dev, "bus %ssuspend, wakeup %d\n", |
1963 | (PMSG_IS_AUTO(msg) ? "auto-" : ""), "suspend"); | 1963 | (PMSG_IS_AUTO(msg) ? "auto-" : ""), |
1964 | rhdev->do_remote_wakeup); | ||
1964 | if (HCD_DEAD(hcd)) { | 1965 | if (HCD_DEAD(hcd)) { |
1965 | dev_dbg(&rhdev->dev, "skipped %s of dead bus\n", "suspend"); | 1966 | dev_dbg(&rhdev->dev, "skipped %s of dead bus\n", "suspend"); |
1966 | return 0; | 1967 | return 0; |
@@ -1995,8 +1996,8 @@ int hcd_bus_resume(struct usb_device *rhdev, pm_message_t msg) | |||
1995 | int status; | 1996 | int status; |
1996 | int old_state = hcd->state; | 1997 | int old_state = hcd->state; |
1997 | 1998 | ||
1998 | dev_dbg(&rhdev->dev, "usb %s%s\n", | 1999 | dev_dbg(&rhdev->dev, "usb %sresume\n", |
1999 | (PMSG_IS_AUTO(msg) ? "auto-" : ""), "resume"); | 2000 | (PMSG_IS_AUTO(msg) ? "auto-" : "")); |
2000 | if (HCD_DEAD(hcd)) { | 2001 | if (HCD_DEAD(hcd)) { |
2001 | dev_dbg(&rhdev->dev, "skipped %s of dead bus\n", "resume"); | 2002 | dev_dbg(&rhdev->dev, "skipped %s of dead bus\n", "resume"); |
2002 | return 0; | 2003 | return 0; |
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index ee50e0bf84e8..13bc83240adb 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -2324,8 +2324,6 @@ int usb_port_suspend(struct usb_device *udev, pm_message_t msg) | |||
2324 | int port1 = udev->portnum; | 2324 | int port1 = udev->portnum; |
2325 | int status; | 2325 | int status; |
2326 | 2326 | ||
2327 | // dev_dbg(hub->intfdev, "suspend port %d\n", port1); | ||
2328 | |||
2329 | /* enable remote wakeup when appropriate; this lets the device | 2327 | /* enable remote wakeup when appropriate; this lets the device |
2330 | * wake up the upstream hub (including maybe the root hub). | 2328 | * wake up the upstream hub (including maybe the root hub). |
2331 | * | 2329 | * |
@@ -2371,8 +2369,9 @@ int usb_port_suspend(struct usb_device *udev, pm_message_t msg) | |||
2371 | status = 0; | 2369 | status = 0; |
2372 | } else { | 2370 | } else { |
2373 | /* device has up to 10 msec to fully suspend */ | 2371 | /* device has up to 10 msec to fully suspend */ |
2374 | dev_dbg(&udev->dev, "usb %ssuspend\n", | 2372 | dev_dbg(&udev->dev, "usb %ssuspend, wakeup %d\n", |
2375 | (PMSG_IS_AUTO(msg) ? "auto-" : "")); | 2373 | (PMSG_IS_AUTO(msg) ? "auto-" : ""), |
2374 | udev->do_remote_wakeup); | ||
2376 | usb_set_device_state(udev, USB_STATE_SUSPENDED); | 2375 | usb_set_device_state(udev, USB_STATE_SUSPENDED); |
2377 | msleep(10); | 2376 | msleep(10); |
2378 | } | 2377 | } |