aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/hub.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2007-03-13 16:37:30 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-04-27 16:28:35 -0400
commit6b157c9bf3bace6eeb4a973da63923ef24995cce (patch)
tree7069b603d4a3d4723e8b99a23f97139b100547db /drivers/usb/core/hub.c
parent378465396e74aa6ef36271cecaea49eb742025a8 (diff)
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)
1855 usb_lock_device(udev); 1855 usb_lock_device(udev);
1856 if (udev->state == USB_STATE_SUSPENDED) { 1856 if (udev->state == USB_STATE_SUSPENDED) {
1857 dev_dbg(&udev->dev, "usb %sresume\n", "wakeup-"); 1857 dev_dbg(&udev->dev, "usb %sresume\n", "wakeup-");
1858 status = usb_autoresume_device(udev); 1858 status = usb_external_resume_device(udev);
1859
1860 /* Give the interface drivers a chance to do something,
1861 * then autosuspend the device again. */
1862 if (status == 0)
1863 usb_autosuspend_device(udev);
1864 } 1859 }
1865 usb_unlock_device(udev); 1860 usb_unlock_device(udev);
1866 return status; 1861 return status;
@@ -1984,13 +1979,6 @@ static inline int remote_wakeup(struct usb_device *udev)
1984#define hub_resume NULL 1979#define hub_resume NULL
1985#endif 1980#endif
1986 1981
1987void usb_resume_root_hub(struct usb_device *hdev)
1988{
1989 struct usb_hub *hub = hdev_to_hub(hdev);
1990
1991 kick_khubd(hub);
1992}
1993
1994 1982
1995/* USB 2.0 spec, 7.1.7.3 / fig 7-29: 1983/* USB 2.0 spec, 7.1.7.3 / fig 7-29:
1996 * 1984 *