/* Frees descriptor list memory associated with the QH. If QH is periodic and the last, frees FrameList memory and disables periodic scheduling.  */
void dwc2_hcd_qh_free_ddma(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh)
/* Frees descriptor list memory associated with the QH. If QH is periodic and the last, frees FrameList memory and disables periodic scheduling.  */
void dwc2_hcd_qh_free_ddma(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh)
{
	dwc2_desc_list_free(hsotg, qh);
	if (qh->channel)
		dwc2_release_channel_ddma(hsotg, qh);
	if ((qh->ep_type == USB_ENDPOINT_XFER_ISOC ||
	     qh->ep_type == USB_ENDPOINT_XFER_INT) &&
	    (hsotg->core_params->uframe_sched > 0 ||
	     !hsotg->periodic_channels) && hsotg->frame_list) {
		dwc2_per_sched_disable(hsotg);
		dwc2_frame_list_free(hsotg);
	}
}