Skip to content

Commit

Permalink
usb: xhci-mtk: fix ISOC error when interval is zero
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chunfeng Yun authored and Greg Kroah-Hartman committed Sep 28, 2018
1 parent 7aae999 commit 87173ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/usb/host/xhci-mtk-sch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 87173ac

Please sign in to comment.