Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1858954pxb; Fri, 5 Mar 2021 01:06:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJzJmA3Aw+0a43UO2KYL60DXmvmRWDJ3kI/ymhi7Q3z/4NCI3VHdOxQfgc+aHMVyWWagJb8t X-Received: by 2002:a05:6402:278b:: with SMTP id b11mr8291213ede.380.1614935216646; Fri, 05 Mar 2021 01:06:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614935216; cv=none; d=google.com; s=arc-20160816; b=DnxH06jaJgEtpviavXndcBMPeR0SZxzYwiDRmzFGl/eVv14tlYC0N2Q971fFiJ0wOS N+dEaBGErxGwH1NrE/uLjXkwaohk4JWfMdQ1hGP75wa005MZWHRqqy9lcuWczfEW1poD Tg71YcN/xNuH9GRqaQvkRBAZqeTUo2PW2cI4xggL3tiWLoQrIO+rnNmlLME2jFlpD1WI OH1iuSNc1BRYJvprGDG7lAwwrYOpV/vcrSMonw9WnHoHw0uIGA8xU44kjzuvmE8gizTI FmhZaSHJJ3rUJdtMEBimUIShd/lpxB/R+4HUcd11MP3qpB4h9I2/9wzqk6yPTTmbuse6 gcoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=JZVXwv6EiydSjPwgRE2fAigRyrNPUYI9cU1+YXFntaw=; b=FqcLRvtDhiS7mfcSMC9t9fiCNv7ODdXzbKCEdkeeMWBUXjKLQMM07mjS/CIBHrA4uj VXJAVxs/lVfL9Ibcb6vItmCudm7dCEIk05Mt1Iu5HPRFxfuFoeEA11LtxGCOFetKyEC5 DQfE/8oVXvXGzCHXnqOf3nX3j67ExBWeGyipA1TCYLS6kOlUmlQRDcXsItosa2bXjupr mv9JrOBy+QRveGdn+/lfv7Mmz7JT9a/JQG8PfCmPjid2bGZPxg/EQlkAjBf5oLiVCWkd c48v9C2zheHVLYXYOraueV1PP5xqJUuCjSun55Cvwadg3BSMPYOJvdmTvjnDkYnfHRzF QD1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id zm17si1037843ejb.174.2021.03.05.01.06.34; Fri, 05 Mar 2021 01:06:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229843AbhCEJDi (ORCPT + 99 others); Fri, 5 Mar 2021 04:03:38 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:59053 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S229682AbhCEJDY (ORCPT ); Fri, 5 Mar 2021 04:03:24 -0500 X-UUID: 5d754a356e4549a0a55760007a865508-20210305 X-UUID: 5d754a356e4549a0a55760007a865508-20210305 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 201206420; Fri, 05 Mar 2021 17:03:19 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 5 Mar 2021 17:03:17 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 5 Mar 2021 17:03:17 +0800 From: Chunfeng Yun To: Mathias Nyman , Greg Kroah-Hartman , Ikjoon Jang CC: Chunfeng Yun , Matthias Brugger , , , , , Nicolas Boichat , Eddie Hung Subject: [PATCH 05/17] usb: xhci-mtk: use @sch_tt to check whether need do TT schedule Date: Fri, 5 Mar 2021 17:02:43 +0800 Message-ID: <1614934975-15188-5-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1614934975-15188-1-git-send-email-chunfeng.yun@mediatek.com> References: <1614934975-15188-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: C8CA46DBE9EC354CE8400F4C949113AA506A2C98DBF3A7B081DE440F7DA555E22000:8 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It's clearer to use @sch_tt to check whether need do TT schedule, no function is changed. Signed-off-by: Chunfeng Yun --- drivers/usb/host/xhci-mtk-sch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci-mtk-sch.c b/drivers/usb/host/xhci-mtk-sch.c index 817ef2815e67..9016188eee97 100644 --- a/drivers/usb/host/xhci-mtk-sch.c +++ b/drivers/usb/host/xhci-mtk-sch.c @@ -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; -- 2.18.0