diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2007-09-20 12:37:50 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-12 17:55:28 -0400 |
commit | 7108f28465a0a37d5afc05c5ad788938423b74a7 (patch) | |
tree | eb7e15a097d8d4b0e826ffa8f1613bea4e091140 /drivers/usb | |
parent | 393e5511a5f58e82b88589f1dd2464f6b661df06 (diff) |
USB: don't propagate FREEZE or PRETHAW suspends
This patch (as992) fixes a recently-added bug. During a FREEZE or
PRETHAW suspend notification, non-root devices don't actually get
suspended. So we shouldn't tell their parent hubs that they did.
(This code path used to be skipped over, until the FREEZE/PRETHAW test
got moved out of usb_suspend_both() into generic_suspend().)
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/core/driver.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index ba5bbc7eedcc..3f734240e0ec 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c | |||
@@ -1112,7 +1112,12 @@ static int usb_suspend_both(struct usb_device *udev, pm_message_t msg) | |||
1112 | usb_hcd_flush_endpoint(udev, udev->ep_out[i]); | 1112 | usb_hcd_flush_endpoint(udev, udev->ep_out[i]); |
1113 | usb_hcd_flush_endpoint(udev, udev->ep_in[i]); | 1113 | usb_hcd_flush_endpoint(udev, udev->ep_in[i]); |
1114 | } | 1114 | } |
1115 | if (parent) | 1115 | |
1116 | /* If this is just a FREEZE or a PRETHAW, udev might | ||
1117 | * not really be suspended. Only true suspends get | ||
1118 | * propagated up the device tree. | ||
1119 | */ | ||
1120 | if (parent && udev->state == USB_STATE_SUSPENDED) | ||
1116 | usb_autosuspend_device(parent); | 1121 | usb_autosuspend_device(parent); |
1117 | } | 1122 | } |
1118 | 1123 | ||