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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9363DC7619A for ; Wed, 5 Apr 2023 07:18:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236800AbjDEHSo (ORCPT ); Wed, 5 Apr 2023 03:18:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230050AbjDEHSn (ORCPT ); Wed, 5 Apr 2023 03:18:43 -0400 Received: from bmailout1.hostsharing.net (bmailout1.hostsharing.net [IPv6:2a01:37:1000::53df:5f64:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6797826BA; Wed, 5 Apr 2023 00:18:41 -0700 (PDT) Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (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 4E8DA300097AE; Wed, 5 Apr 2023 09:18:39 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 43BA6E24E3; Wed, 5 Apr 2023 09:18:39 +0200 (CEST) Date: Wed, 5 Apr 2023 09:18:39 +0200 From: Lukas Wunner To: "Maciej W. Rozycki" Cc: Bjorn Helgaas , Mahesh J Salgaonkar , Oliver O'Halloran , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Saeed Mahameed , Leon Romanovsky , Alex Williamson , Mika Westerberg , Stefan Roese , Jim Wilson , David Abdurachmanov , Pali =?iso-8859-1?Q?Roh=E1r?= , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 6/7] PCI: pciehp: Rely on `link_active_reporting' Message-ID: <20230405071839.GA27005@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) Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Tue, Apr 04, 2023 at 10:56:21PM +0100, 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 I provided a Reviewed-by for this patch back in February: https://lore.kernel.org/linux-pci/20230213135327.GA29595@wunner.de/ Please always include collected tags when reposting your patches. I also noted back then that this patch does not depend on the preceding patches in the series. So please move it to the front of the series so that it can be picked up despite the other patches still being under discussion. That way you reduce the size of any future reposts of the series and make life easier both for yourself and reviewers. Thanks, Lukas > --- > NB this has been compile-tested only with PPC64LE and x86-64 > configurations. > > No change from v6. > > New change in v6. > --- > 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)" : ""); > > /*