1 From: Ajay Kumar Gupta <ajay.gupta@ti.com>
2 To: linux-omap@vger.kernel.org
3 Cc: linux-usb@vger.kernel.org, felipe.balbi@nokia.com,
4 stern@rowland.harvard.edu, Ajay Kumar Gupta <ajay.gupta@ti.com>
5 Subject: [PATCH v3] OMAP:MUSB: Corrects urb unlink function path
6 Date: Mon, 25 Aug 2008 10:52:16 +0530
8 Fixes kernel panic while ISO IN transfer is aborted.Replaced
9 usb_hcd_unlink_urb_from_ep() from musb_giveback() to __musb_giveback()
10 to make sure urb is unlinked before giveback when __musb_giveback() is
11 called from musb_urb_dequeue().
13 Acquired musb->lock() before usb_hcd_unlink_urb_from_ep() within in
16 Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
18 drivers/usb/musb/musb_host.c | 7 +++++--
19 1 files changed, 5 insertions(+), 2 deletions(-)
21 diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
22 index 08e421f..4279311 100644
23 --- a/drivers/usb/musb/musb_host.c
24 +++ b/drivers/usb/musb/musb_host.c
25 @@ -291,6 +291,7 @@ __acquires(musb->lock)
26 urb->actual_length, urb->transfer_buffer_length
29 + usb_hcd_unlink_urb_from_ep(musb_to_hcd(musb), urb);
30 spin_unlock(&musb->lock);
31 usb_hcd_giveback_urb(musb_to_hcd(musb), urb, status);
32 spin_lock(&musb->lock);
33 @@ -353,8 +354,6 @@ musb_giveback(struct musb_qh *qh, struct urb *urb, int status)
37 - usb_hcd_unlink_urb_from_ep(musb_to_hcd(musb), urb);
40 __musb_giveback(musb, urb, status);
42 @@ -1787,7 +1786,9 @@ static int musb_urb_enqueue(
44 qh = kzalloc(sizeof *qh, mem_flags);
46 + spin_lock_irqsave(&musb->lock, flags);
47 usb_hcd_unlink_urb_from_ep(hcd, urb);
48 + spin_unlock_irqrestore(&musb->lock, flags);
52 @@ -1899,7 +1900,9 @@ static int musb_urb_enqueue(
56 + spin_lock_irqsave(&musb->lock, flags);
57 usb_hcd_unlink_urb_from_ep(hcd, urb);
58 + spin_unlock_irqrestore(&musb->lock, flags);
66 To unsubscribe from this list: send the line "unsubscribe linux-omap" in
67 the body of a message to majordomo@vger.kernel.org
68 More majordomo info at http://vger.kernel.org/majordomo-info.html