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>
This commit is contained in:
Родитель
2e6ba515f5
Коммит
30b1a7a32c
|
@ -1959,8 +1959,9 @@ int hcd_bus_suspend(struct usb_device *rhdev, pm_message_t msg)
|
||||||
int status;
|
int status;
|
||||||
int old_state = hcd->state;
|
int old_state = hcd->state;
|
||||||
|
|
||||||
dev_dbg(&rhdev->dev, "bus %s%s\n",
|
dev_dbg(&rhdev->dev, "bus %ssuspend, wakeup %d\n",
|
||||||
(PMSG_IS_AUTO(msg) ? "auto-" : ""), "suspend");
|
(PMSG_IS_AUTO(msg) ? "auto-" : ""),
|
||||||
|
rhdev->do_remote_wakeup);
|
||||||
if (HCD_DEAD(hcd)) {
|
if (HCD_DEAD(hcd)) {
|
||||||
dev_dbg(&rhdev->dev, "skipped %s of dead bus\n", "suspend");
|
dev_dbg(&rhdev->dev, "skipped %s of dead bus\n", "suspend");
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1995,8 +1996,8 @@ int hcd_bus_resume(struct usb_device *rhdev, pm_message_t msg)
|
||||||
int status;
|
int status;
|
||||||
int old_state = hcd->state;
|
int old_state = hcd->state;
|
||||||
|
|
||||||
dev_dbg(&rhdev->dev, "usb %s%s\n",
|
dev_dbg(&rhdev->dev, "usb %sresume\n",
|
||||||
(PMSG_IS_AUTO(msg) ? "auto-" : ""), "resume");
|
(PMSG_IS_AUTO(msg) ? "auto-" : ""));
|
||||||
if (HCD_DEAD(hcd)) {
|
if (HCD_DEAD(hcd)) {
|
||||||
dev_dbg(&rhdev->dev, "skipped %s of dead bus\n", "resume");
|
dev_dbg(&rhdev->dev, "skipped %s of dead bus\n", "resume");
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -2324,8 +2324,6 @@ int usb_port_suspend(struct usb_device *udev, pm_message_t msg)
|
||||||
int port1 = udev->portnum;
|
int port1 = udev->portnum;
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
// dev_dbg(hub->intfdev, "suspend port %d\n", port1);
|
|
||||||
|
|
||||||
/* enable remote wakeup when appropriate; this lets the device
|
/* enable remote wakeup when appropriate; this lets the device
|
||||||
* wake up the upstream hub (including maybe the root hub).
|
* wake up the upstream hub (including maybe the root hub).
|
||||||
*
|
*
|
||||||
|
@ -2371,8 +2369,9 @@ int usb_port_suspend(struct usb_device *udev, pm_message_t msg)
|
||||||
status = 0;
|
status = 0;
|
||||||
} else {
|
} else {
|
||||||
/* device has up to 10 msec to fully suspend */
|
/* device has up to 10 msec to fully suspend */
|
||||||
dev_dbg(&udev->dev, "usb %ssuspend\n",
|
dev_dbg(&udev->dev, "usb %ssuspend, wakeup %d\n",
|
||||||
(PMSG_IS_AUTO(msg) ? "auto-" : ""));
|
(PMSG_IS_AUTO(msg) ? "auto-" : ""),
|
||||||
|
udev->do_remote_wakeup);
|
||||||
usb_set_device_state(udev, USB_STATE_SUSPENDED);
|
usb_set_device_state(udev, USB_STATE_SUSPENDED);
|
||||||
msleep(10);
|
msleep(10);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче