From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A289DC004D4 for ; Wed, 18 Jan 2023 09:07:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:To:Subject: CC:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IgtFIeatONrhTzoMLdpEIT/RPU85SoMOWTUdsJhZ9Vc=; b=unvwqaI5fPgYEA 3DHpGCbOmGZCtIV8pLPyiamzvotE/Y5uKN6Mmd27QTOBzs8YULin5EVuxIXY9+4hiaG9eBLvfXPQ2 LfNupxCrR859PiYHOfyqkdPoi1y9xLwqEUA24x6QoMgSV+AOip8JnnI2krTgRdPTc1SYKG7edJ8A0 Tb9uHEbnVvvumsGuVB7tNGIFngYxFHMJwXyTaj0A/38/2K65qfymISsgwzDiADASw8R+/3xDldMGr DoahqmPV4jS4sFpR/+qCkzuZC9NubhzNzpI6l2bwK6mO2o3o9orK/Ueqca567nW5ZP4j8Gf+fAIrT 3AeUhkMUZRQhSdTQghqA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pI4Ol-00017c-1g; Wed, 18 Jan 2023 09:06:23 +0000 Received: from lelv0143.ext.ti.com ([198.47.23.248]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pI4Oh-00015r-LV for linux-arm-kernel@lists.infradead.org; Wed, 18 Jan 2023 09:06:21 +0000 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 30I969TF104115; Wed, 18 Jan 2023 03:06:09 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1674032769; bh=/da+ssa5GDD6vweT7++x50Ek4g6HrX+yJTbxHpmjcwM=; h=Date:CC:Subject:To:References:From:In-Reply-To; b=VyNGN4/1efZ4VWOZP9XZ1ZoGXQAyENpXrPzInwoHAhnEOEfgizsU16ssgE562PMRp DRdaKZV1+uC3V60HC9/3mwet8bCBCpAsqqzpLNdjz041VRpbvZ+0nJ8aaXFTTPaMMW AkWwnDK2F2Zs2UjXTcVAAcBLeltrPztSxf8LEASw= Received: from DLEE101.ent.ti.com (dlee101.ent.ti.com [157.170.170.31]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 30I969HG007343 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 18 Jan 2023 03:06:09 -0600 Received: from DLEE111.ent.ti.com (157.170.170.22) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Wed, 18 Jan 2023 03:06:08 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Wed, 18 Jan 2023 03:06:08 -0600 Received: from [172.24.145.61] (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 30I963Jf062854; Wed, 18 Jan 2023 03:06:04 -0600 Message-ID: <998410e8-7856-2b15-4312-e8f6fe868587@ti.com> Date: Wed, 18 Jan 2023 14:36:03 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 CC: Tom Joseph , Lorenzo Pieralisi , Rob Herring , Krzysztof Wilczy_ski , Bjorn Helgaas , Vignesh Raghavendra , , , , , Milind Parab , Jian Wang , Subject: Re: [PATCH] PCI: cadence: Fix next function value in case of ARI Content-Language: en-US To: Achal Verma References: <20230118072035.3381993-1-a-verma1@ti.com> From: Siddharth Vadapalli In-Reply-To: <20230118072035.3381993-1-a-verma1@ti.com> X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230118_010619_877612_0F5B17DE X-CRM114-Status: GOOD ( 21.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello Achal, On 18/01/23 12:50, Achal Verma wrote: > From: Jasko-EXT Wojciech > > Next function field in ARI_CAP_AND_CTR field register for last > function should be zero but thats not the case, so this patch > programs the next function field for last function as zero. > > Signed-off-by: Jasko-EXT Wojciech > Signed-off-by: Achal Verma > --- > drivers/pci/controller/cadence/pcie-cadence-ep.c | 15 ++++++++++++++- > drivers/pci/controller/cadence/pcie-cadence.h | 6 ++++++ > 2 files changed, 20 insertions(+), 1 deletion(-) > > diff --git a/drivers/pci/controller/cadence/pcie-cadence-ep.c b/drivers/pci/controller/cadence/pcie-cadence-ep.c > index b8b655d4047e..6b6904cf0123 100644 > --- a/drivers/pci/controller/cadence/pcie-cadence-ep.c > +++ b/drivers/pci/controller/cadence/pcie-cadence-ep.c > @@ -565,7 +565,8 @@ static int cdns_pcie_ep_start(struct pci_epc *epc) > struct cdns_pcie *pcie = &ep->pcie; > struct device *dev = pcie->dev; > int max_epfs = sizeof(epc->function_num_map) * 8; > - int ret, value, epf; > + int ret, epf, last_fn; > + u32 reg, value; > > /* > * BIT(0) is hardwired to 1, hence function 0 is always enabled > @@ -573,6 +574,18 @@ static int cdns_pcie_ep_start(struct pci_epc *epc) > */ > cdns_pcie_writel(pcie, CDNS_PCIE_LM_EP_FUNC_CFG, epc->function_num_map); > > + /* Setup ARI Next Function Number. Please follow the standard multi-line commenting style with the first line being "/*" followed by the comment on the next line. > + * This field should point to the next physical Function and 0 for > + * last Function. > + */ > + last_fn = find_last_bit(&epc->function_num_map, BITS_PER_LONG); > + reg = CDNS_PCIE_CORE_PF_I_ARI_CAP_AND_CTRL(last_fn); > + > + // Clear Next Function Number for the last function used. Please enclose the comment within /* and */. Regards, Siddharth. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel