Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210964
b: refs/heads/master
c: a666e3e
h: refs/heads/master
v: v3
  • Loading branch information
Sergei Shtylyov authored and Greg Kroah-Hartman committed Sep 24, 2010
1 parent 8177b9d commit 4c5f06d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4c647338267e14c93892f6f125f17ea2419eea51
refs/heads/master: a666e3e6098a9f56310e4ec2705f1dad124a34b5
2 changes: 1 addition & 1 deletion trunk/drivers/usb/musb/musb_gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,7 @@ struct free_record {
/*
* Context: controller locked, IRQs blocked.
*/
static void musb_ep_restart(struct musb *musb, struct musb_request *req)
void musb_ep_restart(struct musb *musb, struct musb_request *req)
{
DBG(3, "<== %s request %p len %u on hw_ep%d\n",
req->tx ? "TX/IN" : "RX/OUT",
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/usb/musb/musb_gadget.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,6 @@ extern void musb_gadget_cleanup(struct musb *);

extern void musb_g_giveback(struct musb_ep *, struct usb_request *, int);

extern void musb_ep_restart(struct musb *, struct musb_request *);

#endif /* __MUSB_GADGET_H */
9 changes: 9 additions & 0 deletions trunk/drivers/usb/musb/musb_gadget_ep0.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ __acquires(musb->lock)
ctrlrequest->wIndex & 0x0f;
struct musb_ep *musb_ep;
struct musb_hw_ep *ep;
struct musb_request *request;
void __iomem *regs;
int is_in;
u16 csr;
Expand Down Expand Up @@ -302,6 +303,14 @@ __acquires(musb->lock)
musb_writew(regs, MUSB_RXCSR, csr);
}

/* Maybe start the first request in the queue */
request = to_musb_request(
next_request(musb_ep));
if (!musb_ep->busy && request) {
DBG(3, "restarting the request\n");
musb_ep_restart(musb, request);
}

/* select ep0 again */
musb_ep_select(mbase, 0);
} break;
Expand Down

0 comments on commit 4c5f06d

Please sign in to comment.