Commit 4bbf5ebf authored by Kevin Hilman's avatar Kevin Hilman Committed by Tony Lindgren

ARM: OMAP: MUSB: prevent recursive spinlock in TX path

If a hard IRQ occurs during the soft IRQ TX processing, a recursive
spinlock BUG can occur.

Prevent this by interrupt-off locking around usb_hcd_link_urb_to_ep()

Found while testing bluetooth A2DP audio over USB.
Signed-off-by: default avatarKevin Hilman <khilman@mvista.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent e2fbfd6b
......@@ -1757,7 +1757,9 @@ static int musb_urb_enqueue(
if (!is_host_active(musb) || !musb->is_active)
return -ENODEV;
spin_lock_irqsave(&musb->lock, flags);
ret = usb_hcd_link_urb_to_ep(hcd, urb);
spin_unlock_irqrestore(&musb->lock, flags);
if (ret)
return ret;
......
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