From 4bbf5ebf1fdedd08d84c80a8ba011fd353d8fc5b Mon Sep 17 00:00:00 2001 From: Kevin Hilman Date: Wed, 20 Feb 2008 09:27:10 -0800 Subject: [PATCH] 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: Kevin Hilman Signed-off-by: Tony Lindgren --- drivers/usb/musb/musb_host.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index 2ad2ed95404..82e12655dc8 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -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; -- 2.41.0