Revert "usb: dwc2: hcd: do not disable non-split periodic channels"

This reverts commit debf378724.
The patch a82c7abdf8 ("usb: dwc2: hcd: Fix host channel halt flow")
can fix the issue.

Change-Id: I9a014c42cf942cab22480b5faab13c802e7fd47e
Signed-off-by: William Wu <william.wu@rock-chips.com>
This commit is contained in:
William Wu
2021-11-06 17:49:21 +08:00
parent 4ee1573943
commit 98a32a4b69

View File

@@ -1052,12 +1052,8 @@ 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) ||
(!chan->do_split &&
(chan->ep_type == USB_ENDPOINT_XFER_ISOC ||
chan->ep_type == USB_ENDPOINT_XFER_INT))){
if (!(hcchar & HCCHAR_CHENA)) {
/*
* 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
@@ -1067,16 +1063,7 @@ 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;
}
}