Skip to content

Commit ec9b262

Browse files
Chunfeng Yungregkh
authored andcommitted
usb: xhci-mtk: fix the failure of bandwidth allocation
commit 5ce1a24dd98c00a57a8fa13660648abf7e08e3ef upstream. 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 <stable@vger.kernel.org> Fixes: 0cbd4b3 ("xhci: mediatek: support MTK xHCI host controller") Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Link: https://lore.kernel.org/r/1594360672-2076-1-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent d5a5f0e commit ec9b262

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

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

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

287+
/* skip endpoint with zero maxpkt */
288+
if (usb_endpoint_maxp(&ep->desc) == 0)
289+
return false;
290+
287291
return true;
288292
}
289293

0 commit comments

Comments
 (0)