/* @hsotg: The HCD state structure @qh: QH to remove from schedule  */
void dwc2_hcd_qh_unlink(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh)
/* @hsotg: The HCD state structure @qh: QH to remove from schedule  */
void dwc2_hcd_qh_unlink(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh)
{
	u32 intr_mask;
	dev_vdbg(hsotg->dev, "%s()\n", __func__);
	if (list_empty(&qh->qh_list_entry))
		return;
	if (dwc2_qh_is_non_per(qh)) {
		if (hsotg->non_periodic_qh_ptr == &qh->qh_list_entry)
			hsotg->non_periodic_qh_ptr =
					hsotg->non_periodic_qh_ptr->next;
		list_del_init(&qh->qh_list_entry);
		return;
	}
	dwc2_deschedule_periodic(hsotg, qh);
	hsotg->periodic_qh_count--;
	if (!hsotg->periodic_qh_count) {
		intr_mask = readl(hsotg->regs + GINTMSK);
		intr_mask &= ~GINTSTS_SOF;
		writel(intr_mask, hsotg->regs + GINTMSK);
	}
}