Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp233916ybt; Tue, 16 Jun 2020 22:45:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3ve2xXXA37cc1mf+1fT16LrQSa4xWyQ09CG0tUQwcMVCWiCBMsifKeqeuB7Oe2YyQBJ5D X-Received: by 2002:a17:906:31d2:: with SMTP id f18mr5906151ejf.110.1592372724529; Tue, 16 Jun 2020 22:45:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592372724; cv=none; d=google.com; s=arc-20160816; b=Nw1dNNNO+TeopNnGjeE7+SU2blmwqgI16LeKS+ZsSqalUFfkiCtEtKMDoEiunjd0lV gH5z2kmzJ+UInfCbU6kc3NFpKMCXrZMlvH21O5HbGq27bgHE5tsYzxjKcxYlD+y4QxZ+ UlrwX7d7fRPuhcfSwppACM7q/FvB5TSawPPgvJWlvU2+hkfOwswB4NkQRIeNEYp50Ujr /yNCiN6FvaUOyfab4MkRJ5QlG7fA9JP9gUvFEKQB2Yd5VWrkY2yIdnTLdF0TpjXyTC5Q FmUVMWtxkz2WOEgk3kZWbrA2r62EqGS2cui6693uOmBE+dcaS+aSXzWLBcCSfMoVVnz9 uvGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rdDoFRdKNzLFxd2DJUrNxctB8vmIe5DS4Jzw+A+aOnM=; b=WLlnkpZW+dzSSB4gLFETKBuUzyIyw7JWc5kH1DBSNnzenMvwzRvAtJ30DR74O4zdZ4 nqPAOt8rB1xvVuaHeKLLtACo8hKt8325XPjW2uTLWyC9uTvC4ovi5BGxo1B+LJG51uUf 2YmRm7pPzd7VHOkVA1SuPL5m10izi9YlmMaTIT5qR6yFa742nCfKYwiEQZo+7TkJChjV luKczq/IfJc2Eikt/8KybdmeIMQlYAEytU2LjZmp0h7c5kMzFW3g1Yk/5DniBJbV1r4T eMEJM4Fo81hgxSq47aPgYblGGeRueOA9oWLpQgX2eYlLjcAANrnIz9nJsMkP4qHGcB4Q XNxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=bIYfQxQM; 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 qq18si12411243ejb.195.2020.06.16.22.45.02; Tue, 16 Jun 2020 22:45:24 -0700 (PDT) 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=bIYfQxQM; 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 S1726702AbgFQFnT (ORCPT + 99 others); Wed, 17 Jun 2020 01:43:19 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:1574 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725851AbgFQFnS (ORCPT ); Wed, 17 Jun 2020 01:43:18 -0400 X-UUID: 4d3606af9abb4eb3b71ff1d3b9ba594b-20200617 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=rdDoFRdKNzLFxd2DJUrNxctB8vmIe5DS4Jzw+A+aOnM=; b=bIYfQxQM3ixEWbj5ddGKb24ocTww1yEbDTKx/93ZPyi8XNFz2M6uH+9eRIrW6rDf0VbYOgfD5Y1BnL2k0VWGBSeg0QcT7JLHLhZxjWt1NpASrJ/eEmDrLjMo8FRJbFjPFx3Qab69Dl11ksLchHh5nmX6ZEFRj1y53VoKuxR63zM=; X-UUID: 4d3606af9abb4eb3b71ff1d3b9ba594b-20200617 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 854175745; Wed, 17 Jun 2020 13:43:14 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 17 Jun 2020 13:43:12 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 17 Jun 2020 13:43:12 +0800 From: Macpaul Lin To: Alan Stern , Chunfeng Yun , Greg Kroah-Hartman , Felipe Balbi , Matthias Brugger , =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= , Sergey Organov , Fabrice Gasnier , , , , CC: Mediatek WSD Upstream , Macpaul Lin , Macpaul Lin Subject: [PATCH v3] usb: gadget: u_serial: improve performance for large data Date: Wed, 17 Jun 2020 13:42:57 +0800 Message-ID: <1592372577-7986-1-git-send-email-macpaul.lin@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1592362007-7120-1-git-send-email-macpaul.lin@mediatek.com> References: <1592362007-7120-1-git-send-email-macpaul.lin@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tm93YWRheXMgc29tZSBlbWJlZGRlZCBzeXN0ZW1zIHVzZSBWQ09NIHRvIHR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