Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1420593rwl; Wed, 5 Apr 2023 17:23:24 -0700 (PDT) X-Google-Smtp-Source: AKy350bXSPYDyjZs3fd5WyJQDJ/5cjcQSlG58wCoOonEvC5t+61S354dU0/FXoRhPcud/elm73ql X-Received: by 2002:a17:907:3201:b0:949:55fd:34fa with SMTP id xg1-20020a170907320100b0094955fd34famr4547621ejb.39.1680740604182; Wed, 05 Apr 2023 17:23:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680740604; cv=none; d=google.com; s=arc-20160816; b=T8kHIBrBt132HZ2z6zB4PM4GXNNdRxN8RstaigtR+VaDY2i72Td3BBoOWUMFaRodR7 cL19KJwqKp+RjgzxSBaS1QP4dNXFE457KVoYxDjp6ilmu4Lmk97JgpcCBikq1q3bb0Td 36pCMK+OQV8gwqFolPqR5iMoUWmiNjKL6uCeaoN8oUKcLF0QngWhMJwX2OMw8e0Ru/CK 5zb8AYuRMi1GFMnkFRXpeJhctFPRB/QghQfPHAMryu91GJ63tcF+NBsM60YUAMFMxCFt QFWs80XBncxaGdKP61DEB0cuN3U2eMBceLww+2jorgRnbaf+8jVPCWn7WVSqTnURQMbN UwHA== 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=61RLP5Giec7twT+KkxW2OfaPvhwJMuOSy25RWwYnPWM=; b=XYaBnHh+GL1S4HHXH8OXIR2XwAUTlECuaoR4iPwzNLucLNMG/MLZwk0dKDGMv+eFQ+ a3at7mHKGndbkcK5bg6RlGHsSpYQdcCeWNSHriV9h2zOPOuonE8xqI0UteBgsefqzFcy GfdgXGm+LzBidZjmAS4KyKs29FUz3NoQLD1J6YuPgWnFpptV6Eg7uchs1pexpbXZ+xPx InO3sFS6Jrq0JXzzyjvEOSP2woHaINdPrA56LHRJ83chDfUZFFffTIhhVpHJyuyPcVjS dw/vjDyee4QDIjZzpzfpph1dvqZn5S6mLLfqtbWqxehGlMeI05PRD0zNZ0ropTymGZdo T1PA== 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 kz21-20020a17090777d500b009476f7e3d4csi11099ejc.234.2023.04.05.17.22.59; Wed, 05 Apr 2023 17:23:24 -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 S234721AbjDFAWE (ORCPT + 99 others); Wed, 5 Apr 2023 20:22:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234632AbjDFAVl (ORCPT ); Wed, 5 Apr 2023 20:21:41 -0400 Received: from angie.orcam.me.uk (angie.orcam.me.uk [IPv6:2001:4190:8020::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8780883E5; Wed, 5 Apr 2023 17:21:24 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id 169B29200BF; Thu, 6 Apr 2023 02:21:23 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 107B192009B; Thu, 6 Apr 2023 01:21:23 +0100 (BST) Date: Thu, 6 Apr 2023 01:21:22 +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 v8 5/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. Changes from v7: - Reorder from 4/7. 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; }