|
|
@@ -1068,7 +1068,7 @@ static void dwc3_prepare_one_trb_sg(struct dwc3_ep *dep,
|
|
|
struct dwc3 *dwc = dep->dwc;
|
|
|
struct dwc3_trb *trb;
|
|
|
|
|
|
- req->unaligned = true;
|
|
|
+ req->needs_extra_trb = true;
|
|
|
|
|
|
/* prepare normal TRB */
|
|
|
dwc3_prepare_one_trb(dep, req, true, i);
|
|
|
@@ -1112,7 +1112,7 @@ static void dwc3_prepare_one_trb_linear(struct dwc3_ep *dep,
|
|
|
struct dwc3 *dwc = dep->dwc;
|
|
|
struct dwc3_trb *trb;
|
|
|
|
|
|
- req->unaligned = true;
|
|
|
+ req->needs_extra_trb = true;
|
|
|
|
|
|
/* prepare normal TRB */
|
|
|
dwc3_prepare_one_trb(dep, req, true, 0);
|
|
|
@@ -1128,7 +1128,7 @@ static void dwc3_prepare_one_trb_linear(struct dwc3_ep *dep,
|
|
|
struct dwc3 *dwc = dep->dwc;
|
|
|
struct dwc3_trb *trb;
|
|
|
|
|
|
- req->zero = true;
|
|
|
+ req->needs_extra_trb = true;
|
|
|
|
|
|
/* prepare normal TRB */
|
|
|
dwc3_prepare_one_trb(dep, req, true, 0);
|
|
|
@@ -1410,7 +1410,7 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep,
|
|
|
dwc3_ep_inc_deq(dep);
|
|
|
}
|
|
|
|
|
|
- if (r->unaligned || r->zero) {
|
|
|
+ if (r->needs_extra_trb) {
|
|
|
trb = r->trb + r->num_pending_sgs + 1;
|
|
|
trb->ctrl &= ~DWC3_TRB_CTRL_HWO;
|
|
|
dwc3_ep_inc_deq(dep);
|
|
|
@@ -1421,7 +1421,7 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep,
|
|
|
trb->ctrl &= ~DWC3_TRB_CTRL_HWO;
|
|
|
dwc3_ep_inc_deq(dep);
|
|
|
|
|
|
- if (r->unaligned || r->zero) {
|
|
|
+ if (r->needs_extra_trb) {
|
|
|
trb = r->trb + 1;
|
|
|
trb->ctrl &= ~DWC3_TRB_CTRL_HWO;
|
|
|
dwc3_ep_inc_deq(dep);
|
|
|
@@ -2250,7 +2250,8 @@ static int dwc3_gadget_ep_reclaim_completed_trb(struct dwc3_ep *dep,
|
|
|
* with one TRB pending in the ring. We need to manually clear HWO bit
|
|
|
* from that TRB.
|
|
|
*/
|
|
|
- if ((req->zero || req->unaligned) && !(trb->ctrl & DWC3_TRB_CTRL_CHN)) {
|
|
|
+
|
|
|
+ if (req->needs_extra_trb && !(trb->ctrl & DWC3_TRB_CTRL_CHN)) {
|
|
|
trb->ctrl &= ~DWC3_TRB_CTRL_HWO;
|
|
|
return 1;
|
|
|
}
|
|
|
@@ -2327,11 +2328,10 @@ static int dwc3_gadget_ep_cleanup_completed_request(struct dwc3_ep *dep,
|
|
|
ret = dwc3_gadget_ep_reclaim_trb_linear(dep, req, event,
|
|
|
status);
|
|
|
|
|
|
- if (req->unaligned || req->zero) {
|
|
|
+ if (req->needs_extra_trb) {
|
|
|
ret = dwc3_gadget_ep_reclaim_trb_linear(dep, req, event,
|
|
|
status);
|
|
|
- req->unaligned = false;
|
|
|
- req->zero = false;
|
|
|
+ req->needs_extra_trb = false;
|
|
|
}
|
|
|
|
|
|
req->request.actual = req->request.length - req->remaining;
|