usb: xhci-mtk: improve split scheduling by separate IN/OUT budget
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Wed, 30 Aug 2023 12:28:20 +0000 (20:28 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Oct 2023 14:32:18 +0000 (16:32 +0200)
commit5c954e030f55b40b0b538c66d1a49a91b727f4dc
tree55b6f190f079312bed31d5bd849afd000802d562
parentba6b83a910b6d8a9379bda55cbf06cb945473a96
usb: xhci-mtk: improve split scheduling by separate IN/OUT budget

Calculate the IN/OUT budget separately to improve the bandwidth schedule,
meanwhile should avoid Start-Split token overlap between IN and OUT
endpoints, and take into account the FS/LS bandwidth boundary in each
microframe and also in each FS frame.
Calculate the budget for SS of OUT eps and CS of IN eps, but not include
extra-cs, and always add at most extra-cs allowed.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/20230830122820.18859-2-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-mtk-sch.c
drivers/usb/host/xhci-mtk.h