Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D753EC7618D for ; Tue, 7 Mar 2023 18:27:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232909AbjCGS1g (ORCPT ); Tue, 7 Mar 2023 13:27:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232823AbjCGS0B (ORCPT ); Tue, 7 Mar 2023 13:26:01 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70252ACE37; Tue, 7 Mar 2023 10:20:29 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 14678CE1C84; Tue, 7 Mar 2023 18:20:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 38645C433D2; Tue, 7 Mar 2023 18:20:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678213226; bh=ZhMyDhUa2wqpQV2qFzBJe9Bn0s90CRl6l0idvIIy614=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U/iNN/MEM38r3TpbO3a32aOojVUyAcscuHqhahJvXh71+RHJpwweWGVD6q3Mg+o2F Z9wcvNU9fqx+RTValM70vDw5VNi8ne/7TEQJouBFnInEI4hJ1wTrEGlZJomfWYFNGV FyYO6TRnZTxA21V6nVdVNsXF3RRMBWEhzhJPb/V9EMMguj5xcp5RXTvQeH0BB77ASV 9VHzI0VkN3omP/++/0W7ZT/KDCO+9ilYihy6IK79Up/8mAgXRH4mGLR7qkwgPkALX7 SwE+641OrY4irDI3OXyMtWJX91xbtUGUUL60KGtDdXy4hQ3JkeAqOL1CmiO5EyY9K1 sG/apuFGQmhdA== From: Bjorn Helgaas To: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Helgaas , Edward Cree , Martin Habets Subject: [PATCH 16/28] sfc: falcon: Drop redundant pci_enable_pcie_error_reporting() Date: Tue, 7 Mar 2023 12:19:27 -0600 Message-Id: <20230307181940.868828-17-helgaas@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230307181940.868828-1-helgaas@kernel.org> References: <20230307181940.868828-1-helgaas@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bjorn Helgaas pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Cc: Edward Cree Cc: Martin Habets --- drivers/net/ethernet/sfc/falcon/efx.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/net/ethernet/sfc/falcon/efx.c b/drivers/net/ethernet/sfc/falcon/efx.c index e151b0957751..e001f27085c6 100644 --- a/drivers/net/ethernet/sfc/falcon/efx.c +++ b/drivers/net/ethernet/sfc/falcon/efx.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include "net_driver.h" #include "efx.h" @@ -2765,8 +2764,6 @@ static void ef4_pci_remove(struct pci_dev *pci_dev) ef4_fini_struct(efx); free_netdev(efx->net_dev); - - pci_disable_pcie_error_reporting(pci_dev); }; /* NIC VPD information @@ -2927,12 +2924,6 @@ static int ef4_pci_probe(struct pci_dev *pci_dev, netif_warn(efx, probe, efx->net_dev, "failed to create MTDs (%d)\n", rc); - rc = pci_enable_pcie_error_reporting(pci_dev); - if (rc && rc != -EINVAL) - netif_notice(efx, probe, efx->net_dev, - "PCIE error reporting unavailable (%d).\n", - rc); - return 0; fail4: -- 2.25.1