From patchwork Tue Mar 7 18:28:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 660956 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 6D13BC678DB for ; Tue, 7 Mar 2023 18:55:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231359AbjCGSzH (ORCPT ); Tue, 7 Mar 2023 13:55:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233478AbjCGSyd (ORCPT ); Tue, 7 Mar 2023 13:54:33 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2D01A5F6; Tue, 7 Mar 2023 10:42:21 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 9371561538; Tue, 7 Mar 2023 18:29:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC636C4339E; Tue, 7 Mar 2023 18:29:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678213746; bh=3BwaxeqR5K9UM6t70G9A7Zg8LXyh/lE1LnqW0l4i6Jk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pBDFXwGmb4NbFsnOLQNVjKfCxYBZQe6gNNlsx3x0rX+hVweeeTXZ9n6hO3ziosB6x WU0LRWK1gsud8ozmdXQVhaBQkzv5y6PwpV6rYIqxIU67i7XF2MAtI1v8CxbYHhOmh5 C2umXRpwPBPBw1hSxq2Q/Z/SB64Hkq4HpHnVsEmHpPPxn0pBRlCEI9GQ+qke617Epq Y+IpQ4mEHCEcdVsUjeLIGyYTAmmQalsQyGpejG5L22UcUdGDUJokGMhTC/s48i8ckt nRccsUU1YJ8NJn+8Y51wKPN23u+xDU4mdtFb6FEUoepcrTHyx0BWAkKd+Bk5wbROKT 3p+pYSz9Q3OLA== From: Bjorn Helgaas To: "James E . J . Bottomley" , "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Helgaas , Sathya Prakash , Sreekanth Reddy , Suganath Prabu Subramani , MPT-FusionLinux.pdl@broadcom.com Subject: [PATCH 08/10] scsi: mpt3sas: Drop redundant pci_enable_pcie_error_reporting() Date: Tue, 7 Mar 2023 12:28:40 -0600 Message-Id: <20230307182842.870378-9-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: Sathya Prakash Cc: Sreekanth Reddy Cc: Suganath Prabu Subramani Cc: MPT-FusionLinux.pdl@broadcom.com --- drivers/scsi/mpt3sas/mpt3sas_base.c | 5 ----- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 1 - 2 files changed, 6 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 2ee9ea57554d..a8b260f46796 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -60,7 +60,6 @@ #include #include #include /* To get host page size per arch */ -#include #include "mpt3sas_base.h" @@ -3535,7 +3534,6 @@ mpt3sas_base_unmap_resources(struct MPT3SAS_ADAPTER *ioc) if (pci_is_enabled(pdev)) { pci_release_selected_regions(ioc->pdev, ioc->bars); - pci_disable_pcie_error_reporting(pdev); pci_disable_device(pdev); } } @@ -3615,9 +3613,6 @@ mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc) goto out_fail; } -/* AER (Advanced Error Reporting) hooks */ - pci_enable_pcie_error_reporting(pdev); - pci_set_master(pdev); diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index 8e24ebcebfe5..e2f09833659f 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -52,7 +52,6 @@ #include #include #include -#include #include #include #include