Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248815
b: refs/heads/master
c: 76cd9cf
h: refs/heads/master
i:
  248813: 8d313d3
  248811: 825a4fa
  248807: 784e90e
  248799: 5805adf
v: v3
  • Loading branch information
Pavankumar Kondeti authored and Greg Kroah-Hartman committed May 3, 2011
1 parent f8afd34 commit 29f053a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 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: 4c5212b7688955075b166def5ce08b34beb87a9c
refs/heads/master: 76cd9cfb2e022d19bfc008a6e993e1e407034241
20 changes: 14 additions & 6 deletions trunk/drivers/usb/gadget/ci13xxx_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1843,6 +1843,7 @@ __releases(mEp->lock)
__acquires(mEp->lock)
{
struct ci13xxx_req *mReq, *mReqTemp;
struct ci13xxx_ep *mEpTemp = mEp;
int uninitialized_var(retval);

trace("%p", mEp);
Expand All @@ -1859,7 +1860,10 @@ __acquires(mEp->lock)
dbg_done(_usb_addr(mEp), mReq->ptr->token, retval);
if (mReq->req.complete != NULL) {
spin_unlock(mEp->lock);
mReq->req.complete(&mEp->ep, &mReq->req);
if ((mEp->type == USB_ENDPOINT_XFER_CONTROL) &&
mReq->req.length)
mEpTemp = &_udc->ep0in;
mReq->req.complete(&mEpTemp->ep, &mReq->req);
spin_lock(mEp->lock);
}
}
Expand Down Expand Up @@ -2248,11 +2252,15 @@ static int ep_queue(struct usb_ep *ep, struct usb_request *req,

spin_lock_irqsave(mEp->lock, flags);

if (mEp->type == USB_ENDPOINT_XFER_CONTROL &&
!list_empty(&mEp->qh.queue)) {
_ep_nuke(mEp);
retval = -EOVERFLOW;
warn("endpoint ctrl %X nuked", _usb_addr(mEp));
if (mEp->type == USB_ENDPOINT_XFER_CONTROL) {
if (req->length)
mEp = (_udc->ep0_dir == RX) ?
&_udc->ep0out : &_udc->ep0in;
if (!list_empty(&mEp->qh.queue)) {
_ep_nuke(mEp);
retval = -EOVERFLOW;
warn("endpoint ctrl %X nuked", _usb_addr(mEp));
}
}

/* first nuke then test link, e.g. previous status has not sent */
Expand Down

0 comments on commit 29f053a

Please sign in to comment.