diff options
author | David Brownell <david-b@pacbell.net> | 2006-01-24 11:40:27 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-20 17:49:56 -0500 |
commit | fb669cc01ed778c4926f395e44a9b61644597d38 (patch) | |
tree | a81c4f655a0470f84dfa4fbfcff3e64d83da3463 /drivers/usb/core/hub.c | |
parent | 6a9062f393fa48125df23c5491543828a21e1ae0 (diff) |
[PATCH] USB: remove usbcore-specific wakeup flags
This makes usbcore use the driver model wakeup flags for host controllers
and for their root hubs. Since previous patches have removed all users of
the HCD flags they replace, this converts the last users of those flags.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/hub.c')
-rw-r--r-- | drivers/usb/core/hub.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 867fa813023..f1d64d4bbf5 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -1006,12 +1006,18 @@ void usb_set_device_state(struct usb_device *udev, | |||
1006 | ; /* do nothing */ | 1006 | ; /* do nothing */ |
1007 | else if (new_state != USB_STATE_NOTATTACHED) { | 1007 | else if (new_state != USB_STATE_NOTATTACHED) { |
1008 | udev->state = new_state; | 1008 | udev->state = new_state; |
1009 | if (new_state == USB_STATE_CONFIGURED) | 1009 | |
1010 | device_init_wakeup(&udev->dev, | 1010 | /* root hub wakeup capabilities are managed out-of-band |
1011 | (udev->actconfig->desc.bmAttributes | 1011 | * and may involve silicon errata ... ignore them here. |
1012 | & USB_CONFIG_ATT_WAKEUP)); | 1012 | */ |
1013 | else if (new_state != USB_STATE_SUSPENDED) | 1013 | if (udev->parent) { |
1014 | device_init_wakeup(&udev->dev, 0); | 1014 | if (new_state == USB_STATE_CONFIGURED) |
1015 | device_init_wakeup(&udev->dev, | ||
1016 | (udev->actconfig->desc.bmAttributes | ||
1017 | & USB_CONFIG_ATT_WAKEUP)); | ||
1018 | else if (new_state != USB_STATE_SUSPENDED) | ||
1019 | device_init_wakeup(&udev->dev, 0); | ||
1020 | } | ||
1015 | } else | 1021 | } else |
1016 | recursively_mark_NOTATTACHED(udev); | 1022 | recursively_mark_NOTATTACHED(udev); |
1017 | spin_unlock_irqrestore(&device_state_lock, flags); | 1023 | spin_unlock_irqrestore(&device_state_lock, flags); |
@@ -1877,9 +1883,9 @@ int usb_resume_device(struct usb_device *udev) | |||
1877 | if (udev->state == USB_STATE_NOTATTACHED) | 1883 | if (udev->state == USB_STATE_NOTATTACHED) |
1878 | return -ENODEV; | 1884 | return -ENODEV; |
1879 | 1885 | ||
1880 | #ifdef CONFIG_USB_SUSPEND | ||
1881 | /* selective resume of one downstream hub-to-device port */ | 1886 | /* selective resume of one downstream hub-to-device port */ |
1882 | if (udev->parent) { | 1887 | if (udev->parent) { |
1888 | #ifdef CONFIG_USB_SUSPEND | ||
1883 | if (udev->state == USB_STATE_SUSPENDED) { | 1889 | if (udev->state == USB_STATE_SUSPENDED) { |
1884 | // NOTE swsusp may bork us, device state being wrong... | 1890 | // NOTE swsusp may bork us, device state being wrong... |
1885 | // NOTE this fails if parent is also suspended... | 1891 | // NOTE this fails if parent is also suspended... |
@@ -1887,8 +1893,8 @@ int usb_resume_device(struct usb_device *udev) | |||
1887 | udev->portnum, udev); | 1893 | udev->portnum, udev); |
1888 | } else | 1894 | } else |
1889 | status = 0; | 1895 | status = 0; |
1890 | } else | ||
1891 | #endif | 1896 | #endif |
1897 | } else | ||
1892 | status = finish_device_resume(udev); | 1898 | status = finish_device_resume(udev); |
1893 | if (status < 0) | 1899 | if (status < 0) |
1894 | dev_dbg(&udev->dev, "can't resume, status %d\n", | 1900 | dev_dbg(&udev->dev, "can't resume, status %d\n", |