Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2544756pxb; Mon, 18 Jan 2021 23:00:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJxqoDaUNcRX/i9zpoiLNVeWFpThPF4yVTF9rkukd8kAHTDwPryWrQPjRiSRDmXRH30dXL4r X-Received: by 2002:a17:906:90c3:: with SMTP id v3mr2074265ejw.461.1611039651674; Mon, 18 Jan 2021 23:00:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611039651; cv=none; d=google.com; s=arc-20160816; b=lSgdeZkFuffpaudJRFs/JR7Qfa3x/mD8N8QK5KOhes6xLIpmNlsL2HpZdOYntGR3eE 5Ynj+/MQTFNDCVRvSMq+q8B2Xa6kaX+XzMl55TItGeoCJMV97eAob9Ieepi/FUsS7Erc PvNqPGYgEbTkO99LnPznGslt2LOHu9yMD11AKIK4ASMjrwmsSMpAjvLt27xXJ38DAHjA 8WHZ4IJzomH+PE42p6ibj3BQT3npqJBKCmShs82gmTdsah3Gkxr8bStY/YWUvKrtoxzF f0ELRhdYrniVdl67/TYRe3x6U+DtYxoFmpvwDjjYL9IIEiKCojhw4mV7L2dGlf6iCK1P P1Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=6V5zD/iXHA0wDTMuAHf0jHgOG6fsknw3TmnvLpL2RoM=; b=acHc6i+aVyfEI8FS0G6MXpWfOl/Xern3s7cAib9yAAaoXdApGSl4obfKOI15ATjB1c 9WKSyBpk84H9GlehjLPLlh2Ui0vZtMuft2kLyNyDWq6rqHaxsLmFkbgYxrFlkQhsAo+q X9lA76YgI/yHsCmJzmWzJZrNPJzohx8B0V34WvqvX1+iP6SHOkiVCTn9D/PbxRNpMU+I Z1CRHmznHnc7fLgsHnuH7MtqLgO5uj1/Pwdo9NsNv11NJIjo1e372Dc4pghMcPeNdned 2ev73HTx3TZalPhUgooJ2c6abwlh29F1xBxjFOmsTwUDvS1KZbxDMFZ/6YvalycdsRGc RKuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=Y7Gu0PfW; 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=pass (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 z1si7657838eji.695.2021.01.18.23.00.27; Mon, 18 Jan 2021 23:00:51 -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; dkim=pass header.i=@mediatek.com header.s=dk header.b=Y7Gu0PfW; 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=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727329AbhASG7f (ORCPT + 99 others); Tue, 19 Jan 2021 01:59:35 -0500 Received: from Mailgw01.mediatek.com ([1.203.163.78]:10994 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729933AbhASG6F (ORCPT ); Tue, 19 Jan 2021 01:58:05 -0500 X-UUID: 04314350465449a08a2f308ccde18276-20210119 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=6V5zD/iXHA0wDTMuAHf0jHgOG6fsknw3TmnvLpL2RoM=; b=Y7Gu0PfWeFqEUIrgeLvQNNslCffta/OHQMQifHC7q4cLgkSV/sZyvboGkcB5NRQnZR/MrIbkhr2RSW8WB817I6N3FdGrN6PEwKMY/nPNJ4MrDawdq1ShNL9TJy3xM7oI/3BjuEkv3p8EvBkVPRnojh/j53jUTYXPEqvD2DpDlCo=; X-UUID: 04314350465449a08a2f308ccde18276-20210119 Received: from mtkcas32.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1859219330; Tue, 19 Jan 2021 14:57:07 +0800 Received: from MTKCAS32.mediatek.inc (172.27.4.184) by MTKMBS31N1.mediatek.inc (172.27.4.69) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 19 Jan 2021 14:57:05 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS32.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 19 Jan 2021 14:57:04 +0800 Message-ID: <1611039425.12761.2.camel@mhfsdcap03> Subject: Re: [RFC PATCH v3 1/5] usb: xhci-mtk: improve bandwidth scheduling with multi-TT From: Chunfeng Yun To: Ikjoon Jang CC: Yaqii Wu , Zhanyong Wang , Zhanyong Wang , , open list , Tianping Fang , "moderated list:ARM/Mediatek SoC support" Date: Tue, 19 Jan 2021 14:57:05 +0800 In-Reply-To: References: <1608629682-8535-1-git-send-email-chunfeng.yun@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: F9F112484B25E67B7DA334E6D5373F16DB43BB880BF7764171F09A6E318CC0E52000:8 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gV2VkLCAyMDIxLTAxLTEzIGF0IDE3OjQzICswODAwLCBJa2pvb24gSmFuZyB3cm90ZToNCj4g T24gVHVlLCBEZWMgMjIsIDIwMjAgYXQgNTozNSB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zIgc3RhcnRfY3MsIGxhc3RfY3M7DQo+ID4gLSAgICAgICBpbnQgaTsNCj4g PiArICAgICAgIHUzMiBudW1fZXNpdCwgYmFzZTsNCj4gPiArICAgICAgIGludCBpLCBqOw0KPiA+ ICsgICAgICAgdTMyIHRtcDsNCj4gPg0KPiA+ICAgICAgICAgc3RhcnRfc3MgPSBvZmZzZXQgJSA4 Ow0KPiA+ICAgICAgICAgZnNfYnVkZ2V0X3N0YXJ0ID0gKHN0YXJ0X3NzICsgMSkgJSA4Ow0KPiA+ IEBAIC0zOTgsMTAgKzQwMCwxMyBAQCBzdGF0aWMgaW50IGNoZWNrX3NjaF90dChzdHJ1Y3QgdXNi X2RldmljZSAqdWRldiwNCj4gPiAgICAgICAgICAgICAgICAgaWYgKCEoc3RhcnRfc3MgPT0gNyB8 fCBsYXN0X3NzIDwgNikpDQo+ID4gICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FUkFO R0U7DQo+ID4NCj4gPiAtICAgICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IHNjaF9lcC0+Y3Nf Y291bnQ7IGkrKykNCj4gPiAtICAgICAgICAgICAgICAgICAgICAgICBpZiAodGVzdF9iaXQob2Zm c2V0ICsgaSwgdHQtPnNwbGl0X2JpdF9tYXApKQ0KPiA+ICsgICAgICAgICAgICAgICBmb3IgKGkg PSAwOyBpIDwgc2NoX2VwLT5jc19jb3VudDsgaSsrKSB7DQo+ID4gKyAgICAgICAgICAgICAgICAg ICAgICAgaWYgKHRlc3RfYml0KG9mZnNldCArIGksIHR0LT5zc19iaXRfbWFwKSkNCj4gPiAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtRVJBTkdFOw0KPiA+DQo+ID4gKyAg ICAgICAgICAgICAgICAgICAgICAgaWYgKHRlc3RfYml0KG9mZnNldCArIGksIHR0LT5jc19iaXRf bWFwKSkNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtRVJB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ICBzZXRfYml0KGJhc2UgKyBqLCB0dC0+c3BsaXRfYml0X21hcCk7DQo+ID4gKyAgICAgICAg ICAgICAgICAgICAgICAgZWxzZQ0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg Y2xlYXJfYml0KGJhc2UgKyBqLCB0dC0+c3BsaXRfYml0X21hcCk7DQo+ID4gKyAgICAgICAgICAg ICAgIH0NCj4gPiArDQo+ID4gKyAgICAgICAgICAgICAgIGlmIChzY2hfZXAtPmVwX3R5cGUgPT0g SVNPQ19PVVRfRVApIHsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGogPSAwOyBq IDwgc2NoX2VwLT5udW1fYnVkZ2V0X21pY3JvZnJhbWVzOyBqKyspIHsNCj4gPiArICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGlmICh1c2VkKSB7DQo+ID4gKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIHNldF9iaXQoYmFzZSArIGosIHR0LT5zc19iaXRfbWFwKTsN Cj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0X2JpdChiYXNl ICsgaiwgdHQtPmNzX2JpdF9tYXApOw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICB0dC0+ZnNfYnVzX2J3W2Jhc2UgKyBqXSArPQ0KPiA+ICsgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjaF9lcC0+YndfY29zdF9wZXJfbWlj cm9mcmFtZTsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7DQo+ ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyX2JpdChiYXNl ICsgaiwgdHQtPnNzX2JpdF9tYXApOw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBjbGVhcl9iaXQoYmFzZSArIGosIHR0LT5jc19iaXRfbWFwKTsNCj4gPiArICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHQtPmZzX2J1c19id1tiYXNlICsg al0gLT0NCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBzY2hfZXAtPmJ3X2Nvc3RfcGVyX21pY3JvZnJhbWU7DQo+ID4gKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICB9DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgfQ0KPiA+ICsgICAg ICAgICAgICAgICB9IGVsc2Ugew0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgIGlmICh1c2Vk KQ0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0X2JpdChiYXNlLCB0dC0+ c3NfYml0X21hcCk7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgZWxzZQ0KPiA+ICsgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJfYml0KGJhc2UsIHR0LT5zc19iaXRfbWFw KTsNCj4gPiArDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgZm9yIChqID0gMDsgaiA8IHNj aF9lcC0+Y3NfY291bnQ7IGorKykgew0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgaWYgKHVzZWQpIHsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgc2V0X2JpdChiYXNlICsgMiArIGosIHR0LT5jc19iaXRfbWFwKTsNCj4gPiArDQo+ID4gKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR0LT5mc19idXNfYndbYmFzZSAr IDIgKyBqXSArPQ0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIHNjaF9lcC0+YndfY29zdF9wZXJfbWljcm9mcmFtZTsNCj4gPiArICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGNsZWFyX2JpdChiYXNlICsgMiArIGosIHR0LT5jc19iaXRfbWFwKTsN Cj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHQtPmZzX2J1c19i d1tiYXNlICsgMiArIGpdIC09DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgc2NoX2VwLT5id19jb3N0X3Blcl9taWNyb2ZyYW1lOw0KPiA+ICsgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAg IH0NCj4gPiArICAgICAgICAgICAgICAgfQ0KPiA+ICAgICAgICAgfQ0KPiA+DQo+ID4gLSAgICAg ICBsaXN0X2FkZF90YWlsKCZzY2hfZXAtPnR0X2VuZHBvaW50LCAmdHQtPmVwX2xpc3QpOw0KPiA+ ICsgICAgICAgaWYgKHVzZWQpDQo+ID4gKyAgICAgICAgICAgICAgIGxpc3RfYWRkX3RhaWwoJnNj aF9lcC0+dHRfZW5kcG9pbnQsICZ0dC0+ZXBfbGlzdCk7DQo+ID4gKyAgICAgICBlbHNlDQo+ID4g KyAgICAgICAgICAgICAgIGxpc3RfZGVsKCZzY2hfZXAtPnR0X2VuZHBvaW50KTsNCj4gPiAgfQ0K PiA+DQo+ID4gIHN0YXRpYyBpbnQgY2hlY2tfc2NoX2J3KHN0cnVjdCB1c2JfZGV2aWNlICp1ZGV2 LA0KPiA+IEBAIC00NzAsNiArNTI5LDcgQEAgc3RhdGljIGludCBjaGVja19zY2hfYncoc3RydWN0 IHVzYl9kZXZpY2UgKnVkZXYsDQo+ID4gIHsNCj4gPiAgICAgICAgIHUzMiBvZmZzZXQ7DQo+ID4g ICAgICAgICB1MzIgZXNpdDsNCj4gPiArICAgICAgIHUzMiBib3VuZGFyeTsNCj4gPiAgICAgICAg IHUzMiBtaW5fYnc7DQo+ID4gICAgICAgICB1MzIgbWluX2luZGV4Ow0KPiA+ICAgICAgICAgdTMy IHdvcnN0X2J3Ow0KPiA+IEBAIC00ODcsMTAgKzU0NywxMyBAQCBzdGF0aWMgaW50IGNoZWNrX3Nj aF9idyhzdHJ1Y3QgdXNiX2RldmljZSAqdWRldiwNCj4gPiAgICAgICAgICAqLw0KPiA+ICAgICAg ICAgbWluX2J3ID0gfjA7DQo+ID4gICAgICAgICBtaW5faW5kZXggPSAwOw0KPiA+ICsgICAgICAg Ym91bmRhcnkgPSBlc2l0Ow0KPiA+ICAgICAgICAgbWluX2NzX2NvdW50ID0gc2NoX2VwLT5jc19j b3VudDsNCj4gPiAgICAgICAgIG1pbl9udW1fYnVkZ2V0ID0gc2NoX2VwLT5udW1fYnVkZ2V0X21p Y3JvZnJhbWVzOw0KPiA+ICAgICAgICAgZm9yIChvZmZzZXQgPSAwOyBvZmZzZXQgPCBlc2l0OyBv ZmZzZXQrKykgew0KPiA+ICAgICAgICAgICAgICAgICBpZiAoaXNfZnNfb3JfbHModWRldi0+c3Bl ZWQpKSB7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNjaF9lcC0+ZXBfdHlwZSAh PSBJU09DX09VVF9FUCkNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvdW5k YXJ5ID0gZXNpdCArIDE7DQo+ID4gICAgICAgICAgICAgICAgICAgICAgICAgcmV0ID0gY2hlY2tf c2NoX3R0KHVkZXYsIHNjaF9lcCwgb2Zmc2V0KTsNCj4gPiAgICAgICAgICAgICAgICAgICAgICAg ICBpZiAocmV0KQ0KPiA+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7 DQo+ID4gQEAgLTQ5OCw3ICs1NjEsNyBAQCBzdGF0aWMgaW50IGNoZWNrX3NjaF9idyhzdHJ1Y3Qg dXNiX2RldmljZSAqdWRldiwNCj4gPiAgICAgICAgICAg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c2NoX2J3LT5id19lcF9saXN0LCBlbmRwb2ludCkgew0KPiA+ICAgICAgICAgICAgICAgICBpZiAo c2NoX2VwLT5lcCA9PSBlcCkgew0KPiA+IC0gICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZV9i dXNfYncoc2NoX2J3LCBzY2hfZXAsIDApOw0KPiA+IC0gICAgICAgICAgICAgICAgICAgICAgIGxp c3RfZGVsKCZzY2hfZXAtPmVuZHBvaW50KTsNCj4gPiAgICAgICAgICAgICAgICAgICAgICAgICBp ZiAoaXNfZnNfb3JfbHModWRldi0+c3BlZWQpKSB7DQo+ID4gLSAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBsaXN0X2RlbCgmc2NoX2VwLT50dF9lbmRwb2ludCk7DQo+ID4gKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVfc2NoX3R0KHVkZXYsIHNjaF9lcCwgMCk7DQo+ ID4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkcm9wX3R0KHVkZXYpOw0KPiA+ICAg ICAgICAgICAgICAgICAgICAgICAgIH0NCj4gPiArICAgICAgICAgICAgICAgICAgICAgICB1cGRh dGVfYnVzX2J3KHNjaF9idywgc2NoX2VwLCAwKTsNCj4gPiArICAgICAgICAgICAgICAgICAgICAg ICBsaXN0X2RlbCgmc2NoX2VwLT5lbmRwb2ludCk7DQo+ID4gICAgICAgICAgICAgICAgICAgICAg ICAga2ZyZWUoc2NoX2VwKTsNCj4gPiAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsNCj4g PiAgICAgICAgICAgICAgICAgfQ0KPiA+IGRpZmYgLS1naXQgYS9kcml2ZXJzL3VzYi9ob3N0L3ho Y2ktbXRrLmggYi9kcml2ZXJzL3VzYi9ob3N0L3hoY2ktbXRrLmgNCj4gPiBpbmRleCBhOTNjZmU4 MTc5MDQuLjMyM2IyODE5MzNiOSAxMDA2NDQNCj4gPiAtLS0gYS9kcml2ZXJzL3VzYi9ob3N0L3ho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