aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2007-05-22 09:38:39 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-05-23 02:45:50 -0400
commit7ed92f1a149dddc3cb537ccd7441e98adac12c3e (patch)
tree86408164dd5cfbb48bade9ca49601c4f2d7edd16 /drivers/usb
parent8ab5e8c0ca55c4b40d254f7043a9052345fcd343 (diff)
USB: make the autosuspend workqueue thread freezable
This patch (as881b) makes the ksuspend_usb_wq workqueue freezable. We don't want a rogue workqueue thread running around, unexpectedly suspending or resuming USB devices in the middle of a system sleep transition. This fixes Bugzilla #8498. 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/usb.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index 18ddc5e67e39..80627b6a2bf9 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -205,7 +205,11 @@ struct device_type usb_device_type = {
205 205
206static int ksuspend_usb_init(void) 206static int ksuspend_usb_init(void)
207{ 207{
208 ksuspend_usb_wq = create_singlethread_workqueue("ksuspend_usbd"); 208 /* This workqueue is supposed to be both freezable and
209 * singlethreaded. Its job doesn't justify running on more
210 * than one CPU.
211 */
212 ksuspend_usb_wq = create_freezeable_workqueue("ksuspend_usbd");
209 if (!ksuspend_usb_wq) 213 if (!ksuspend_usb_wq)
210 return -ENOMEM; 214 return -ENOMEM;
211 return 0; 215 return 0;