Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4290128pxu; Tue, 1 Dec 2020 00:55:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJwHXTeqXhwQfw/3ywLxZHAC4MssgZPrVbjkzYwD60SM/HdU/xrNW8uD4bwyQVYfSf92bIM/ X-Received: by 2002:aa7:c712:: with SMTP id i18mr1933032edq.357.1606812942135; Tue, 01 Dec 2020 00:55:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606812942; cv=none; d=google.com; s=arc-20160816; b=OopGOcDQxVXMtfjTvLn24BlLexuVOQo5Sh1NXQR7Pz+UPu8bEN4Znmqi7GCWi2G3RL 5sexJaMCBXGPNYUCPf5/arg12WT8XWdVPYR7xw1w8TNpRd80TMST3xWDPgMauQ43iSBE eKM7J175mvOhlaJJXJet+fBUHTvCKLbgkSkmp2V4lecIyT3Uaj/73fb+8HAqo5405qN5 +wtylmO9DaIEShGm1y7pmFsKKrgN/+vkkaB/xWClfKkTQFb/VrerGa1lWBQARJEjKFJg orkuwmz63sM4WieYcZPgN5UOYS6v2FSsjlyGS97Em72jx2S6dtXorMRTCOSwn+3Q/RhM IjaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=jwVJjrYf4EoWNF76bT56Jg1fGwktaIknwNyVbZNutqw=; b=NdA+6NeTaWR9bXS2929easFu/fkT3l9kjKb7TFA8QA2fqTiU4ZVAknLMGRqwCvDmAm bwLQsl11E9y0k/Vwv1cUU8XWqIwP1m30RgT44xUHl8FD8IY7NdNreCwaFsBzwYSOKyEo 0hDN4IXPmKfRnU46aFzAtgAKh/JXXKHMqDLr6QBQXNGUpwt4Ht5+3PyyQdJ5cP53C2Yv xAc3YRsVu6UtpiNbqotmgUIJ6VNLEACA4sT0rFmK4k1qierD687xD+mHyKUakrMv+jbX 2Ctl72B43dFdmCkJQBeGMirblLwQwUGkwJqKZrVAOujUJ/CbpetZstMwffq+uXmR/Z2a Xd1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HaiUwxLt; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hd41si586075ejc.168.2020.12.01.00.55.12; Tue, 01 Dec 2020 00:55:42 -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=@gmail.com header.s=20161025 header.b=HaiUwxLt; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728951AbgLAItL (ORCPT + 99 others); Tue, 1 Dec 2020 03:49:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727058AbgLAItL (ORCPT ); Tue, 1 Dec 2020 03:49:11 -0500 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9530CC0613CF; Tue, 1 Dec 2020 00:48:30 -0800 (PST) Received: by mail-lj1-x242.google.com with SMTP id t22so1631123ljk.0; Tue, 01 Dec 2020 00:48:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jwVJjrYf4EoWNF76bT56Jg1fGwktaIknwNyVbZNutqw=; b=HaiUwxLt5+T+f1NTruadDqbIVPhFVqULfYguIx1bQ97AjHJThL8pLuOihN/dPt4YMT 6sodWnZ2zOQtaYanlnp3CoNYB8F8kFSfiKO5ZiaNKslWdztFum4pKTBW34DlqubIXR/H /we/2VHRVjrEJ342lYx4yyC8E4DNZMXCYwUEyBVxT33X51UfFcoN1MbJECGF5RdVQ/Tk gqOAfAt2rgg0vYWiQ/btho/110knlP77x/Sf+tLUMkYCA16m2nhrmZHrP7NT/xG9TrdA UWtbbC0jbADNTLORGtd0qvlfiMiNX0LaWeC8T1dAuU27xc+nstKVO6wXT+Jn48UDO69p 6ilg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jwVJjrYf4EoWNF76bT56Jg1fGwktaIknwNyVbZNutqw=; b=X/EDk19MvP3JBq1HiWCGPFUUIt6W7UVjaLfUfSA609XNrDaMMDw/OydCUwXPgJwth/ 0KMe07HL1PmiWWcNGQcsF5W6fWYqPdFnXPYdjbKxGAh/cdeqEeXoBXVNM7/YsZCtjbdz diW/sIb+6YpglDn7IH4dcWneg7ZZZYn/FDH2ry/FEkT4sUOHw48/lY9AAX1pksdX3js1 hsbnliZH/VhfcsW+jadMAX+acVEEf/LHN3btzemnS7GmXR/oRc+X/ZovzofPSeBZlHSA YaWLGMtYG3VOxuIXZZutan2X+hXA2j7iDGYdBIOsOxrSxwwWNxYvDV37OdmFpCr+sWcT CNWA== X-Gm-Message-State: AOAM530PjuYprUGqg3g2UfN1rjhmlhfFCk9TyTikrAQX5tiS8s2l/PPP N9cdklCsgPMlC1RVvQv8B6n2YxKAS+n+/kFngQMdBcxfgs7Utg== X-Received: by 2002:a2e:a202:: with SMTP id h2mr849114ljm.346.1606812509148; Tue, 01 Dec 2020 00:48:29 -0800 (PST) MIME-Version: 1.0 References: <20201127140559.381351-1-gregkh@linuxfoundation.org> <20201127140559.381351-2-gregkh@linuxfoundation.org> In-Reply-To: <20201127140559.381351-2-gregkh@linuxfoundation.org> From: Peter Chen Date: Tue, 1 Dec 2020 16:48:17 +0800 Message-ID: Subject: Re: [PATCH v2 1/5] USB: gadget: f_rndis: fix bitrate for SuperSpeed and above To: Greg Kroah-Hartman Cc: balbi@kernel.org, peter.chen@nxp.com, willmcvicker@google.com, USB list , lkml , EJ Hsu , stable Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > From: Will McVicker > Reviewed-by: Peter Chen Peter > Align the SuperSpeed Plus bitrate for f_rndis to match f_ncm's ncm_bitrate > defined by commit 1650113888fe ("usb: gadget: f_ncm: add SuperSpeed descriptors > for CDC NCM"). > > Cc: Felipe Balbi > Cc: EJ Hsu > Cc: Peter Chen > Cc: stable > Signed-off-by: Will McVicker > Signed-off-by: Greg Kroah-Hartman > --- > drivers/usb/gadget/function/f_rndis.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/usb/gadget/function/f_rndis.c b/drivers/usb/gadget/function/f_rndis.c > index 9534c8ab62a8..0739b05a0ef7 100644 > --- a/drivers/usb/gadget/function/f_rndis.c > +++ b/drivers/usb/gadget/function/f_rndis.c > @@ -87,8 +87,10 @@ static inline struct f_rndis *func_to_rndis(struct usb_function *f) > /* peak (theoretical) bulk transfer rate in bits-per-second */ > static unsigned int bitrate(struct usb_gadget *g) > { > + if (gadget_is_superspeed(g) && g->speed >= USB_SPEED_SUPER_PLUS) > + return 4250000000U; > if (gadget_is_superspeed(g) && g->speed == USB_SPEED_SUPER) > - return 13 * 1024 * 8 * 1000 * 8; > + return 3750000000U; > else if (gadget_is_dualspeed(g) && g->speed == USB_SPEED_HIGH) > return 13 * 512 * 8 * 1000 * 8; > else > -- > 2.29.2 >