/* Performs common cleanup for periodic transfers after a Transfer Complete interrupt. This function should be called after any endpoint type specific handling is finished to release the host channel.  */
static void dwc2_complete_periodic_xfer(struct dwc2_hsotg *hsotg, struct dwc2_host_chan *chan, int chnum, struct dwc2_qtd *qtd, enum dwc2_halt_status halt_status)
/* Performs common cleanup for periodic transfers after a Transfer Complete interrupt. This function should be called after any endpoint type specific handling is finished to release the host channel.  */
static void dwc2_complete_periodic_xfer(struct dwc2_hsotg *hsotg, struct dwc2_host_chan *chan, int chnum, struct dwc2_qtd *qtd, enum dwc2_halt_status halt_status)
{
	u32 hctsiz = readl(hsotg->regs + HCTSIZ(chnum));
	qtd->error_count = 0;
	if (!chan->ep_is_in || (hctsiz & TSIZ_PKTCNT_MASK) == 0)
		dwc2_release_channel(hsotg, chan, qtd, halt_status);
	else
		dwc2_halt_channel(hsotg, chan, qtd, halt_status);
}