]> git.itanic.dy.fi Git - linux-stable/commitdiff
usb: xhci-mtk: use @sch_tt to check whether need do TT schedule
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Mon, 8 Mar 2021 02:51:54 +0000 (10:51 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Sep 2022 09:04:01 +0000 (11:04 +0200)
[ Upstream commit 4a56adf4fafbc41ceffce0c3f385f59d4fc3c16a ]

It's clearer to use @sch_tt to check whether need do TT schedule,
no function is changed.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/324a76782ccaf857a8f01f67aee435e8ec7d0e28.1615170625.git.chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: 548011957d1d ("usb: xhci-mtk: relax TT periodic bandwidth allocation")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/host/xhci-mtk-sch.c

index 59ba25ca018d5db198f08dbfccd4c4e12d81433e..b1da3cb077c9d88c660d89994049058763fa1008 100644 (file)
@@ -548,7 +548,7 @@ static int check_sch_bw(struct usb_device *udev,
        min_num_budget = sch_ep->num_budget_microframes;
        esit_boundary = get_esit_boundary(sch_ep);
        for (offset = 0; offset < sch_ep->esit; offset++) {
-               if (is_fs_or_ls(udev->speed)) {
+               if (sch_ep->sch_tt) {
                        ret = check_sch_tt(udev, sch_ep, offset);
                        if (ret)
                                continue;
@@ -585,7 +585,7 @@ static int check_sch_bw(struct usb_device *udev,
        sch_ep->cs_count = min_cs_count;
        sch_ep->num_budget_microframes = min_num_budget;
 
-       if (is_fs_or_ls(udev->speed)) {
+       if (sch_ep->sch_tt) {
                /* all offset for tt is not ok*/
                if (!tt_offset_ok)
                        return -ERANGE;