Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp6557925rwl; Tue, 4 Apr 2023 14:58:48 -0700 (PDT) X-Google-Smtp-Source: AKy350byHOU/UCU028MbCbG3tZOWqfv5+uikXP7es/w9sBJv3rQL9sl79Oun3GdUwK1S7eQ/x2Jf X-Received: by 2002:aa7:9890:0:b0:628:cff:1440 with SMTP id r16-20020aa79890000000b006280cff1440mr3361258pfl.28.1680645527869; Tue, 04 Apr 2023 14:58:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680645527; cv=none; d=google.com; s=arc-20160816; b=fvytwZstEe4ruOcfhmnfEWo7vGpWvEgtS3EZd9hiWFnNdDLsIE2neliNzbY+cfCwHC OmUmAkygeQ5Ya13Ubdict8bVbmoSMqqez++OLu4Lt0vVPyt0+xinanx/NIsXIhGOFF7P IAyCJj96O8Km78W2rhqPL7EMi3enB0sOzSMQuSp7hJJUnVZBPRnHDMYKLtn2IE4D2RKV /Mvt1CojYTSczkZEcmTYWmr+BaGs8YHj9D0zZTez7aIZWbWSb37JAvIqiNEuJRmfdXck vjwiKDGvBJin5/+Er760sQzHFXEyp6bdgGEdhwHZS1pN+DzZdK2u8Kio3o7/YPhoRJZe spmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=OWhW1Phg+a0/Wc7ZPA0yTK2admKJulfNiTF2vFXED6s=; b=JbQShUHjA8xy5z9wTvgpEtZ3A8pCcER55RbuqQgwBRFc8hJMqvryPcBFm9sagGm7H4 ab1mxAtrQsaOXbgoNvQvLjbSybO7e40L3p0qzcW2owr/MPtomsvwMdyhcUJZPj4TJGTM MZ0jHd2/9y4NKV7yFUR/u3kzgbBhZmi0OTJu3T2n+4FkFpinaFyqLt06jwtJnyifOwok XEocIdk6YZQH29Jnz9J3+NvOXN8PVAfEAWO7zj0lyvCpVhjnYa7mxTfpXovorzYkm2ku 4Cjn6IXnC1yegrMLD8i54LqaJTgjMU8brkuLPkE9xaNnMBpOhWY36WuZwNQ/3q/32ZlO u19g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t71-20020a635f4a000000b005138fd7f1cesi11270469pgb.89.2023.04.04.14.58.35; Tue, 04 Apr 2023 14:58:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236600AbjDDV4j (ORCPT + 99 others); Tue, 4 Apr 2023 17:56:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236577AbjDDV41 (ORCPT ); Tue, 4 Apr 2023 17:56:27 -0400 Received: from angie.orcam.me.uk (angie.orcam.me.uk [IPv6:2001:4190:8020::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 390FA4C25; Tue, 4 Apr 2023 14:56:14 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id 1DBC79200C1; Tue, 4 Apr 2023 23:56:14 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 19BF292009D; Tue, 4 Apr 2023 22:56:14 +0100 (BST) Date: Tue, 4 Apr 2023 22:56:14 +0100 (BST) From: "Maciej W. Rozycki" To: Bjorn Helgaas , Mahesh J Salgaonkar , Oliver O'Halloran , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Saeed Mahameed , Leon Romanovsky , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni cc: Alex Williamson , Lukas Wunner , Mika Westerberg , Stefan Roese , Jim Wilson , David Abdurachmanov , =?UTF-8?Q?Pali_Roh=C3=A1r?= , 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: [PATCH v7 4/7] powerpc/eeh: Rely on `link_active_reporting' In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- NB this has been compile-tested only with a PPC64LE configuration. No change from v6. New change in v6. --- arch/powerpc/kernel/eeh_pe.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) linux-pcie-link-active-reporting-eeh.diff Index: linux-macro/arch/powerpc/kernel/eeh_pe.c =================================================================== --- linux-macro.orig/arch/powerpc/kernel/eeh_pe.c +++ linux-macro/arch/powerpc/kernel/eeh_pe.c @@ -671,9 +671,8 @@ static void eeh_bridge_check_link(struct 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; }