From patchwork Tue Mar 7 18:28:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 660378 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 F01A4C678D4 for ; Tue, 7 Mar 2023 18:38:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233029AbjCGSiz (ORCPT ); Tue, 7 Mar 2023 13:38:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232821AbjCGSig (ORCPT ); Tue, 7 Mar 2023 13:38:36 -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 355EDA226B; Tue, 7 Mar 2023 10:30:07 -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 E4138B819C2; Tue, 7 Mar 2023 18:29:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7AE31C4339C; Tue, 7 Mar 2023 18:29:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678213749; bh=5BE9wZCtaDseXu0/Lv+W7WCLDoimdI41Hg2fMs8HhDA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A+QWpy5vzZ9/X3juu/fwf9cVoeaZqgxgUo3SAVMRWvYy2BXQA8ukuCt/CITD93mzl rGRACDKas4jH63jQpx2P3iqRMboehcUDh3Dp1QeWzku9yTa1e4b76VexBRJbSdAbpY z4cNtBYASorZ35SwDq3RcXProMs8qZ7s+7IaspemytoPzgI7nns8XNTadaAqLKIfpI vPYYUsTOL+GU5aafA3VhoMLb2HZu5lFUYUIjJtyF3Wy3WlBkLrCgjHnhvRQIEMicyy A1SFf2YukrqvJKeyoGfCOY35fhyAZtTe28Ww2t0Mf44DTtQXOy5J769iniV3zK8CPP qc0J5lpcBPI5g== From: Bjorn Helgaas To: "James E . J . Bottomley" , "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Helgaas , Nilesh Javali , Manish Rangankar , GR-QLogic-Storage-Upstream@marvell.com Subject: [PATCH 10/10] scsi: qla4xxx: Drop redundant pci_enable_pcie_error_reporting() Date: Tue, 7 Mar 2023 12:28:42 -0600 Message-Id: <20230307182842.870378-11-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: Nilesh Javali Cc: Manish Rangankar Cc: GR-QLogic-Storage-Upstream@marvell.com --- drivers/scsi/qla4xxx/ql4_def.h | 1 - drivers/scsi/qla4xxx/ql4_os.c | 4 ---- 2 files changed, 5 deletions(-) diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h index 5f82c8afd5e0..5e683ba49fa5 100644 --- a/drivers/scsi/qla4xxx/ql4_def.h +++ b/drivers/scsi/qla4xxx/ql4_def.h @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 005502125b27..ee6d784c095c 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -8639,8 +8639,6 @@ static int qla4xxx_probe_adapter(struct pci_dev *pdev, ha->host_no = host->host_no; ha->func_num = PCI_FUNC(ha->pdev->devfn); - pci_enable_pcie_error_reporting(pdev); - /* Setup Runtime configurable options */ if (is_qla8022(ha)) { ha->isp_ops = &qla4_82xx_isp_ops; @@ -8867,7 +8865,6 @@ static int qla4xxx_probe_adapter(struct pci_dev *pdev, qla4xxx_free_adapter(ha); probe_failed_ioconfig: - pci_disable_pcie_error_reporting(pdev); scsi_host_put(ha->host); probe_disable_device: @@ -9022,7 +9019,6 @@ static void qla4xxx_remove_adapter(struct pci_dev *pdev) scsi_host_put(ha->host); - pci_disable_pcie_error_reporting(pdev); pci_disable_device(pdev); }