Commit 80896c80 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[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.
parent 9a53bdfb
...@@ -36,7 +36,7 @@ static int usb_start_wait_urb(struct urb *urb, int timeout, int* actual_length) ...@@ -36,7 +36,7 @@ static int usb_start_wait_urb(struct urb *urb, int timeout, int* actual_length)
add_wait_queue(&awd.wqh, &wait); add_wait_queue(&awd.wqh, &wait);
urb->context = &awd; urb->context = &awd;
status = usb_submit_urb(urb, GFP_KERNEL); status = usb_submit_urb(urb, GFP_ATOMIC);
if (status) { if (status) {
// something went wrong // something went wrong
usb_free_urb(urb); usb_free_urb(urb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment