Commit 8b3b7b66 authored by Felipe Balbi's avatar Felipe Balbi

usb: dwc3: gadget: simplify unaligned and zlp handling

We can just call reclaim_trb_linear instead of reimplementing it.
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent cf35fc33
...@@ -2314,7 +2314,6 @@ static void dwc3_gadget_ep_cleanup_completed_requests(struct dwc3_ep *dep, ...@@ -2314,7 +2314,6 @@ static void dwc3_gadget_ep_cleanup_completed_requests(struct dwc3_ep *dep,
const struct dwc3_event_depevt *event, int status) const struct dwc3_event_depevt *event, int status)
{ {
struct dwc3_request *req, *n; struct dwc3_request *req, *n;
struct dwc3_trb *trb;
int ret = 0; int ret = 0;
list_for_each_entry_safe(req, n, &dep->started_list, list) { list_for_each_entry_safe(req, n, &dep->started_list, list) {
...@@ -2329,9 +2328,8 @@ static void dwc3_gadget_ep_cleanup_completed_requests(struct dwc3_ep *dep, ...@@ -2329,9 +2328,8 @@ static void dwc3_gadget_ep_cleanup_completed_requests(struct dwc3_ep *dep,
status); status);
if (req->unaligned || req->zero) { if (req->unaligned || req->zero) {
trb = &dep->trb_pool[dep->trb_dequeue]; ret = dwc3_gadget_ep_reclaim_trb_linear(dep, req, event,
ret = dwc3_gadget_ep_reclaim_completed_trb(dep, req, status);
trb, event, status, false);
req->unaligned = false; req->unaligned = false;
req->zero = false; req->zero = false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment