diff options
author | Chunfeng Yun <chunfeng.yun@mediatek.com> | 2018-09-20 19:13:32 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-25 11:53:07 +0300 |
commit | 6bce2b94291a3ffa1e62196c518abf130428547d (patch) | |
tree | 2cf701d7d26bc32f4d151d22ac3cbdeda7c63611 /drivers | |
parent | c899deb493d351f95d00a81ae52287907e31d0eb (diff) | |
download | linux-6bce2b94291a3ffa1e62196c518abf130428547d.tar.xz |
usb: xhci-mtk: fix ISOC error when interval is zero
[ Upstream commit 87173acc0d8f0987bda8827da35fff67f52ad15d ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/host/xhci-mtk-sch.c | 4 |
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 73f763c4f5f5..144674913c78 100644 --- a/drivers/usb/host/xhci-mtk-sch.c +++ b/drivers/usb/host/xhci-mtk-sch.c @@ -122,7 +122,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) |