diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index 1aad4765e5a5..29ee451f243d 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -1050,8 +1050,12 @@ void dwc2_hc_halt(struct dwc2_hsotg *hsotg, struct dwc2_host_chan *chan, chan->halt_status = halt_status; hcchar = dwc2_readl(hsotg, HCCHAR(chan->hc_num)); - if (!(hcchar & HCCHAR_CHENA)) { + if (!(hcchar & HCCHAR_CHENA) || + (!chan->do_split && + (chan->ep_type == USB_ENDPOINT_XFER_ISOC || + chan->ep_type == USB_ENDPOINT_XFER_INT))){ /* + * HCCHARn.ChEna 0 means that: * The channel is either already halted or it hasn't * started yet. In DMA mode, the transfer may halt if * it finishes normally or a condition occurs that @@ -1061,7 +1065,16 @@ void dwc2_hc_halt(struct dwc2_hsotg *hsotg, struct dwc2_host_chan *chan, * to a channel, but not started yet when an URB is * dequeued. Don't want to halt a channel that hasn't * started yet. + * If channel is used for non-split periodic transfer + * according to DWC Programming Guide: + * '3.5 Halting a Channel': Channel disable must not + * be programmed for non-split periodic channels. At + * the end of the next uframe/frame (in the worst + * case), the core generates a channel halted and + * disables the channel automatically. */ + dev_info(hsotg->dev, "hcchar 0x%08x, ep_type %d\n", + hcchar, chan->ep_type); return; } }