Skip to content

Commit 5ce1a24

Browse files
Chunfeng Yungregkh
authored andcommitted
usb: xhci-mtk: fix the failure of bandwidth allocation
The wMaxPacketSize field of endpoint descriptor may be zero as default value in alternate interface, and they are not actually selected when start stream, so skip them when try to allocate bandwidth. Cc: stable <[email protected]> Fixes: 0cbd4b3 ("xhci: mediatek: support MTK xHCI host controller") Signed-off-by: Chunfeng Yun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ba47d84 commit 5ce1a24

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/usb/host/xhci-mtk-sch.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,10 @@ static bool need_bw_sch(struct usb_host_endpoint *ep,
557557
if (is_fs_or_ls(speed) && !has_tt)
558558
return false;
559559

560+
/* skip endpoint with zero maxpkt */
561+
if (usb_endpoint_maxp(&ep->desc) == 0)
562+
return false;
563+
560564
return true;
561565
}
562566

0 commit comments

Comments
 (0)