diff options
author | Chunfeng Yun <chunfeng.yun@mediatek.com> | 2021-05-07 10:11:27 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-05-10 16:21:49 +0200 |
commit | 4676be28a46e9b1aef9a1fd24ecc207ebc189c9a (patch) | |
tree | 85322798ab85284799e7f9a355fb973d0172bdbf /drivers/usb/host/xhci-mtk-sch.c | |
parent | bb8d7ef68e294ab5cc4be54c966245bf24cb843a (diff) |
usb: xhci-mtk: use first-fit for LS/FS
Use first-fit instead of best-fit for LS/FS devices under TT,
we found that best-fit will consume more bandwidth for some
cases.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/20210507021127.54717-4-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci-mtk-sch.c')
-rw-r--r-- | drivers/usb/host/xhci-mtk-sch.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-mtk-sch.c b/drivers/usb/host/xhci-mtk-sch.c index 9fb75085e40f..c07411d9b16f 100644 --- a/drivers/usb/host/xhci-mtk-sch.c +++ b/drivers/usb/host/xhci-mtk-sch.c @@ -634,6 +634,11 @@ static int check_sch_bw(struct mu3h_sch_bw_info *sch_bw, min_bw = worst_bw; min_index = offset; } + + /* use first-fit for LS/FS */ + if (sch_ep->sch_tt && min_index >= 0) + break; + if (min_bw == 0) break; } |