# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.455   -> 1.456  
#	drivers/usb/core/message.c	1.2     -> 1.3    
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/06/05	david-b@pacbell.net	1.456
# [PATCH] synchronous control/bulk messaging
# 
# This one-liner fixes a problem in synchronous messaging
# with usb_bulk_msg(), usb_control_msg(), and everything
# that calls usb_control_msg():  you're not allowed to call
# blocking functions when you're already on a wait queue.
# 
# A better fix would be to just stick the thread on the
# wait queue _after_ submitting the URB, but that should
# involve more testing than I have time for just now.
# --------------------------------------------
#
diff -Nru a/drivers/usb/core/message.c b/drivers/usb/core/message.c
--- a/drivers/usb/core/message.c	Wed Jun  5 12:28:49 2002
+++ b/drivers/usb/core/message.c	Wed Jun  5 12:28:49 2002
@@ -36,7 +36,7 @@
 	add_wait_queue(&awd.wqh, &wait);
 
 	urb->context = &awd;
-	status = usb_submit_urb(urb, GFP_KERNEL);
+	status = usb_submit_urb(urb, GFP_ATOMIC);
 	if (status) {
 		// something went wrong
 		usb_free_urb(urb);
