]> git.baikalelectronics.ru Git - kernel.git/commit
usb: xhci-mtk: relax TT periodic bandwidth allocation
authorIkjoon Jang <ikjn@chromium.org>
Thu, 5 Aug 2021 05:39:57 +0000 (13:39 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Sep 2022 09:04:01 +0000 (11:04 +0200)
commit41dcab845b88707e530415c67f8547cce42cc6ff
treee938b7f8ea5852a64d66e0261b4f77c371bb824d
parented43bd90cb8daf56e9396a9e5936a2f4dbad6e0b
usb: xhci-mtk: relax TT periodic bandwidth allocation

[ Upstream commit f31998fd0f1b25b9c14fecfb57d36fa54fc3bf04 ]

Currently xhci-mtk needs software-managed bandwidth allocation for
periodic endpoints, it allocates the microframe index for the first
start-split packet for each endpoint. As this index allocation logic
should avoid the conflicts with other full/low-speed periodic endpoints,
it uses the worst case byte budgets on high-speed bus bandwidth
For example, for an isochronos IN endpoint with 192 bytes budget,
it will consume the whole 4 u-frames(188 * 4) while the actual
full-speed bus budget should be just 192bytes.

This patch changes the low/full-speed bandwidth allocation logic
to use "approximate" best case budget for lower speed bandwidth
management. For the same endpoint from the above example, the
approximate best case budget is now reduced to (188 * 2) bytes.

Without this patch, many usb audio headsets with 3 interfaces
(audio input, audio output, and HID) cannot be configured
on xhci-mtk.

Signed-off-by: Ikjoon Jang <ikjn@chromium.org>
Link: https://lore.kernel.org/r/20210805133937.1.Ia8174b875bc926c12ce427a5a1415dea31cc35ae@changeid
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/host/xhci-mtk-sch.c