From patchwork Tue Mar 7 18:28:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 660372 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 AF78BC678D4 for ; Tue, 7 Mar 2023 18:56:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233512AbjCGS4b (ORCPT ); Tue, 7 Mar 2023 13:56:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233513AbjCGS4O (ORCPT ); Tue, 7 Mar 2023 13:56:14 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88EA69749E; Tue, 7 Mar 2023 10:43:42 -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 A6799CE1C79; Tue, 7 Mar 2023 18:28:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0F30C433D2; Tue, 7 Mar 2023 18:28:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678213736; bh=3JdjywG6DsWfWzdvnLIaNQak/6ZVrelHGxK1Jb+bRtg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tvRTfYfCSLh/IziCDBzjHgXEvc0lyIja1XSjGQKUO6wnvdwH8JANNu7u651awRvem hX5/li75IpG+veKKl+988VGOcqNgjqGj2szYqfWShD4a60S0cOc5bMXjQXXB2AmBGA l83ZS7yFYNEUhHdcG3ElFzNtSZ6Brkz2aypJJlzaEliKmpXpNL3468i81xyqPf/YzM Frtn4G9z1RuT4gS95ggjuZd7qysoazZFtCzU0onGYJDUASzG0LV9OjaJ0e6wp7Bwgb +C/VVR/nFuAKNdQt1u/4ycjYeu2cL2OZTqGBKuAHNqluODtPXf6hVfQXMdjXt6+oMv 7CUHbBrFoQL7Q== From: Bjorn Helgaas To: "James E . J . Bottomley" , "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Helgaas , Ketan Mukadam Subject: [PATCH 03/10] scsi: be2iscsi: Drop redundant pci_enable_pcie_error_reporting() Date: Tue, 7 Mar 2023 12:28:35 -0600 Message-Id: <20230307182842.870378-4-helgaas@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230307182842.870378-1-helgaas@kernel.org> References: <20230307182842.870378-1-helgaas@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@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: Ketan Mukadam --- drivers/scsi/be2iscsi/be_main.c | 9 --------- drivers/scsi/be2iscsi/be_main.h | 1 - 2 files changed, 10 deletions(-) diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index 50a577ac3bb4..0aaf6fc47683 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -5545,13 +5545,6 @@ static int beiscsi_dev_probe(struct pci_dev *pcidev, goto disable_pci; } - /* Enable EEH reporting */ - ret = pci_enable_pcie_error_reporting(pcidev); - if (ret) - beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_INIT, - "BM_%d : PCIe Error Reporting " - "Enabling Failed\n"); - pci_save_state(pcidev); /* Initialize Driver configuration Paramters */ @@ -5736,7 +5729,6 @@ static int beiscsi_dev_probe(struct pci_dev *pcidev, pci_disable_msix(phba->pcidev); pci_dev_put(phba->pcidev); iscsi_host_free(phba->shost); - pci_disable_pcie_error_reporting(pcidev); pci_set_drvdata(pcidev, NULL); disable_pci: pci_release_regions(pcidev); @@ -5779,7 +5771,6 @@ static void beiscsi_remove(struct pci_dev *pcidev) pci_dev_put(phba->pcidev); iscsi_host_free(phba->shost); - pci_disable_pcie_error_reporting(pcidev); pci_set_drvdata(pcidev, NULL); pci_release_regions(pcidev); pci_disable_device(pcidev); diff --git a/drivers/scsi/be2iscsi/be_main.h b/drivers/scsi/be2iscsi/be_main.h index 98977c0700f1..71c95d144560 100644 --- a/drivers/scsi/be2iscsi/be_main.h +++ b/drivers/scsi/be2iscsi/be_main.h @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include