Message ID | 20230118234612.272916-8-helgaas@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp38791wrn; Wed, 18 Jan 2023 15:49:42 -0800 (PST) X-Google-Smtp-Source: AMrXdXu7+RLmCT5D7iUhjHOeNM2mgqikLIyH9RDN2DP3qq+VfZPoixmnulqAYSl8ksbDf6N3gzVS X-Received: by 2002:a17:902:650e:b0:193:bec:497c with SMTP id b14-20020a170902650e00b001930bec497cmr10482229plk.68.1674085782538; Wed, 18 Jan 2023 15:49:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674085782; cv=none; d=google.com; s=arc-20160816; b=aIFcaDAIKyP3rdDKbolhLGysG+AJeD+M36WAUHnPevv9V1kCj4hHCbbUOS1fS3B34z XmT83GvKzogK5GdAjUS87zF+0EqSmZT2PjrBcQ/rZXudBz3t0PyofMfX3nf0YUSUsy5w 0xhNzzxmtMsFfZfK3gCqCBpRcLkzu7bbSoDjGA5WZPGrEPxsiaD8L8h72pB90muk7pZf prHbWLZvmlZk9y0kJrMPL4D+9OqvuGj7edhfQ1U1DKt03jlrkgp9MTepS3cuXJrtbAss a6RILkc05xWnFS+LNMKZ1S6Extye7ztShbVX4r7B41j8mIXv7o4Wx4zmmwCnD8hKNk/n VEDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nXyN5ca/T3O6ONtE1FNzMk0vEDzhgfWr3d5/6QU1EKE=; b=Z0noTbZOSjeWdwYu0WmzoRGzmSHF57V4uIHq+YhknVbN6DufVnpTpVNKtmIlDeA5u2 ssHL9fv7U/XMgtJOcYMp46rQPduIEklTYEXPcFmYmi0b6zYSKhml1sikWEl8EbSXeF2E 3MtsflU5rhWUYsD0B5rT6PMbUkN52XwZGhkvJm5TxIe6qkeey3cYHTESgfu7NUccfuP4 kVS1q4Bgf4v7pUqlz3PteBLJIJlT6YcwYBs8sS+2CGtC13J+wtUWFoaWLXHi1o0xb+b/ BzcrlByh6m1EiAxnCXgmJZ3RNnihQ1DsIiQlo5hF9IqnMD8yZf4iMfhZ0DVmuiCyrer4 3nMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DvjHgKGe; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ix12-20020a170902f80c00b0017684491caasi14399323plb.594.2023.01.18.15.49.30; Wed, 18 Jan 2023 15:49:42 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DvjHgKGe; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229575AbjARXre (ORCPT <rfc822;pfffrao@gmail.com> + 99 others); Wed, 18 Jan 2023 18:47:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230119AbjARXrY (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 18 Jan 2023 18:47:24 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C005457EE; Wed, 18 Jan 2023 15:47:05 -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 ams.source.kernel.org (Postfix) with ESMTPS id 38484B81F15; Wed, 18 Jan 2023 23:47:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BBA28C433EF; Wed, 18 Jan 2023 23:46:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674085620; bh=Gfwvn53sy7/1OA4WjgdfWmy9e90PwOSc2SBfrJghS2M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DvjHgKGekNLdHpc8ojQEuGgV8t992eddxElqZ6jWyK8yPZuKe/IFbrugnJBS/rPNB xTsHlc5CCJBNFxgVC3elNiAg1py5be+Sh+pmWBA/ExVfaqS+Xnd16tlP/mT8QwbOXc 8Yo6qSPa8aIIps+GK4d0IW7yIEMY/vzDPcRhCgnRXQYC8O5/MSvoUm9zQkVpVrr+u6 GVMjjC5Gd5mmKnUks9z0D7adsLqBDpeFwXZ2U7nd7XjRTE4sNRq9snguid573PVDEO POhSJ7MP4/1voLyfWToyNTbT0I5EfJo/HR3xt669qJzzh31eomDqXdrOcYC7gE291w Rxqbu4/5E5dMg== From: Bjorn Helgaas <helgaas@kernel.org> To: linux-pci@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>, Jesse Brandeburg <jesse.brandeburg@intel.com>, Tony Nguyen <anthony.l.nguyen@intel.com>, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org Subject: [PATCH 7/9] igb: Remove redundant pci_enable_pcie_error_reporting() Date: Wed, 18 Jan 2023 17:46:10 -0600 Message-Id: <20230118234612.272916-8-helgaas@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230118234612.272916-1-helgaas@kernel.org> References: <20230118234612.272916-1-helgaas@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755406173090599022?= X-GMAIL-MSGID: =?utf-8?q?1755406173090599022?= |
Series |
PCI/AER: Remove redundant Device Control Error Reporting Enable
|
|
Commit Message
Bjorn Helgaas
Jan. 18, 2023, 11:46 p.m. UTC
From: Bjorn Helgaas <bhelgaas@google.com> 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. 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 doesn't control interrupt generation by the Root Port; that is controlled by the AER Root Error Command register, which is managed by the AER service driver. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Cc: Jesse Brandeburg <jesse.brandeburg@intel.com> Cc: Tony Nguyen <anthony.l.nguyen@intel.com> Cc: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org --- drivers/net/ethernet/intel/igb/igb_main.c | 5 ----- 1 file changed, 5 deletions(-)
Comments
On 1/18/2023 3:46 PM, Bjorn Helgaas wrote: > From: Bjorn Helgaas <bhelgaas@google.com> > > 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. > > 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 doesn't control interrupt generation by the Root Port; that > is controlled by the AER Root Error Command register, which is managed by > the AER service driver. > > Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> > Cc: Jesse Brandeburg <jesse.brandeburg@intel.com> > Cc: Tony Nguyen <anthony.l.nguyen@intel.com> > Cc: intel-wired-lan@lists.osuosl.org > Cc: netdev@vger.kernel.org > --- > drivers/net/ethernet/intel/igb/igb_main.c | 5 ----- > 1 file changed, 5 deletions(-) Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com> > diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c > index 3c0c35ecea10..c56b991fa610 100644 > --- a/drivers/net/ethernet/intel/igb/igb_main.c > +++ b/drivers/net/ethernet/intel/igb/igb_main.c > @@ -3194,8 +3194,6 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) > if (err) > goto err_pci_reg; > > - pci_enable_pcie_error_reporting(pdev); > - > pci_set_master(pdev); > pci_save_state(pdev); > > @@ -3626,7 +3624,6 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) > err_ioremap: > free_netdev(netdev); > err_alloc_etherdev: > - pci_disable_pcie_error_reporting(pdev); > pci_release_mem_regions(pdev); > err_pci_reg: > err_dma: > @@ -3837,8 +3834,6 @@ static void igb_remove(struct pci_dev *pdev) > kfree(adapter->shadow_vfta); > free_netdev(netdev); > > - pci_disable_pcie_error_reporting(pdev); > - > pci_disable_device(pdev); > } >
> -----Original Message----- > From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of > Bjorn Helgaas > Sent: Thursday, January 19, 2023 5:16 AM > To: linux-pci@vger.kernel.org > Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Brandeburg, > Jesse <jesse.brandeburg@intel.com>; intel-wired-lan@lists.osuosl.org; Bjorn > Helgaas <bhelgaas@google.com>; Nguyen, Anthony L > <anthony.l.nguyen@intel.com> > Subject: [Intel-wired-lan] [PATCH 7/9] igb: Remove redundant > pci_enable_pcie_error_reporting() > > From: Bjorn Helgaas <bhelgaas@google.com> > > 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. > > 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 doesn't control interrupt generation by the Root Port; that is > controlled by the AER Root Error Command register, which is managed by the > AER service driver. > > Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> > Cc: Jesse Brandeburg <jesse.brandeburg@intel.com> > Cc: Tony Nguyen <anthony.l.nguyen@intel.com> > Cc: intel-wired-lan@lists.osuosl.org > Cc: netdev@vger.kernel.org > --- > drivers/net/ethernet/intel/igb/igb_main.c | 5 ----- > 1 file changed, 5 deletions(-) > Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 3c0c35ecea10..c56b991fa610 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -3194,8 +3194,6 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) if (err) goto err_pci_reg; - pci_enable_pcie_error_reporting(pdev); - pci_set_master(pdev); pci_save_state(pdev); @@ -3626,7 +3624,6 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) err_ioremap: free_netdev(netdev); err_alloc_etherdev: - pci_disable_pcie_error_reporting(pdev); pci_release_mem_regions(pdev); err_pci_reg: err_dma: @@ -3837,8 +3834,6 @@ static void igb_remove(struct pci_dev *pdev) kfree(adapter->shadow_vfta); free_netdev(netdev); - pci_disable_pcie_error_reporting(pdev); - pci_disable_device(pdev); }