Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp609664rdb; Tue, 19 Sep 2023 05:29:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEDZ/wk5Yzg0BeO0AjK81id0d/WU0UXHKM7VbhSe0PzhoWNaRvEk81AX4BRDXx5r7sdN7Vp X-Received: by 2002:a05:6a00:2b94:b0:690:bc3f:4ffa with SMTP id dv20-20020a056a002b9400b00690bc3f4ffamr2320563pfb.14.1695126545123; Tue, 19 Sep 2023 05:29:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695126545; cv=none; d=google.com; s=arc-20160816; b=deO5JFP/BIBT12WEhXhCcyoxshrkUWWOVVag/WjpEjBzQQLp6iBDwmhz3dC7rf9i/l q9BOgXEugxpvGNmEcmXSxBFNBp7WbEFEFHwhWOsJRLk7NA7CvCrMX8wPR386NqvQKcJa 23fN50+nYBP+vbgs9jTaPmEz/bFZPKC7uVyBmDKJ6gLLpDVp4ntmO3H5QnwxmW0ySkGh OGXgdskBIse484GxMDItIIRO8loiXX4dbSZiUGmMiQogp64K8H/K30z4UnS00qQQgMvB MW0W0gTlnqFFsTBjDaABXKJ4+vR8iFCm7FgKivKqErV9wMSKp6+S5MlZ7SzlpCm0ETfM zjcw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=roCrfC9QM+40xGRUcNmQbgJ/aX2NXXhfSgLFj2A/Zbk=; fh=NlJdA3m1jgdiWsd4gMYWr2ICmM+FijWUtU5hgAxNlhc=; b=lrfIav4FgyaV9MGN0+PyiSL6TC5JXBITqMHo5aSeGYLKO2PkWWbfp4AwEZAAvH3t42 FBA/IY5oFIJIXzm6JFLUapxvlUjUBImv5Erj5CZ4+vdKGCs9JXp0tB/Lf7bmi21ADCsG crH02thDlfk6GGV5fw2FfX0VpbUe2wsJQ9Lh1hG6wcHb95PoH0w+dwZzCTXEYB7jolmr 4goWZiRmJd8IgJaygYeBjeJnvODIibazlV7ssnpoyHOFY+vfYSBDjxag/cPsEz3UlaHH goIs4iZArdgluvOAEJGk2pUcsIJaNCQediAS6Uk2s2rNvkxl5ODitRdC9K4QERO6tioT VnJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h1ieTEC7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id q2-20020a632a02000000b00578d0285dc7si63629pgq.325.2023.09.19.05.29.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 05:29:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h1ieTEC7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 3D7D081BB094; Tue, 19 Sep 2023 05:20:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232198AbjISMUW (ORCPT + 99 others); Tue, 19 Sep 2023 08:20:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232023AbjISMUF (ORCPT ); Tue, 19 Sep 2023 08:20:05 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E18DCD2; Tue, 19 Sep 2023 05:19:17 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36C8BC433C8; Tue, 19 Sep 2023 12:19:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695125956; bh=KWxrBE8BT1ctag8F1WD5tAIg+4DrPuUNHnklsRSxoSE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=h1ieTEC7kJrlAKkCSFGmz/GMmrgdOneAwxqrwiVeVtI3H3Dkr2DNMYY/5iwe3nZkt fQHHEPjl+1pbSu4IJq6W8Tz9NI/LyHwt387rujE6jlckQxZiH3LBmPucwpZyDpaq18 /TYlcLKZL5VipVjjoO9GtRfmWQC4q60qPg2QaDhcll/Md8NTQHx19m99AVVeUlHEot Rekfq1IZJnmZoRijp2A5ITBcdker3hovduuu3e1SvQ0TTrTxHZzgTuQVDakxfIwWuh Rj8fs9xIs20S+5Berz5mxpfU/6HOHzU0KRrgqxGzpdT9jZhUjr5dDRAI8+9k3Wwxe3 VCOOvbi8K+duw== Date: Tue, 19 Sep 2023 14:19:09 +0200 From: Manivannan Sadhasivam To: Sricharan Ramabadhran Cc: agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, robh@kernel.org, lpieralisi@kernel.org, bhelgaas@google.com, kw@linux.com, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, gregkh@linuxfoundation.org, dmitry.baryshkov@linaro.org, stable@vger.kernel.org, robimarko@gmail.com Subject: Re: [PATCH V6] PCI: qcom: Fix broken pcie enumeration for 2_3_3 configs ops Message-ID: <20230919121909.GF4732@thinkpad> References: <20230919102948.1844909-1-quic_srichara@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230919102948.1844909-1-quic_srichara@quicinc.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Tue, 19 Sep 2023 05:20:36 -0700 (PDT) On Tue, Sep 19, 2023 at 03:59:48PM +0530, Sricharan Ramabadhran wrote: > PARF_SLV_ADDR_SPACE_SIZE_2_3_3 macro is used for qcom_pcie_post_init_2_3_3. > PCIe slave address space size register offset is 0x358, but was wrongly > changed to 0x16c as a part of commit 39171b33f652 ("PCI: qcom: Remove > PCIE20_ prefix from register definitions"). Fixing it, by using the right > macro and remove the unused PARF_SLV_ADDR_SPACE_SIZE_2_3_3. > > Without this access to the registers of slave addr space like iATU etc > are broken leading to PCIe enumeration failure on IPQ8074. > > Fixes: 39171b33f652 ("PCI: qcom: Remove PCIE20_ prefix from register definitions") > Cc: Please fix the stable list address: stable@vger.kernel.org - Mani > Reviewed-by: Manivannan Sadhasivam > Reviewed-by: Konrad Dybcio > Tested-by: Robert Marko > Signed-off-by: Sricharan Ramabadhran > --- > [V6] Fixed subject and commit text as per Bjorn Helgaas > > drivers/pci/controller/dwc/pcie-qcom.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c > index e2f29404c84e..64420ecc24d1 100644 > --- a/drivers/pci/controller/dwc/pcie-qcom.c > +++ b/drivers/pci/controller/dwc/pcie-qcom.c > @@ -43,7 +43,6 @@ > #define PARF_PHY_REFCLK 0x4c > #define PARF_CONFIG_BITS 0x50 > #define PARF_DBI_BASE_ADDR 0x168 > -#define PARF_SLV_ADDR_SPACE_SIZE_2_3_3 0x16c /* Register offset specific to IP ver 2.3.3 */ > #define PARF_MHI_CLOCK_RESET_CTRL 0x174 > #define PARF_AXI_MSTR_WR_ADDR_HALT 0x178 > #define PARF_AXI_MSTR_WR_ADDR_HALT_V2 0x1a8 > @@ -797,8 +796,7 @@ static int qcom_pcie_post_init_2_3_3(struct qcom_pcie *pcie) > u16 offset = dw_pcie_find_capability(pci, PCI_CAP_ID_EXP); > u32 val; > > - writel(SLV_ADDR_SPACE_SZ, > - pcie->parf + PARF_SLV_ADDR_SPACE_SIZE_2_3_3); > + writel(SLV_ADDR_SPACE_SZ, pcie->parf + PARF_SLV_ADDR_SPACE_SIZE); > > val = readl(pcie->parf + PARF_PHY_CTRL); > val &= ~PHY_TEST_PWR_DOWN; > -- > 2.34.1 > -- மணிவண்ணன் சதாசிவம்