diff options
author | Chunfeng Yun <[email protected]> | 2020-07-10 13:57:52 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2020-07-21 14:05:49 +0200 |
commit | 5ce1a24dd98c00a57a8fa13660648abf7e08e3ef (patch) | |
tree | 028fff283ebb97ae320d6ac46a335efec398204d | |
parent | ba47d845d715a010f7b51f6f89bae32845e6acb7 (diff) |
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: 0cbd4b34cda9 ("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]>
-rw-r--r-- | drivers/usb/host/xhci-mtk-sch.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-mtk-sch.c b/drivers/usb/host/xhci-mtk-sch.c index fea555570ad4..45c54d56ecbd 100644 --- a/drivers/usb/host/xhci-mtk-sch.c +++ b/drivers/usb/host/xhci-mtk-sch.c @@ -557,6 +557,10 @@ static bool need_bw_sch(struct usb_host_endpoint *ep, if (is_fs_or_ls(speed) && !has_tt) return false; + /* skip endpoint with zero maxpkt */ + if (usb_endpoint_maxp(&ep->desc) == 0) + return false; + return true; } |