Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4601606rwd; Sun, 11 Jun 2023 10:46:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ51lvB43FNvekMexsFpg1mzKAZWp8yOvo8dgKy8w2a9SrN7kOmZBsocqWCHdUlFCLmPnvxR X-Received: by 2002:a05:6402:2d9:b0:506:82b7:10c3 with SMTP id b25-20020a05640202d900b0050682b710c3mr2866656edx.41.1686505575982; Sun, 11 Jun 2023 10:46:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686505575; cv=none; d=google.com; s=arc-20160816; b=NSvCsjNLeePdZixCkdB6xussEJ4evmdEwKXAbInJYjmGIXNG1G3Fg0AxLd88LlrrmF KWHVdP4W3cKKKGxAL4Xp1Z0u5axbargjd/yGUUOT67OfChYrbdie74cOKPLcdjjBWchW QszQn34aOy4EK0Rs8IDD8tFmJghPDmxoBQP19w8W6euLC6Ja7d48PDk3F7TjV2oSgMaC r2IwX7Dbfet6/bgClDq3nPg58GjJIHOBe6ZXWXKyo70PYGZbGyUJsLXe6HG7eOmpsB/9 eTrrEQ9to0wha66etSna8AYYsHIPsyMxQK7efS/T64erRJwVc+rbT6dhTzJa8UoThiHY +bkw== 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=NvNCnb3jQVKfCQT77/03s8ZBBMoSywcs7ILwTapEDN4=; b=qERUwcszv+aVJYTatEldiujTjLiDxxysXcD9ClolR1lMmVmKiiyIddIL1DPHFY45N+ irW6yUMeLGrMnZ4+0cf/3o4P5FOkAnS7g0Pdw4bk1MWy0jyhGMkazCkyOwAXnZQVFzck gP3FoxUgBJsn9uSIizJ3dyI5RapxsT4Tqx9XhA7xAUr6KiXBkfZ3v5a52GdyxfM8++kF Sj12nvZRfVx2uFRhrsN6cnG3uCox9T8jMhEsYpY7XnOuZoi1/VoNKKIAI9ory7jt9bOP J8RS9XBAqMEb3CVUKqD1JSIsCMxYSehv/k1VeYK03Rrw7Je1IWHj8zd4E6f8Kb9eNP34 Ihcw== 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 q14-20020a056402040e00b0050bc5b95923si4794938edv.497.2023.06.11.10.45.51; Sun, 11 Jun 2023 10:46:15 -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 S231646AbjFKRTw (ORCPT + 99 others); Sun, 11 Jun 2023 13:19:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233938AbjFKRTt (ORCPT ); Sun, 11 Jun 2023 13:19:49 -0400 Received: from angie.orcam.me.uk (angie.orcam.me.uk [78.133.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 36BBEE7A for ; Sun, 11 Jun 2023 10:19:33 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id 67DE69200C3; Sun, 11 Jun 2023 19:19:32 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 640209200BB; Sun, 11 Jun 2023 18:19:32 +0100 (BST) Date: Sun, 11 Jun 2023 18:19:32 +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 v9 05/14] 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=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 v8. 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; }