Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4761836ioa; Wed, 27 Apr 2022 10:30:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2+dyRPPcqgIXi9nLflplzGVugoIEhrgddvdxK6bOjWK54Ve/nUR0/4CJegEDq9/O++Fmh X-Received: by 2002:a17:902:e80e:b0:15d:34d2:4e8c with SMTP id u14-20020a170902e80e00b0015d34d24e8cmr10495045plg.142.1651080629467; Wed, 27 Apr 2022 10:30:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651080629; cv=none; d=google.com; s=arc-20160816; b=F6UIZ06nTHFDQdNpHSephJS6OgpGl+CNAjhMYYJN3lNvhD4I6XvNlX91+q0y236yam sr1uhxmqJoH1qHfnWlTG6XblyBh2Shn6KZkywMJ80qA0ChI3t5aIB5ddTpSCfHOTy9Eq rUnKIeWe3H9gijHhhJ9JhFVLmDos12Rp2OOu5RCHVGwElDV96IVEEmyQMaqnJW8N/CbZ 9Ms1MVamQtAmsb1kfYk9Uws2CTpfShgJewA1CuyG9nhCUE8n0Tagg1vlFW6UdJ1h+pQT U+b3dJpOO8xwHEitluSijPF1SXextW9iDE02tAoch0gQDbFVyX/PniqXA0UXlvbpBVfj SL2Q== 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=kIkG1owri2/UiQ/Mf5UXTc76P7ZxIGFTFq3OK8sBZu4=; b=GVtwVi/NVFFH2OsvsF3HXFHuvF3qMnUFS2VorT1bZQRPR1JTyUrpSnR02TWYmrIExh FprVCYEocbN0c6dzdOz2Ka/ggroHSTiGlp/SDrDMYUFSzovGYaNdS1KGinL7uHHm5+Bs 10h6vRAX+3eEX/jydYWxmWGIt5XEOcBJpXpC8L4ZLsiD43kIKGTRtkyHOy1NDwTmjlBT LBZkUyyiUoXubvNuvFm7B3Iurd2m8wcd++2qTD8hLFJQkBrDgcd4BOo/hooRCDg/qNcE lsFL6kTpA13bUHyfP3zB41BqetL8dOT47Zx+9gJmjp6nX03Acghu5ofiC9PzYGVItaGX SVtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=AvMuJ9fS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id z30-20020a630a5e000000b003c147b8bb83si2042590pgk.800.2022.04.27.10.30.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 10:30:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=AvMuJ9fS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2716426D1; Wed, 27 Apr 2022 10:03:48 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243727AbiD0RGr (ORCPT + 99 others); Wed, 27 Apr 2022 13:06:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243653AbiD0RGp (ORCPT ); Wed, 27 Apr 2022 13:06:45 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CB13261F; Wed, 27 Apr 2022 10:03:34 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id j8so2071246pll.11; Wed, 27 Apr 2022 10:03:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kIkG1owri2/UiQ/Mf5UXTc76P7ZxIGFTFq3OK8sBZu4=; b=AvMuJ9fS5bJaug0ZRaCzA8F4guuIeDepi34YDnk3QFSk5o3cTRMNXRVPbY3k43sbF5 yy5zeV54cBZ6Ws3/LwMqi8uMVzbQrset1ZjuItQz6Eu1KmV0I/yCz4ecDUbhcm0QEAGQ O3crS9IRJzqEU8X1K6yNkrcimKeYULah3a96A/VuGpjaJXjXuKlK8I3xmJOCZnkPqFDt AMf4/BBvm0fobFaAtASF5Q8EqFzEWc4AEK+yF0abBN0REZ+Fj8LpEOMJybWvb80JDQSL mNzhuTzpgwA36FynG6RsYuyB1KJXNZLTvta8ZiReASWgnuN7AQc4z8TsphC41nVov7de wqJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kIkG1owri2/UiQ/Mf5UXTc76P7ZxIGFTFq3OK8sBZu4=; b=AXO69hLLsyM+cqRcVzDyeLtSaAQd/bL4bhnLYtnMRW+X76Jh0/a/qT++oK6wsj/H2u xTqmB691k9RDnRKDFPWlKWskz8W6kvb/JVP7z4/x9blo5boIALLDtMZqNjXiYz2fYU6B +AkRiWbtbWbOH4Ke6yzMbJNt6OyMQGKENyTbO2uzocYYTEAYsZ044Jo6Ktmzcnk2VbPF CEOELOsRaXjszxQ3MZvmvq15zPxX/3+4CuYNmbBRUNnsBinnPsYvJjKXka7VivZoLb45 W6vBiZAAV/Gd1iPuHhBn4DW2xdcyDDCHSKtZC8rVWaZW6ROxlSTDw3p8YTFHTLNZjF6S 4S+w== X-Gm-Message-State: AOAM532JyZ3IaT9uriBTCj982IixjYCd9GP9LCPV/N1ywkw/xM+zEpTU X3JC5CJG1vXftDZrTbqAtd/UBykuy2T1AOmiDzgiEXOXhwS8PA== X-Received: by 2002:a17:90a:730c:b0:1da:4630:518e with SMTP id m12-20020a17090a730c00b001da4630518emr3243604pjk.239.1651079013835; Wed, 27 Apr 2022 10:03:33 -0700 (PDT) MIME-Version: 1.0 References: <20220427163525.1129887-1-Frank.Li@nxp.com> In-Reply-To: From: Zhi Li Date: Wed, 27 Apr 2022 12:03:22 -0500 Message-ID: Subject: Re: [PATCH v8 1/1] usb: cdns3: allocate TX FIFO size according to composite EP number To: Greg KH Cc: Frank Li , Peter Chen , pawell@cadence.com, rogerq@kernel.org, a-govindraju@ti.com, linux-usb@vger.kernel.org, Jun Li , kernel list Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no 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 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. > > confused, > > greg k-h