All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: "Maciej W. Rozycki" <macro@orcam.me.uk>
Cc: "Bjorn Helgaas" <bhelgaas@google.com>,
	"Mahesh J Salgaonkar" <mahesh@linux.ibm.com>,
	"Oliver O'Halloran" <oohall@gmail.com>,
	"Michael Ellerman" <mpe@ellerman.id.au>,
	"Nicholas Piggin" <npiggin@gmail.com>,
	"Christophe Leroy" <christophe.leroy@csgroup.eu>,
	"Saeed Mahameed" <saeedm@nvidia.com>,
	"Leon Romanovsky" <leon@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Alex Williamson" <alex.williamson@redhat.com>,
	"Mika Westerberg" <mika.westerberg@linux.intel.com>,
	"Stefan Roese" <sr@denx.de>, "Jim Wilson" <wilson@tuliptree.org>,
	"David Abdurachmanov" <david.abdurachmanov@gmail.com>,
	"Pali Rohár" <pali@kernel.org>,
	linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-rdma@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 6/7] PCI: pciehp: Rely on `link_active_reporting'
Date: Mon, 13 Feb 2023 14:53:27 +0100	[thread overview]
Message-ID: <20230213135327.GA29595@wunner.de> (raw)
In-Reply-To: <alpine.DEB.2.21.2302051459210.33812@angie.orcam.me.uk>

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 <macro@orcam.me.uk>

Reviewed-by: Lukas Wunner <lukas@wunner.de>

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)" : "");
>  
>  	/*

WARNING: multiple messages have this Message-ID (diff)
From: Lukas Wunner <lukas@wunner.de>
To: "Maciej W. Rozycki" <macro@orcam.me.uk>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Eric Dumazet" <edumazet@google.com>,
	"Oliver O'Halloran" <oohall@gmail.com>,
	"Stefan Roese" <sr@denx.de>, "Leon Romanovsky" <leon@kernel.org>,
	linux-rdma@vger.kernel.org, "Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Jim Wilson" <wilson@tuliptree.org>,
	"Nicholas Piggin" <npiggin@gmail.com>,
	"Alex Williamson" <alex.williamson@redhat.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Mika Westerberg" <mika.westerberg@linux.intel.com>,
	"David Abdurachmanov" <david.abdurachmanov@gmail.com>,
	linuxppc-dev@lists.ozlabs.org,
	"Mahesh J Salgaonkar" <mahesh@linux.ibm.com>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, "Pali Rohár" <pali@kernel.org>,
	"Saeed Mahameed" <saeedm@nvidia.com>
Subject: Re: [PATCH v6 6/7] PCI: pciehp: Rely on `link_active_reporting'
Date: Mon, 13 Feb 2023 14:53:27 +0100	[thread overview]
Message-ID: <20230213135327.GA29595@wunner.de> (raw)
In-Reply-To: <alpine.DEB.2.21.2302051459210.33812@angie.orcam.me.uk>

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 <macro@orcam.me.uk>

Reviewed-by: Lukas Wunner <lukas@wunner.de>

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)" : "");
>  
>  	/*

  reply	other threads:[~2023-02-13 13:53 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-05 15:48 [PATCH v6 0/7] pci: Work around ASMedia ASM2824 PCIe link training failures Maciej W. Rozycki
2023-02-05 15:48 ` Maciej W. Rozycki
2023-02-05 15:48 ` [PATCH v6 1/7] PCI: Export PCI link retrain timeout Maciej W. Rozycki
2023-02-05 15:48   ` Maciej W. Rozycki
2023-02-05 15:49 ` [PATCH v6 2/7] PCI: Execute `quirk_enable_clear_retrain_link' earlier Maciej W. Rozycki
2023-02-05 15:49   ` Maciej W. Rozycki
2023-02-05 15:49 ` [PATCH v6 3/7] PCI: Initialize `link_active_reporting' earlier Maciej W. Rozycki
2023-02-05 15:49   ` Maciej W. Rozycki
2023-02-05 15:49 ` [PATCH v6 4/7] powerpc/eeh: Rely on `link_active_reporting' Maciej W. Rozycki
2023-02-05 15:49   ` Maciej W. Rozycki
2023-02-05 15:49 ` [PATCH v6 5/7] net/mlx5: " Maciej W. Rozycki
2023-02-05 15:49   ` Maciej W. Rozycki
2023-02-05 15:49 ` [PATCH v6 6/7] PCI: pciehp: " Maciej W. Rozycki
2023-02-05 15:49   ` Maciej W. Rozycki
2023-02-13 13:53   ` Lukas Wunner [this message]
2023-02-13 13:53     ` Lukas Wunner
2023-02-05 15:49 ` [PATCH v6 7/7] PCI: Work around PCIe link training failures Maciej W. Rozycki
2023-02-05 15:49   ` Maciej W. Rozycki
2023-02-19 18:52 ` [PING][PATCH v6 0/7] pci: Work around ASMedia ASM2824 " Maciej W. Rozycki
2023-02-19 18:52   ` Maciej W. Rozycki
2023-02-19 19:46   ` Lukas Wunner
2023-02-21 21:46     ` Pali Rohár
2023-02-22  8:40       ` Lukas Wunner
2023-02-22  9:17         ` Pali Rohár
2023-02-22 11:54     ` Maciej W. Rozycki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230213135327.GA29595@wunner.de \
    --to=lukas@wunner.de \
    --cc=alex.williamson@redhat.com \
    --cc=bhelgaas@google.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=davem@davemloft.net \
    --cc=david.abdurachmanov@gmail.com \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=macro@orcam.me.uk \
    --cc=mahesh@linux.ibm.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=mpe@ellerman.id.au \
    --cc=netdev@vger.kernel.org \
    --cc=npiggin@gmail.com \
    --cc=oohall@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=pali@kernel.org \
    --cc=saeedm@nvidia.com \
    --cc=sr@denx.de \
    --cc=wilson@tuliptree.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.