summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-mtk-sch.c
diff options
context:
space:
mode:
authorChunfeng Yun <chunfeng.yun@mediatek.com>2018-09-20 19:13:32 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-28 15:04:45 +0200
commit87173acc0d8f0987bda8827da35fff67f52ad15d (patch)
tree27c00c138783732b71f49379996477d62dd9c493 /drivers/usb/host/xhci-mtk-sch.c
parent7aae9990de20445e31f463836f26fdd02571740b (diff)
downloadlinux-87173acc0d8f0987bda8827da35fff67f52ad15d.tar.bz2
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>
Diffstat (limited to 'drivers/usb/host/xhci-mtk-sch.c')
-rw-r--r--drivers/usb/host/xhci-mtk-sch.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-mtk-sch.c b/drivers/usb/host/xhci-mtk-sch.c
index 46fe0a200ca7..057f453e06c5 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)