Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 289530
b: refs/heads/master
c: 3928707
h: refs/heads/master
v: v3
  • Loading branch information
Supriya Karanth authored and Felipe Balbi committed Feb 24, 2012
1 parent aa6951e commit 67ac31e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6c2abcdd4f8e21ce686a26697de0ce198a16eaed
refs/heads/master: 39287076e46d2c19aaceaa6f0a44168ae4d257ec
18 changes: 18 additions & 0 deletions trunk/drivers/usb/musb/musb_gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,15 @@ void musb_g_tx(struct musb *musb, u8 epnum)

if (request->actual == request->length) {
musb_g_giveback(musb_ep, request, 0);
/*
* In the giveback function the MUSB lock is
* released and acquired after sometime. During
* this time period the INDEX register could get
* changed by the gadget_queue function especially
* on SMP systems. Reselect the INDEX to be sure
* we are reading/modifying the right registers
*/
musb_ep_select(mbase, epnum);
req = musb_ep->desc ? next_request(musb_ep) : NULL;
if (!req) {
dev_dbg(musb->controller, "%s idle now\n",
Expand Down Expand Up @@ -983,6 +992,15 @@ void musb_g_rx(struct musb *musb, u8 epnum)
}
#endif
musb_g_giveback(musb_ep, request, 0);
/*
* In the giveback function the MUSB lock is
* released and acquired after sometime. During
* this time period the INDEX register could get
* changed by the gadget_queue function especially
* on SMP systems. Reselect the INDEX to be sure
* we are reading/modifying the right registers
*/
musb_ep_select(mbase, epnum);

req = next_request(musb_ep);
if (!req)
Expand Down

0 comments on commit 67ac31e

Please sign in to comment.