Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4851174 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: dwc3: gadget: Ring IPA GSI doorbell with next HWO TRB"

parents d77dcfa3 de845b8c
Loading
Loading
Loading
Loading
+8 −10
Original line number Diff line number Diff line
@@ -2735,17 +2735,15 @@ static void dwc3_gsi_ep_transfer_complete(struct dwc3 *dwc, struct dwc3_ep *dep)
	struct dwc3_trb *trb;
	dma_addr_t offset;

	trb = &dep->trb_pool[dep->trb_dequeue];
	while (trb->ctrl & DWC3_TRBCTL_LINK_TRB) {
	/*
	 * Doorbell needs to be rung with the next TRB that is going to be
	 * processed by hardware.
	 * So, if 'n'th TRB got completed then ring doorbell with (n+1) TRB.
	 */
	dwc3_ep_inc_trb(dep, &dep->trb_dequeue);
	trb = &dep->trb_pool[dep->trb_dequeue];
	}

	if (!(trb->ctrl & DWC3_TRB_CTRL_HWO)) {
	offset = dwc3_trb_dma_offset(dep, trb);
	usb_gsi_ep_op(ep, (void *)&offset, GSI_EP_OP_UPDATE_DB);
		dwc3_ep_inc_trb(dep, &dep->trb_dequeue);
	}
}

static void dwc3_endpoint_transfer_complete(struct dwc3 *dwc,