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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 EA0D5C636D4 for ; Mon, 13 Feb 2023 13:59:28 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4PFmDH3RKzz3cJK for ; Tue, 14 Feb 2023 00:59:27 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=h08.hostsharing.net (client-ip=2a01:37:1000::53df:5f64:0; helo=bmailout1.hostsharing.net; envelope-from=foo00@h08.hostsharing.net; receiver=) X-Greylist: delayed 313 seconds by postgrey-1.36 at boromir; Tue, 14 Feb 2023 00:58:51 AEDT Received: from bmailout1.hostsharing.net (bmailout1.hostsharing.net [IPv6:2a01:37:1000::53df:5f64:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4PFmCb5rklz3bXv for ; Tue, 14 Feb 2023 00:58:51 +1100 (AEDT) Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL Global TLS RSA4096 SHA256 2022 CA1" (verified OK)) by bmailout1.hostsharing.net (Postfix) with ESMTPS id 019173000794D; Mon, 13 Feb 2023 14:53:28 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id D8E261E172; Mon, 13 Feb 2023 14:53:27 +0100 (CET) Date: Mon, 13 Feb 2023 14:53:27 +0100 From: Lukas Wunner To: "Maciej W. Rozycki" Subject: Re: [PATCH v6 6/7] PCI: pciehp: Rely on `link_active_reporting' Message-ID: <20230213135327.GA29595@wunner.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Eric Dumazet , Oliver O'Halloran , Stefan Roese , Leon Romanovsky , linux-rdma@vger.kernel.org, Jakub Kicinski , Paolo Abeni , Jim Wilson , Nicholas Piggin , Alex Williamson , Bjorn Helgaas , Mika Westerberg , David Abdurachmanov , linuxppc-dev@lists.ozlabs.org, Mahesh J Salgaonkar , "David S. Miller" , netdev@vger.kernel.org, Pali =?iso-8859-1?Q?Roh=E1r?= , Saeed Mahameed Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Sun, Feb 05, 2023 at 03:49:21PM +0000, Maciej W. Rozycki wrote: > Use `link_active_reporting' to determine whether Data Link Layer Link > Active Reporting is available rather than re-retrieving the capability. > > Signed-off-by: Maciej W. Rozycki Reviewed-by: Lukas Wunner I believe this should work without the preceding patches in the series, hence can be applied independently. Thanks, Lukas > drivers/pci/hotplug/pciehp_hpc.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > linux-pcie-link-active-reporting-hpc.diff > Index: linux-macro/drivers/pci/hotplug/pciehp_hpc.c > =================================================================== > --- linux-macro.orig/drivers/pci/hotplug/pciehp_hpc.c > +++ linux-macro/drivers/pci/hotplug/pciehp_hpc.c > @@ -984,7 +984,7 @@ static inline int pcie_hotplug_depth(str > struct controller *pcie_init(struct pcie_device *dev) > { > struct controller *ctrl; > - u32 slot_cap, slot_cap2, link_cap; > + u32 slot_cap, slot_cap2; > u8 poweron; > struct pci_dev *pdev = dev->port; > struct pci_bus *subordinate = pdev->subordinate; > @@ -1030,9 +1030,6 @@ struct controller *pcie_init(struct pcie > if (dmi_first_match(inband_presence_disabled_dmi_table)) > ctrl->inband_presence_disabled = 1; > > - /* Check if Data Link Layer Link Active Reporting is implemented */ > - pcie_capability_read_dword(pdev, PCI_EXP_LNKCAP, &link_cap); > - > /* Clear all remaining event bits in Slot Status register. */ > pcie_capability_write_word(pdev, PCI_EXP_SLTSTA, > PCI_EXP_SLTSTA_ABP | PCI_EXP_SLTSTA_PFD | > @@ -1051,7 +1048,7 @@ struct controller *pcie_init(struct pcie > FLAG(slot_cap, PCI_EXP_SLTCAP_EIP), > FLAG(slot_cap, PCI_EXP_SLTCAP_NCCS), > FLAG(slot_cap2, PCI_EXP_SLTCAP2_IBPD), > - FLAG(link_cap, PCI_EXP_LNKCAP_DLLLARC), > + FLAG(pdev->link_active_reporting, true), > pdev->broken_cmd_compl ? " (with Cmd Compl erratum)" : ""); > > /*