Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2655433iob; Fri, 6 May 2022 07:40:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpLmnEFAI4S9DaZqq8YCTsSqlbM30ncUXYTww+o8xuYgzTsmBMZRP7Va+ut3zdYcehk/HO X-Received: by 2002:a17:906:1ec3:b0:6cf:d118:59e2 with SMTP id m3-20020a1709061ec300b006cfd11859e2mr3290992ejj.767.1651848030665; Fri, 06 May 2022 07:40:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651848030; cv=none; d=google.com; s=arc-20160816; b=z3BJyoTK2hYRyiaOtxwOtR1iAc8G1mN6vFx7yPEKurWMDIE+ZEXNHJXzY2uPZKr0rK u2O+EKLLLURZ+hWIFfxshtHvwC6rn1Xef2cK42L+69oY0BwCGz00jIQmg94k2BgyvHB6 PqwlwrCy05eW6uBFwqXAYxkoYzKHLyAGb/iJK4IXBlAI+kvKWo/90VSTaPsCWTENIzO9 WHIQrEP85yU8azZcZTgmlySFo/G6tK2xgHZwloPLngftXfxgsQp1t3+S7Sox/YpgaClE N3BU7Gb9KIyDgw7SXKvGSfMVm7W4B51MGtZRDWiwTdLQyPboqjmw1sv+c6vPFo0IDEcV vRqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1I/6I64VGAOFXC6uO8lvI7Eqpb8bD+3YbW89zs2lA8Q=; b=hm8tBWAYZaC9WeXfkPJxOaftxLa7K2Gi+P5srXQmuzyMJyehQf/IyLi6+mhqzIZeKZ psCO75+OwG7nhguF99JnCNRFHI5Fh5zlJUeNxF9O1AO+aPvcJ/xOMLMWZR+iEK8bcwl6 1942tWsRfZMSHCDODlyeTXKW77b2NSGL3nBfAfPFAE+fkA4d75KJXWrxNq2p7q5h5RoN CPWgWSAH02ctSnWEL45f/XDBrGkF9KG1IgV817zvCUp7jhHBq4HPbJrCvmvL+gI8lLPi /dMe68vaXlN5kFMIHsm5Fq7+f5wU8A6f+F0i3NUaXfWMap5WJRzpppkoMtRplUbihoWe N8Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lrY7wwzV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h2-20020aa7cdc2000000b00427b80685b2si3906435edw.610.2022.05.06.07.40.04; Fri, 06 May 2022 07:40:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lrY7wwzV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386313AbiEEWgt (ORCPT + 99 others); Thu, 5 May 2022 18:36:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1386276AbiEEWgs (ORCPT ); Thu, 5 May 2022 18:36:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BCB045AE9; Thu, 5 May 2022 15:33:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1DBD461E05; Thu, 5 May 2022 22:33:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50A86C385AF; Thu, 5 May 2022 22:33:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651789986; bh=nI5TfZ+O5Xvzg7yEHblugPWPUU9wcy1OYsHpnvSqpXQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lrY7wwzVtmUQFp0Y9furkeCM71/j4gJg+eRrhodsRPPykVtpLWt3lS3pDBv2Z+/gW 9LSxXLuZ57P7gsEcrpJ4i6ZWxeaPk0I++GdQFQ5rDt3prQT14MTmbnrDaLIyATBb1Q JBKV0TqP8yPk7Y23LAYJ6YxLnTeGnAn7Bwuih6JY= Date: Thu, 5 May 2022 21:31:57 +0200 From: Greg KH To: Zhi Li Cc: Frank Li , Peter Chen , pawell@cadence.com, rogerq@kernel.org, a-govindraju@ti.com, linux-usb@vger.kernel.org, Jun Li , kernel list Subject: Re: [PATCH v8 1/1] usb: cdns3: allocate TX FIFO size according to composite EP number Message-ID: References: <20220427163525.1129887-1-Frank.Li@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00,DATE_IN_PAST_03_06, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 27, 2022 at 12:03:22PM -0500, Zhi Li wrote: > On Wed, Apr 27, 2022 at 11:57 AM Greg KH wrote: > > > > On Wed, Apr 27, 2022 at 11:35:25AM -0500, Frank Li wrote: > > > Some devices have USB compositions which may require multiple endpoints. > > > To get better performance, need bigger CDNS3_EP_BUF_SIZE. > > > > > > But bigger CDNS3_EP_BUF_SIZE may exceed total hardware FIFO size when > > > multiple endpoints. > > > > > > By introducing the check_config() callback, calculate CDNS3_EP_BUF_SIZE. > > > > > > Move CDNS3_EP_BUF_SIZE into cnds3_device: ep_buf_size > > > Combine CDNS3_EP_ISO_SS_BURST and CDNS3_EP_ISO_HS_MULT into > > > ecnds3_device:ep_iso_burst > > > > > > Using a simple algorithm to calculate ep_buf_size. > > > ep_buf_size = ep_iso_burst = (onchip_buffers - 2k) / (number of IN EP + > > > 1). > > > > > > Test at 8qxp: > > > > > > Gadget ep_buf_size > > > > > > RNDIS: 5 > > > RNDIS+ACM: 3 > > > Mass Storage + NCM + ACM 2 > > > > > > Previous CDNS3_EP_BUF_SIZE is 4, RNDIS + ACM will be failure because > > > exceed FIFO memory. > > > > > > Signed-off-by: Frank Li > > > --- > > > Change from v1 to v2: > > > Add safe check for mult, buffering and maxburst > > > > that's nice, but this is v8, not v2? > > Sorry, It should be v2. I made a mistake with the title. Ok, the next version needs to be 9 to keep everything from getting really confused. thanks, greg k-h