Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: xhci-mtk: fix ISOC error when interval is zero

If the interval equal zero, needn't round up to power of two
for the number of packets in each ESIT, so fix it.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Chunfeng Yun and committed by
Greg Kroah-Hartman
87173acc 7aae9990

+3 -1
+3 -1
drivers/usb/host/xhci-mtk-sch.c
··· 126 126 } 127 127 128 128 if (ep_type == ISOC_IN_EP || ep_type == ISOC_OUT_EP) { 129 - if (esit_pkts <= sch_ep->esit) 129 + if (sch_ep->esit == 1) 130 + sch_ep->pkts = esit_pkts; 131 + else if (esit_pkts <= sch_ep->esit) 130 132 sch_ep->pkts = 1; 131 133 else 132 134 sch_ep->pkts = roundup_pow_of_two(esit_pkts)