Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 227034
b: refs/heads/master
c: d9bb9c1
h: refs/heads/master
v: v3
  • Loading branch information
Artem Leonenko authored and Greg Kroah-Hartman committed Dec 16, 2010
1 parent 9a5c009 commit 505e9e9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 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: 6549e8b7f34b456d5689b98c2c0cf38c98414e47
refs/heads/master: d9bb9c1820cb2a7aeb5e42a5470cf208002d9aa8
20 changes: 12 additions & 8 deletions trunk/drivers/usb/gadget/ci13xxx_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1794,18 +1794,20 @@ __acquires(mEp->lock)

dbg_done(_usb_addr(mEp), mReq->ptr->token, retval);

if (!list_empty(&mEp->qh[mEp->dir].queue)) {
struct ci13xxx_req* mReqEnq;

mReqEnq = list_entry(mEp->qh[mEp->dir].queue.next,
struct ci13xxx_req, queue);
_hardware_enqueue(mEp, mReqEnq);
}

if (!mReq->req.no_interrupt && mReq->req.complete != NULL) {
spin_unlock(mEp->lock);
mReq->req.complete(&mEp->ep, &mReq->req);
spin_lock(mEp->lock);
}

if (!list_empty(&mEp->qh[mEp->dir].queue)) {
mReq = list_entry(mEp->qh[mEp->dir].queue.next,
struct ci13xxx_req, queue);
_hardware_enqueue(mEp, mReq);
}

done:
return retval;
}
Expand Down Expand Up @@ -2170,8 +2172,10 @@ static int ep_queue(struct usb_ep *ep, struct usb_request *req,
mReq->req.actual = 0;
list_add_tail(&mReq->queue, &mEp->qh[mEp->dir].queue);

retval = _hardware_enqueue(mEp, mReq);
if (retval == -EALREADY || retval == -EBUSY) {
if (list_is_singular(&mEp->qh[mEp->dir].queue))
retval = _hardware_enqueue(mEp, mReq);

if (retval == -EALREADY) {
dbg_event(_usb_addr(mEp), "QUEUE", retval);
retval = 0;
}
Expand Down

0 comments on commit 505e9e9

Please sign in to comment.