From: Chunfeng Yun Date: Thu, 20 Sep 2018 16:13:32 +0000 (+0300) Subject: usb: xhci-mtk: fix ISOC error when interval is zero X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=87173acc0d8f0987bda8827da35fff67f52ad15d;p=linux.git 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 Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/xhci-mtk-sch.c b/drivers/usb/host/xhci-mtk-sch.c index 46fe0a200ca7d..057f453e06c5c 100644 --- a/drivers/usb/host/xhci-mtk-sch.c +++ b/drivers/usb/host/xhci-mtk-sch.c @@ -126,7 +126,9 @@ static void setup_sch_info(struct usb_device *udev, } if (ep_type == ISOC_IN_EP || ep_type == ISOC_OUT_EP) { - if (esit_pkts <= sch_ep->esit) + if (sch_ep->esit == 1) + sch_ep->pkts = esit_pkts; + else if (esit_pkts <= sch_ep->esit) sch_ep->pkts = 1; else sch_ep->pkts = roundup_pow_of_two(esit_pkts)