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 E6213C433F5 for ; Fri, 11 Feb 2022 16:24:45 +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:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=t2rRunBU/XeNaKwTkE6jXJSWL52/laRdKlfaHvywNjo=; b=1FmvGhsjLoQwPE gpqDJf0sbx/97qTEi0Xq0Uy9YHHNjg1SrYZfBd/gnIOtDSrYRJwJ/3mOh9CyINXDszwajzDSKtoHl 4VGy9x303yXcyNakeBqGyf1ZdU4kscS4MWYVKk/vWrixnoJeE92jr7TzxKtTUhBsG1NjW/GoN12nH +sYjQX3NE5/N0ET+h8TcaGptp/zaGjoBOtyTyeKLkBC/gglOeGigJ4wNzoFlNnTe+eN1ZSEMhpZ9p YJWFyfzMcPfXWc2eud+S91mtQjbLmuZbcEmW3OdFAwR2GD8N9b7DlbWzjQqWwwMqB8fx2EjjoXmfg j9fNlKaWkMJCEVvZpFZw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nIYhi-007z08-8c; Fri, 11 Feb 2022 16:23:26 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nIYhe-007yzo-3W for linux-arm-kernel@lists.infradead.org; Fri, 11 Feb 2022 16:23:24 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A3F04106F; Fri, 11 Feb 2022 08:23:20 -0800 (PST) Received: from lpieralisi (e121166-lin.cambridge.arm.com [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 647893F70D; Fri, 11 Feb 2022 08:23:19 -0800 (PST) Date: Fri, 11 Feb 2022 16:23:17 +0000 From: Lorenzo Pieralisi To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Ray Jui , Roman Bacik , Rob Herring , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Bjorn Helgaas , bcm-kernel-feedback-list@broadcom.com, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] PCI: iproc: Set all 24 bits of PCI class code Message-ID: <20220211162317.GC448@lpieralisi> References: <20220105093552.27542-1-pali@kernel.org> <244e74d9-1b46-2abc-6c2a-c089fa5b68b4@broadcom.com> <20220105181306.mkratasqg36tjf4e@pali> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220105181306.mkratasqg36tjf4e@pali> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220211_082322_443927_23256EE3 X-CRM114-Status: GOOD ( 39.25 ) 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="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jan 05, 2022 at 07:13:06PM +0100, Pali Roh=E1r wrote: > Hello! > = > On Wednesday 05 January 2022 09:51:48 Ray Jui wrote: > > Hi Pali, > > = > > On 1/5/2022 1:35 AM, Pali Roh=E1r wrote: > > > Register 0x43c in its low 24 bits contains PCI class code. > > > = > > > Update code to set all 24 bits of PCI class code and not only upper 1= 6 bits > > > of PCI class code. > > > = > > > Use a new macro PCI_CLASS_BRIDGE_PCI_NORMAL which represents whole 24= bits > > > of normal PCI bridge class. > > > = > > > Signed-off-by: Pali Roh=E1r > > > = > > > --- > > > Roman helped me with this change and confirmed that class code is sto= red > > > really in bits [23:0] of custom register 0x43c (normally class code is > > > stored in bits [31:8] of pci register 0x08). > > > = > > > This patch depends on patch which adds PCI_CLASS_BRIDGE_PCI_NORMAL ma= cro: > > > https://lore.kernel.org/linux-pci/20211220145140.31898-1-pali@kernel.= org/ > > > --- > > > drivers/pci/controller/pcie-iproc.c | 9 ++++----- > > > 1 file changed, 4 insertions(+), 5 deletions(-) > > > = > > > diff --git a/drivers/pci/controller/pcie-iproc.c b/drivers/pci/contro= ller/pcie-iproc.c > > > index 3df4ab209253..2519201b0e51 100644 > > > --- a/drivers/pci/controller/pcie-iproc.c > > > +++ b/drivers/pci/controller/pcie-iproc.c > > > @@ -789,14 +789,13 @@ static int iproc_pcie_check_link(struct iproc_p= cie *pcie) > > > return -EFAULT; > > > } > > > = > > > - /* force class to PCI_CLASS_BRIDGE_PCI (0x0604) */ > > > + /* force class to PCI_CLASS_BRIDGE_PCI_NORMAL (0x060400) */ > > > #define PCI_BRIDGE_CTRL_REG_OFFSET 0x43c > > > -#define PCI_CLASS_BRIDGE_MASK 0xffff00 > > > -#define PCI_CLASS_BRIDGE_SHIFT 8 > > > +#define PCI_BRIDGE_CTRL_REG_CLASS_MASK 0xffffff > > > iproc_pci_raw_config_read32(pcie, 0, PCI_BRIDGE_CTRL_REG_OFFSET, > > > 4, &class); > > > - class &=3D ~PCI_CLASS_BRIDGE_MASK; > > > - class |=3D (PCI_CLASS_BRIDGE_PCI << PCI_CLASS_BRIDGE_SHIFT); > > > + class &=3D ~PCI_BRIDGE_CTRL_REG_CLASS_MASK; > > > + class |=3D PCI_CLASS_BRIDGE_PCI_NORMAL; > > > iproc_pci_raw_config_write32(pcie, 0, PCI_BRIDGE_CTRL_REG_OFFSET, > > > 4, class); > > > = > > = > > I have two comments: > > = > > 1. You do not seem to generate the email list using the > > get_maintainer.pl script, so the two maintainers for Broadcom ARM > > architecture (Ray Jui and Scott Branden) are left out. > = > Ou, sorry for that! I have generated this patch for U-Boot and Linux > kernel and probably mixed or forgot to include correct recipients for > correct project. > = > > 2. I suppose 'PCI_CLASS_BRIDGE_PCI_NORMAL' is defined in some common PCI > > header in a separate patch as described in the commit message. Then how > > come these patches are not constructed with a patch series? > = > Yes, PCI_CLASS_BRIDGE_PCI_NORMAL is a new constant for common pci header > file defined in patch linked in commit message. > https://lore.kernel.org/linux-pci/20211220145140.31898-1-pali@kernel.org/ > = > Originally I included this change in v1 of linked patch in December but > I realized that it does not match standard PCI config space (different > offset 0x43c vs 0x08 and also different shift 0x8 vs 0x0) and probably > there is something either incorrect or really non-standard. So later in > December I dropped iproc_pcie_check_link() change in v2 of the linked > patch where is introduced PCI_CLASS_BRIDGE_PCI_NORMAL and now sent new > change for iproc_pcie_check_link() separately. > = > Technically, linked patch in commit message is just extracting code into > the common macros without any functional changed. But change in this > iproc_pcie_check_link() has also functional change as now also lower 8 > bits of class code are changed. So in my opinion this patch should be > really separate of linked patch. > = > I hope that Lorenzo and Bjorn take patches in correct order... Can you resend the patches in a series please, I will drop this one. Thanks, Lorenzo > > Other than, the change itself is exactly what I sent to Roman and looks > > good to me. Thanks. > > = > > Acked-by: Ray Jui > = > Perfect! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel