]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
powerpc/eeh: Rely on dev->link_active_reporting
authorMaciej W. Rozycki <macro@orcam.me.uk>
Sun, 11 Jun 2023 17:19:32 +0000 (18:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:22:36 +0000 (16:22 +0200)
[ Upstream commit 1541a21305ceb10fcf3f7cbb23f3e1a00bbf1789 ]

Use dev->link_active_reporting to determine whether Data Link Layer Link
Active Reporting is available rather than re-retrieving the capability.

Link: https://lore.kernel.org/r/alpine.DEB.2.21.2305310124100.59226@angie.orcam.me.uk
Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/kernel/eeh_pe.c

index a856d9ba42d206e73047ca8be858e38a57ca6b5c..3f55e372f259f3a2da718f56b403d164971d440f 100644 (file)
@@ -670,9 +670,8 @@ static void eeh_bridge_check_link(struct eeh_dev *edev)
        eeh_ops->write_config(edev, cap + PCI_EXP_LNKCTL, 2, val);
 
        /* Check link */
-       eeh_ops->read_config(edev, cap + PCI_EXP_LNKCAP, 4, &val);
-       if (!(val & PCI_EXP_LNKCAP_DLLLARC)) {
-               eeh_edev_dbg(edev, "No link reporting capability (0x%08x) \n", val);
+       if (!edev->pdev->link_active_reporting) {
+               eeh_edev_dbg(edev, "No link reporting capability\n");
                msleep(1000);
                return;
        }