Commit c9508c8c authored by Felipe Balbi's avatar Felipe Balbi

usb: dwc3: gadget: only interrupt on short if short_not_ok is set

We don't need to know about short packets unless
gadget driver told us it's not ok to see them on the
bus. In the normal situation we can continue
processing the list of requests if we get a Short
packet.

Also, note that we're making sure ISP is only set
for OUT endpoints, where that setting is valid.
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 58f29034
......@@ -875,12 +875,16 @@ static void dwc3_prepare_one_trb(struct dwc3_ep *dep,
}
/* always enable Continue on Short Packet */
if (usb_endpoint_dir_out(dep->endpoint.desc))
if (usb_endpoint_dir_out(dep->endpoint.desc)) {
trb->ctrl |= DWC3_TRB_CTRL_CSP;
if (req->request.short_not_ok)
trb->ctrl |= DWC3_TRB_CTRL_ISP_IMI;
}
if ((!req->request.no_interrupt && !chain) ||
(dwc3_calc_trbs_left(dep) == 0))
trb->ctrl |= DWC3_TRB_CTRL_IOC | DWC3_TRB_CTRL_ISP_IMI;
trb->ctrl |= DWC3_TRB_CTRL_IOC;
if (chain)
trb->ctrl |= DWC3_TRB_CTRL_CHN;
......
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