Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354605
b: refs/heads/master
c: cdc359d
h: refs/heads/master
i:
  354603: 530cd28
v: v3
  • Loading branch information
Pratyush Anand authored and Felipe Balbi committed Jan 18, 2013
1 parent 5784ce4 commit e993315
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 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: 15f86bde29f0fdfb877d9c753547fa2e2f5ef1fe
refs/heads/master: cdc359dd87ab6c39a67dab724fd0b61c16e6f08b
23 changes: 18 additions & 5 deletions trunk/drivers/usb/dwc3/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,10 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
* notion of current microframe.
*/
if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) {
dwc3_stop_active_transfer(dwc, dep->number);
if (list_empty(&dep->req_queued)) {
dwc3_stop_active_transfer(dwc, dep->number);
dep->flags = DWC3_EP_ENABLED;
}
return 0;
}

Expand Down Expand Up @@ -1727,10 +1730,20 @@ static int dwc3_cleanup_done_reqs(struct dwc3 *dwc, struct dwc3_ep *dep,
break;
} while (1);

if (list_empty(&dep->req_queued) &&
(dep->flags & DWC3_EP_MISSED_ISOC)) {
dwc3_stop_active_transfer(dwc, dep->number);
dep->flags &= ~DWC3_EP_MISSED_ISOC;
if (usb_endpoint_xfer_isoc(dep->endpoint.desc) &&
list_empty(&dep->req_queued)) {
if (list_empty(&dep->request_list)) {
/*
* If there is no entry in request list then do
* not issue END TRANSFER now. Just set PENDING
* flag, so that END TRANSFER is issued when an
* entry is added into request list.
*/
dep->flags = DWC3_EP_PENDING_REQUEST;
} else {
dwc3_stop_active_transfer(dwc, dep->number);
dep->flags = DWC3_EP_ENABLED;
}
return 1;
}

Expand Down

0 comments on commit e993315

Please sign in to comment.