summaryrefslogtreecommitdiff
path: root/drivers/usb/core/hub.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2007-03-13 23:37:30 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2007-04-28 00:28:35 +0400
commit6b157c9bf3bace6eeb4a973da63923ef24995cce (patch)
tree7069b603d4a3d4723e8b99a23f97139b100547db /drivers/usb/core/hub.c
parent378465396e74aa6ef36271cecaea49eb742025a8 (diff)
downloadlinux-6b157c9bf3bace6eeb4a973da63923ef24995cce.tar.xz
USB: separate autosuspend from external suspend
This patch (as866) adds new entry points for external USB device suspend and resume requests, as opposed to internally-generated autosuspend or autoresume. It also changes the existing remote-wakeup code paths to use the new routines, since remote wakeup is not the same as autoresume. As part of the change, it turns out to be necessary to do remote wakeup of root hubs from a workqueue. We had been using khubd, but it does autoresume rather than an external resume. Using the ksuspend_usb_wq workqueue for this purpose seemed a logical choice. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/hub.c')
-rw-r--r--drivers/usb/core/hub.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 7a6028599d62..19abe81babd5 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -1855,12 +1855,7 @@ static int remote_wakeup(struct usb_device *udev)
usb_lock_device(udev);
if (udev->state == USB_STATE_SUSPENDED) {
dev_dbg(&udev->dev, "usb %sresume\n", "wakeup-");
- status = usb_autoresume_device(udev);
-
- /* Give the interface drivers a chance to do something,
- * then autosuspend the device again. */
- if (status == 0)
- usb_autosuspend_device(udev);
+ status = usb_external_resume_device(udev);
}
usb_unlock_device(udev);
return status;
@@ -1984,13 +1979,6 @@ static inline int remote_wakeup(struct usb_device *udev)
#define hub_resume NULL
#endif
-void usb_resume_root_hub(struct usb_device *hdev)
-{
- struct usb_hub *hub = hdev_to_hub(hdev);
-
- kick_khubd(hub);
-}
-
/* USB 2.0 spec, 7.1.7.3 / fig 7-29:
*