From: Bryan Wu <cooloney@kernel.org>
To: felipe.balbi@nokia.com, linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Bryan Wu <cooloney@kernel.org>
Subject: [PATCH 2/2] usb: musb: fix bug - should call usb_hcd_unlink_urb_from_ep before usb_hcd_giveback_urb
Date: Mon, 25 Aug 2008 17:13:41 +0800 [thread overview]
Message-ID: <1219655621-18510-3-git-send-email-cooloney@kernel.org> (raw)
In-Reply-To: <1219655621-18510-1-git-send-email-cooloney@kernel.org>
This bug was found on Blackfin BF54x and BF52x board since kernel 2.6.24 USB API change
http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=4265
__musb_giveback is called by not only musb_giveback but also musb_urb_dequeue.
musb_urb_dequeue also need call usb_hcd_unlink_urb_from_ep before usb_hcd_giveback_urb.
So move usb_hcd_unlink_urb_from_ep from musb_giveback to __musb_giveback to fix this bug.
Signed-off-by: Bryan Wu <cooloney@kernel.org>
---
drivers/usb/musb/musb_host.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index 8b4be01..ba98ac5 100644
--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -291,6 +291,8 @@ __acquires(musb->lock)
urb->actual_length, urb->transfer_buffer_length
);
+ usb_hcd_unlink_urb_from_ep(musb_to_hcd(musb), urb);
+
spin_unlock(&musb->lock);
usb_hcd_giveback_urb(musb_to_hcd(musb), urb, status);
spin_lock(&musb->lock);
@@ -353,8 +355,6 @@ musb_giveback(struct musb_qh *qh, struct urb *urb, int status)
break;
}
- usb_hcd_unlink_urb_from_ep(musb_to_hcd(musb), urb);
-
qh->is_ready = 0;
__musb_giveback(musb, urb, status);
qh->is_ready = ready;
--
1.5.6
next prev parent reply other threads:[~2008-08-25 9:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-25 9:13 [PATCH 0/2] usb: musb bug fixing patches Bryan Wu
2008-08-25 9:13 ` [PATCH 1/2] usb: musb: fix bug - don't mess up count number and CSR0 register value Bryan Wu
2008-08-25 11:49 ` Felipe Balbi
2008-08-25 14:28 ` Felipe Balbi
2008-08-25 14:33 ` Gadiyar, Anand
2008-08-25 9:13 ` Bryan Wu [this message]
2008-08-25 9:18 ` [PATCH 2/2] usb: musb: fix bug - should call usb_hcd_unlink_urb_from_ep before usb_hcd_giveback_urb Bryan Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1219655621-18510-3-git-send-email-cooloney@kernel.org \
--to=cooloney@kernel.org \
--cc=felipe.balbi@nokia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®