Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp156198ybt; Tue, 16 Jun 2020 19:49:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxivbGhyQxgB67kbpINFT3eGQXFetK7njqb0ZUzAgp988qcKR6EKShr+sJG4iFOvPDw7vWl X-Received: by 2002:aa7:c910:: with SMTP id b16mr5578776edt.0.1592362142899; Tue, 16 Jun 2020 19:49:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592362142; cv=none; d=google.com; s=arc-20160816; b=l61/l4bl+oI+fNJvQbcScZX+LnOB3Eyhvrbed4QukWJZ4apGriwd7qYUAU83nt8ucj K8zEjCNJOjQi5Eg9CiLUEw6SY2+zhCKgcW/MYNuWvpp/baCuWTmfbcRCN3DeVgYrDGRP oBgvCdO41DHy80gMUfCcE6Z0fcEKwBqK+DXwijETySWASR9zPUpK6UqQGOFTgmbJznJo OCK8WshrQzh6A2JElJwYF2hzPy+OgHbaOTwqoQ4Ux0WoI8YGpe+uygBM5EG0XMcMGnAp FWtYXTzZmbVBLRmLI6qvCKnUsViyC/oGWvg/h6WoFGqEKYf5mscphPraan7f+kV4csnF KPCw== 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=ZB3PDgfcBojaJ/fPpU6l0md70bnLTvLTU3jl+XWvIfE=; b=03KcZVpjPKkRHzasx7iQhT7BrRzqKzChYeuPm5G85ugkqf+osFXRsV8p6GepsdL1rd Q/zfhgeVdEydpR3nzbObg2BFWBFVOsajQAz8eiCB/VObXDozQRB+911hlqMvqhUfmrrK OElhHK274+AIGn1Smy/DXKp+og/TSlIAnVFPpdIip46LNltBXBzP0qUakWtrlQAoczr6 XVo+yX0m3Mar2FCxay20Kv+hPWvCg2/dN7xlfaRFXuija2FqhfdzJVXPeD/7ZUL3T/8F WPKgXaOH3a++eeO/ELvrALW/RDoMj19umptdBETSQFPWvhhAxcVuqB6oQB8Hrdckwmz7 qarw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=UQNlZQuY; 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 u15si12010380edq.598.2020.06.16.19.48.40; Tue, 16 Jun 2020 19:49:02 -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=UQNlZQuY; 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 S1726620AbgFQCrB (ORCPT + 99 others); Tue, 16 Jun 2020 22:47:01 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:18229 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726275AbgFQCrB (ORCPT ); Tue, 16 Jun 2020 22:47:01 -0400 X-UUID: 29cb5b068b674c549fb17cb674c4c795-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=ZB3PDgfcBojaJ/fPpU6l0md70bnLTvLTU3jl+XWvIfE=; b=UQNlZQuY0/jpjIyCUaZKGd/4VnP5RTrlQYm4MJYqT6cBPb4hKiOKDz0U1f0kjvNOmwd331xjUs47K8ji18ypFCErWOq5PEmc5xWaGbptHlwbAPqsZsKtKVJXW69RULvBnlcW8Tq0de6144qXGe/K9IJV8zaz1JVe1VU8B6ydnKU=; X-UUID: 29cb5b068b674c549fb17cb674c4c795-20200617 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 464138752; Wed, 17 Jun 2020 10:46:56 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 17 Jun 2020 10:46:50 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 17 Jun 2020 10:46:52 +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 v2] usb: gadget: u_serial: improve performance for large data Date: Wed, 17 Jun 2020 10:46:47 +0800 Message-ID: <1592362007-7120-1-git-send-email-macpaul.lin@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1592310884-4307-1-git-send-email-macpaul.lin@mediatek.com> References: <1592310884-4307-1-git-send-email-macpaul.lin@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 341107C8CF0BF6B3E6614FF7FFDF49CB2287241339A1BF5421EE54432FA9522B2000:8 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 Tm93YWRheXMgc29tZSBlbWJlZGRlZCBzeXN0ZW1zIHVzZ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