Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1111816rdh; Mon, 25 Sep 2023 03:48:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEWmT64AC3qOYkYBJPbSdZMej8vxpArA+yfXMO50TKAYNWeuAcq20JnjFMqmt4ESWsmOxVU X-Received: by 2002:a05:6870:a981:b0:1b7:4655:2ac9 with SMTP id ep1-20020a056870a98100b001b746552ac9mr8982112oab.6.1695638885054; Mon, 25 Sep 2023 03:48:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695638885; cv=none; d=google.com; s=arc-20160816; b=TolHoK2aWHjluy/rbQTe2G0NRL6Pkpn1HuLZzYTCk2oYE4JPCespcP0xtk16+My9eV 3wjXXjPu9IB55jmd+aEm3astE2ps8fNlO+ot0jqvEDP/QUvSHndTYC4HDkUNSrqoJU+f fmIXyu9R6v/jqSlXRLzQ5yZGErYaAE0BHSLewkQOcpceDF778BuqUyu3mRZdP+S4+x6p 25/7k4PPMSSyOQx937huxKsUFYWlx+YOVR7uQbBD/TsiX5o5YzBqUoOYA0fYtTV/JqBh sIVGyEJgVtbKNVndrDbAFUyhGtcw1mTC7AO1rSJT6j8qwaoA9Ko7AnwP5ErHaLNcfP1H tdtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=gTgYzCmClSrC0NT1OaMW2kpEZtu8VhZRt0PLLo2GDI0=; fh=HeQeI37vOd97cCIHFvG73Tq84TaKLV4OrGDCSKA4sNk=; b=GpMlr9SDUOQomF7aEj3p65nciOoqstKkLxcOa19hnFpDy8wHZL24UpHAzxkltkyx2Y 2EDH7787u2wGRmhQ/ogzzboUjcy4PCc6qcu7eTbdLMZCSwQMqt4y7vjfoPo6WUkqO0Tb 6bOMMspyGBynkSaivqTY/91Jp7fDYMdrSw/glI82bj+1+OGPaS0yYhPnAwP/y3x9sP3R 31TbSEvQdfTs5w5TRpFv+iMuB6KXaprIp3Hiwmh0ZtMP5fqext1Kb+v5R1WsPe/7MFcP b/MX+flhuBdtyOrz9ecpVuo0pwQo2HXdK4bJF6pTV8z93g8QrMuMH6jIgD08p6eygjrQ fHYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VwWnNloE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id l71-20020a63884a000000b0055c77028579si9377202pgd.747.2023.09.25.03.48.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 03:48:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VwWnNloE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 9B8218076D08; Mon, 25 Sep 2023 03:40:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231553AbjIYKkp (ORCPT + 99 others); Mon, 25 Sep 2023 06:40:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbjIYKko (ORCPT ); Mon, 25 Sep 2023 06:40:44 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C79B4B3 for ; Mon, 25 Sep 2023 03:40:37 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-99c1c66876aso744948566b.2 for ; Mon, 25 Sep 2023 03:40:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695638436; x=1696243236; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=gTgYzCmClSrC0NT1OaMW2kpEZtu8VhZRt0PLLo2GDI0=; b=VwWnNloEIjVk1okdeONFgoRIRPJ0Zfdc5VeuwrqCXWSQN/HPMpFlh4PQrHhNjXKXrd w2gjGQlUjGoiAchtvanmtaghZC1AvwKHxEtc6EPuUhMQYtvXdqXGtuNKM37D0XqNKZD2 cq4ET+L4aORptDY7gaZgeTqqDdkiPaJBs54rKNVdw8Kxm2bk+bCpP+ajSBNqgUkpJ73x DfOcW4MHoTO3lx6oWPP9J4d8pvhzTJzLKziZIW6/rwx6/zmkYv7INh6+owMH50b7IlfK g7+k4VbQ0f0QZS5Zydw+G3YvsLl94G+781QNhTeTzcu1aTtttjdT4t3mDinzPu96Ab6e 2wpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695638436; x=1696243236; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gTgYzCmClSrC0NT1OaMW2kpEZtu8VhZRt0PLLo2GDI0=; b=FNoNV2Yxm3lrCVkD8QT98hg/h8+QIYolkKB57Wzq5HNHRh+6zoqLIewsvZOu6phb3G xWcgATe78WDuR4FTXU0bouFC/8VxEwxqsHOFJw0cEk35u0rEfLkGGt3UF3cHU87Ixunx cu6v3NGkl17RFngoCvRpDvqK3R4v2qt2EtgUEO43iwpzYdEtjoG4uhDTfaLYVI6ddT3Y kExS1Wmc+MMzFn4OJWDwgBw/KI2ubEsWpU3J/7e+PcbBXQJQFtf4NdRpIXXZ1H6Zejth A9wir08B3A49tnCJX0EXtnrdTyRULAh62AT2PJnlB84w2T7wbhUz0M5H8dF07IifdMeQ DRJg== X-Gm-Message-State: AOJu0Yyla9UhOdh7PEVGBNcDz13NOkweIvp+vwXw4swaJbCkQJw+i/Cw h5j1YqkbMtgZt3GmcIsSNJfZig== X-Received: by 2002:a17:906:5350:b0:9ae:5aa5:ee6c with SMTP id j16-20020a170906535000b009ae5aa5ee6cmr4797281ejo.12.1695638436293; Mon, 25 Sep 2023 03:40:36 -0700 (PDT) Received: from [192.168.101.165] (178235177023.dynamic-4-waw-k-1-1-0.vectranet.pl. [178.235.177.23]) by smtp.gmail.com with ESMTPSA id i4-20020a170906850400b00992a8a54f32sm6096464ejx.139.2023.09.25.03.40.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Sep 2023 03:40:36 -0700 (PDT) Message-ID: <09058de7-e207-414b-ab4c-88f0cbde9c22@linaro.org> Date: Mon, 25 Sep 2023 12:40:34 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] PCI: qcom: Add interconnect bandwidth for PCIe Gen4 Content-Language: en-US To: Abel Vesa Cc: Manivannan Sadhasivam , lpieralisi@kernel.org, kw@linux.com, andersson@kernel.org, bhelgaas@google.com, linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230924160713.217086-1-manivannan.sadhasivam@linaro.org> <18635bed-b7e3-4acb-b176-cd9f87a35c7f@linaro.org> From: Konrad Dybcio Autocrypt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mW8v3gIDWyIcgYqb2v8QO2Mqx YMqL7UZxVLul4/JbllsQB8F/fNI8AfttmAQL9cwo6C8yDTXKdho920W4WUR9k8NT/OBqWSyk bGqMHex48FVZhexNPYOd58EY9/7mL5u0sJmo+jTeb4JBgIbFPJCFyng4HwbniWgQJZ1WqaUC nas9J77uICis2WH7N8Bs9jy0wQYezNzqS+FxoNXmDQg2jetX8en4bO2Di7Pmx0jXA4TOb9TM izWDgYvmBE8= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 25 Sep 2023 03:40:47 -0700 (PDT) On 25.09.2023 12:37, Abel Vesa wrote: > On 23-09-25 12:34:53, Konrad Dybcio wrote: >> On 25.09.2023 12:33, Abel Vesa wrote: >>> On 23-09-25 10:57:47, Konrad Dybcio wrote: >>>> On 24.09.2023 18:07, Manivannan Sadhasivam wrote: >>>>> PCIe Gen4 supports the interconnect bandwidth of 1969 MBps. So let's add >>>>> the bandwidth support in the driver. Otherwise, the default bandwidth of >>>>> 985 MBps will be used. >>>>> >>>>> Signed-off-by: Manivannan Sadhasivam >>>>> --- >>>>> drivers/pci/controller/dwc/pcie-qcom.c | 7 +++++-- >>>>> 1 file changed, 5 insertions(+), 2 deletions(-) >>>>> >>>>> diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c >>>>> index 297442c969b6..6853123f92c1 100644 >>>>> --- a/drivers/pci/controller/dwc/pcie-qcom.c >>>>> +++ b/drivers/pci/controller/dwc/pcie-qcom.c >>>>> @@ -1384,11 +1384,14 @@ static void qcom_pcie_icc_update(struct qcom_pcie *pcie) >>>>> case 2: >>>>> bw = MBps_to_icc(500); >>>>> break; >>>>> + case 3: >>>>> + bw = MBps_to_icc(985); >>>>> + break; >>>>> default: >>>>> WARN_ON_ONCE(1); >>>>> fallthrough; >>>>> - case 3: >>>>> - bw = MBps_to_icc(985); >>>>> + case 4: >>>>> + bw = MBps_to_icc(1969); >>>>> break; >>>> Are you adding case 4 under `default`? That looks.. bizzare.. >>> >>> That's intentional. You want it to use 1969MBps if there is a different >>> gen value. AFAIU. >> Gah right, then the commit message is wrong. > > Yep, should be: "Otherwise, the default bandwidth of 1969 MBps will be > used." > > But maybe we should not default to that. Maybe we should still default > to 985 MBps. Perhaps we shouldn't have a default at all.. E.g. if the gen5 bus may get clogged if we exceed gen4 limits Konrad