Commit d80fe1b6 authored by Felipe Balbi's avatar Felipe Balbi

usb: dwc3: gadget: simplify short packet event

We know that only OUT endpoints can trigger SHORT. We also know that
count MUST be > 0 whenever SHORT triggers.
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent b27972b5
...@@ -2221,7 +2221,6 @@ static int dwc3_gadget_ep_reclaim_completed_trb(struct dwc3_ep *dep, ...@@ -2221,7 +2221,6 @@ static int dwc3_gadget_ep_reclaim_completed_trb(struct dwc3_ep *dep,
const struct dwc3_event_depevt *event, int status, int chain) const struct dwc3_event_depevt *event, int status, int chain)
{ {
unsigned int count; unsigned int count;
unsigned int s_pkt = 0;
dwc3_ep_inc_deq(dep); dwc3_ep_inc_deq(dep);
...@@ -2256,12 +2255,7 @@ static int dwc3_gadget_ep_reclaim_completed_trb(struct dwc3_ep *dep, ...@@ -2256,12 +2255,7 @@ static int dwc3_gadget_ep_reclaim_completed_trb(struct dwc3_ep *dep,
if ((trb->ctrl & DWC3_TRB_CTRL_HWO) && status != -ESHUTDOWN) if ((trb->ctrl & DWC3_TRB_CTRL_HWO) && status != -ESHUTDOWN)
return 1; return 1;
if (!dep->direction) { if (event->status & DEPEVT_STATUS_SHORT && !chain)
if (count && (event->status & DEPEVT_STATUS_SHORT))
s_pkt = 1;
}
if (s_pkt && !chain)
return 1; return 1;
if ((event->status & DEPEVT_STATUS_IOC) && if ((event->status & DEPEVT_STATUS_IOC) &&
......
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