linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] PCI/AER: Remove redundant Device Control Error Reporting Enable
@ 2023-03-07 18:28 Bjorn Helgaas
  2023-03-07 18:28 ` [PATCH 01/10] scsi: aacraid: Drop redundant pci_enable_pcie_error_reporting() Bjorn Helgaas
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Bjorn Helgaas @ 2023-03-07 18:28 UTC (permalink / raw)
  To: James E . J . Bottomley, Martin K . Petersen
  Cc: linux-scsi, linux-kernel, Bjorn Helgaas, Anil Gurumurthy,
	Dick Kennedy, Don Brace, James Smart, Johannes Thumshirn,
	Ketan Mukadam, Manish Rangankar, Nilesh Javali,
	Raghava Aditya Renukunta, Sathya Prakash, Sreekanth Reddy,
	Sudarsana Kalluru, Suganath Prabu Subramani, Tomas Henzl,
	Adaptec OEM Raid Solutions, GR-QLogic-Storage-Upstream,
	MPT-FusionLinux.pdl, storagedev

From: Bjorn Helgaas <bhelgaas@google.com>

Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"),
which appeared in v6.0, the PCI core has enabled PCIe error reporting for
all devices during enumeration.

Remove driver code to do this and remove unnecessary includes of
<linux/aer.h> from several other drivers.

Bjorn Helgaas (10):
  scsi: aacraid: Drop redundant pci_enable_pcie_error_reporting()
  scsi: arcmsr: Remove unnecessary aer.h include
  scsi: be2iscsi: Drop redundant pci_enable_pcie_error_reporting()
  scsi: bfa: Drop redundant pci_enable_pcie_error_reporting()
  scsi: csiostor: Remove unnecessary aer.h include
  scsi: hpsa: Remove unnecessary pci_disable_pcie_error_reporting()
    comment
  scsi: lpfc: Drop redundant pci_enable_pcie_error_reporting()
  scsi: mpt3sas: Drop redundant pci_enable_pcie_error_reporting()
  scsi: qla2xxx: Drop redundant pci_enable_pcie_error_reporting()
  scsi: qla4xxx: Drop redundant pci_enable_pcie_error_reporting()

 drivers/scsi/aacraid/linit.c         |  3 -
 drivers/scsi/arcmsr/arcmsr_hba.c     |  1 -
 drivers/scsi/be2iscsi/be_main.c      |  9 ---
 drivers/scsi/be2iscsi/be_main.h      |  1 -
 drivers/scsi/bfa/bfad.c              |  6 --
 drivers/scsi/bfa/bfad_drv.h          |  1 -
 drivers/scsi/csiostor/csio_init.c    |  1 -
 drivers/scsi/hpsa.c                  |  1 -
 drivers/scsi/lpfc/lpfc.h             |  2 -
 drivers/scsi/lpfc/lpfc_attr.c        | 96 ++++++++--------------------
 drivers/scsi/lpfc/lpfc_init.c        |  1 -
 drivers/scsi/lpfc/lpfc_sli.c         | 55 ----------------
 drivers/scsi/mpt3sas/mpt3sas_base.c  |  5 --
 drivers/scsi/mpt3sas/mpt3sas_scsih.c |  1 -
 drivers/scsi/qla2xxx/qla_def.h       |  1 -
 drivers/scsi/qla2xxx/qla_os.c        |  6 --
 drivers/scsi/qla4xxx/ql4_def.h       |  1 -
 drivers/scsi/qla4xxx/ql4_os.c        |  4 --
 18 files changed, 27 insertions(+), 168 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 01/10] scsi: aacraid: Drop redundant pci_enable_pcie_error_reporting()
  2023-03-07 18:28 [PATCH 00/10] PCI/AER: Remove redundant Device Control Error Reporting Enable Bjorn Helgaas
@ 2023-03-07 18:28 ` Bjorn Helgaas
  2023-03-07 18:28 ` [PATCH 02/10] scsi: arcmsr: Remove unnecessary aer.h include Bjorn Helgaas
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Bjorn Helgaas @ 2023-03-07 18:28 UTC (permalink / raw)
  To: James E . J . Bottomley, Martin K . Petersen
  Cc: linux-scsi, linux-kernel, Bjorn Helgaas,
	Adaptec OEM Raid Solutions, Raghava Aditya Renukunta,
	Tomas Henzl, Johannes Thumshirn

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, so the
driver doesn't need to do it itself.

Remove the redundant pci_enable_pcie_error_reporting() call from the
driver.

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.

Also remove pci_disable_pcie_error_reporting() from the .error_detected()
path, which was added by 5c63f7f710bd ("aacraid: Added EEH support") but
looks unnecessary.  Error reporting will be disabled by the device reset
and will be re-enabled by the pci_restore_state() in aac_pci_slot_reset().

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Adaptec OEM Raid Solutions <aacraid@microsemi.com>
Cc: Raghava Aditya Renukunta <raghavaaditya.renukunta@pmcs.com>
Cc: Tomas Henzl <thenzl@redhat.com>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
---
 drivers/scsi/aacraid/linit.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 5ba5c18b77b4..43160bf4d6a8 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -26,7 +26,6 @@
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/pci.h>
-#include <linux/aer.h>
 #include <linux/slab.h>
 #include <linux/mutex.h>
 #include <linux/spinlock.h>
@@ -1783,7 +1782,6 @@ static int aac_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
 
 	aac_scan_host(aac);
 
-	pci_enable_pcie_error_reporting(pdev);
 	pci_save_state(pdev);
 
 	return 0;
@@ -1949,7 +1947,6 @@ static pci_ers_result_t aac_pci_error_detected(struct pci_dev *pdev,
 		scsi_host_complete_all_commands(shost, DID_NO_CONNECT);
 		aac_release_resources(aac);
 
-		pci_disable_pcie_error_reporting(pdev);
 		aac_adapter_ioremap(aac, 0);
 
 		return PCI_ERS_RESULT_NEED_RESET;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 02/10] scsi: arcmsr: Remove unnecessary aer.h include
  2023-03-07 18:28 [PATCH 00/10] PCI/AER: Remove redundant Device Control Error Reporting Enable Bjorn Helgaas
  2023-03-07 18:28 ` [PATCH 01/10] scsi: aacraid: Drop redundant pci_enable_pcie_error_reporting() Bjorn Helgaas
@ 2023-03-07 18:28 ` Bjorn Helgaas
  2023-03-07 18:28 ` [PATCH 03/10] scsi: be2iscsi: Drop redundant pci_enable_pcie_error_reporting() Bjorn Helgaas
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Bjorn Helgaas @ 2023-03-07 18:28 UTC (permalink / raw)
  To: James E . J . Bottomley, Martin K . Petersen
  Cc: linux-scsi, linux-kernel, Bjorn Helgaas

From: Bjorn Helgaas <bhelgaas@google.com>

<linux/aer.h> is unused, so remove it.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/scsi/arcmsr/arcmsr_hba.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c
index d3fb8a9c1c39..9d04cb6e62fa 100644
--- a/drivers/scsi/arcmsr/arcmsr_hba.c
+++ b/drivers/scsi/arcmsr/arcmsr_hba.c
@@ -57,7 +57,6 @@
 #include <linux/timer.h>
 #include <linux/slab.h>
 #include <linux/pci.h>
-#include <linux/aer.h>
 #include <linux/circ_buf.h>
 #include <asm/dma.h>
 #include <asm/io.h>
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 03/10] scsi: be2iscsi: Drop redundant pci_enable_pcie_error_reporting()
  2023-03-07 18:28 [PATCH 00/10] PCI/AER: Remove redundant Device Control Error Reporting Enable Bjorn Helgaas
  2023-03-07 18:28 ` [PATCH 01/10] scsi: aacraid: Drop redundant pci_enable_pcie_error_reporting() Bjorn Helgaas
  2023-03-07 18:28 ` [PATCH 02/10] scsi: arcmsr: Remove unnecessary aer.h include Bjorn Helgaas
@ 2023-03-07 18:28 ` Bjorn Helgaas
  2023-03-07 18:28 ` [PATCH 04/10] scsi: bfa: " Bjorn Helgaas
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Bjorn Helgaas @ 2023-03-07 18:28 UTC (permalink / raw)
  To: James E . J . Bottomley, Martin K . Petersen
  Cc: linux-scsi, linux-kernel, Bjorn Helgaas, Ketan Mukadam

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, 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 <bhelgaas@google.com>
Cc: Ketan Mukadam <ketan.mukadam@broadcom.com>
---
 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 <linux/in.h>
 #include <linux/ctype.h>
 #include <linux/module.h>
-#include <linux/aer.h>
 #include <scsi/scsi.h>
 #include <scsi/scsi_cmnd.h>
 #include <scsi/scsi_device.h>
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 04/10] scsi: bfa: Drop redundant pci_enable_pcie_error_reporting()
  2023-03-07 18:28 [PATCH 00/10] PCI/AER: Remove redundant Device Control Error Reporting Enable Bjorn Helgaas
                   ` (2 preceding siblings ...)
  2023-03-07 18:28 ` [PATCH 03/10] scsi: be2iscsi: Drop redundant pci_enable_pcie_error_reporting() Bjorn Helgaas
@ 2023-03-07 18:28 ` Bjorn Helgaas
  2023-03-07 18:28 ` [PATCH 05/10] scsi: csiostor: Remove unnecessary aer.h include Bjorn Helgaas
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Bjorn Helgaas @ 2023-03-07 18:28 UTC (permalink / raw)
  To: James E . J . Bottomley, Martin K . Petersen
  Cc: linux-scsi, linux-kernel, Bjorn Helgaas, Anil Gurumurthy,
	Sudarsana Kalluru

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, 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 <bhelgaas@google.com>
Cc: Anil Gurumurthy <anil.gurumurthy@qlogic.com>
Cc: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com>
---
 drivers/scsi/bfa/bfad.c     | 6 ------
 drivers/scsi/bfa/bfad_drv.h | 1 -
 2 files changed, 7 deletions(-)

diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c
index e5aa982ffedc..529b73a83d69 100644
--- a/drivers/scsi/bfa/bfad.c
+++ b/drivers/scsi/bfa/bfad.c
@@ -738,9 +738,6 @@ bfad_pci_init(struct pci_dev *pdev, struct bfad_s *bfad)
 		goto out_release_region;
 	}
 
-	/* Enable PCIE Advanced Error Recovery (AER) if kernel supports */
-	pci_enable_pcie_error_reporting(pdev);
-
 	bfad->pci_bar0_kva = pci_iomap(pdev, 0, pci_resource_len(pdev, 0));
 	bfad->pci_bar2_kva = pci_iomap(pdev, 2, pci_resource_len(pdev, 2));
 
@@ -801,8 +798,6 @@ bfad_pci_uninit(struct pci_dev *pdev, struct bfad_s *bfad)
 	pci_iounmap(pdev, bfad->pci_bar0_kva);
 	pci_iounmap(pdev, bfad->pci_bar2_kva);
 	pci_release_regions(pdev);
-	/* Disable PCIE Advanced Error Recovery (AER) */
-	pci_disable_pcie_error_reporting(pdev);
 	pci_disable_device(pdev);
 }
 
@@ -1562,7 +1557,6 @@ bfad_pci_slot_reset(struct pci_dev *pdev)
 	if (restart_bfa(bfad) == -1)
 		goto out_disable_device;
 
-	pci_enable_pcie_error_reporting(pdev);
 	dev_printk(KERN_WARNING, &pdev->dev,
 		   "slot_reset completed  flags: 0x%x!\n", bfad->bfad_flags);
 
diff --git a/drivers/scsi/bfa/bfad_drv.h b/drivers/scsi/bfa/bfad_drv.h
index eaee7c8bc2d2..7682cfa34265 100644
--- a/drivers/scsi/bfa/bfad_drv.h
+++ b/drivers/scsi/bfa/bfad_drv.h
@@ -30,7 +30,6 @@
 #include <linux/vmalloc.h>
 #include <linux/workqueue.h>
 #include <linux/bitops.h>
-#include <linux/aer.h>
 #include <scsi/scsi.h>
 #include <scsi/scsi_host.h>
 #include <scsi/scsi_tcq.h>
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 05/10] scsi: csiostor: Remove unnecessary aer.h include
  2023-03-07 18:28 [PATCH 00/10] PCI/AER: Remove redundant Device Control Error Reporting Enable Bjorn Helgaas
                   ` (3 preceding siblings ...)
  2023-03-07 18:28 ` [PATCH 04/10] scsi: bfa: " Bjorn Helgaas
@ 2023-03-07 18:28 ` Bjorn Helgaas
  2023-03-07 18:28 ` [PATCH 06/10] scsi: hpsa: Remove unnecessary pci_disable_pcie_error_reporting() comment Bjorn Helgaas
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Bjorn Helgaas @ 2023-03-07 18:28 UTC (permalink / raw)
  To: James E . J . Bottomley, Martin K . Petersen
  Cc: linux-scsi, linux-kernel, Bjorn Helgaas

From: Bjorn Helgaas <bhelgaas@google.com>

<linux/aer.h> is unused, so remove it.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/scsi/csiostor/csio_init.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/scsi/csiostor/csio_init.c b/drivers/scsi/csiostor/csio_init.c
index ccbded3353bd..0c32faefad7c 100644
--- a/drivers/scsi/csiostor/csio_init.c
+++ b/drivers/scsi/csiostor/csio_init.c
@@ -38,7 +38,6 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/pci.h>
-#include <linux/aer.h>
 #include <linux/mm.h>
 #include <linux/notifier.h>
 #include <linux/kdebug.h>
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 06/10] scsi: hpsa: Remove unnecessary pci_disable_pcie_error_reporting() comment
  2023-03-07 18:28 [PATCH 00/10] PCI/AER: Remove redundant Device Control Error Reporting Enable Bjorn Helgaas
                   ` (4 preceding siblings ...)
  2023-03-07 18:28 ` [PATCH 05/10] scsi: csiostor: Remove unnecessary aer.h include Bjorn Helgaas
@ 2023-03-07 18:28 ` Bjorn Helgaas
  2023-03-07 18:28 ` [PATCH 07/10] scsi: lpfc: Drop redundant pci_enable_pcie_error_reporting() Bjorn Helgaas
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Bjorn Helgaas @ 2023-03-07 18:28 UTC (permalink / raw)
  To: James E . J . Bottomley, Martin K . Petersen
  Cc: linux-scsi, linux-kernel, Bjorn Helgaas, Don Brace, storagedev

From: Bjorn Helgaas <bhelgaas@google.com>

105a3dbc7452 ("hpsa: clean up driver init") added a comment about
pci_disable_pcie_error_reporting(), but hpsa has never called either
pci_enable_pcie_error_reporting() or pci_disable_pcie_error_reporting().

Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is
native"), the PCI core is responsible for managing PCIe device error
reporting.

Remove the comment about pci_disable_pcie_error_reporting().

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Don Brace <don.brace@microchip.com>
Cc: storagedev@microchip.com
---
 drivers/scsi/hpsa.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index f6da34850af9..fec7e17747f7 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -9108,7 +9108,6 @@ static void hpsa_remove_one(struct pci_dev *pdev)
 
 	free_percpu(h->lockup_detected);		/* init_one 2 */
 	h->lockup_detected = NULL;			/* init_one 2 */
-	/* (void) pci_disable_pcie_error_reporting(pdev); */	/* init_one 1 */
 
 	hpda_free_ctlr_info(h);				/* init_one 1 */
 }
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 07/10] scsi: lpfc: Drop redundant pci_enable_pcie_error_reporting()
  2023-03-07 18:28 [PATCH 00/10] PCI/AER: Remove redundant Device Control Error Reporting Enable Bjorn Helgaas
                   ` (5 preceding siblings ...)
  2023-03-07 18:28 ` [PATCH 06/10] scsi: hpsa: Remove unnecessary pci_disable_pcie_error_reporting() comment Bjorn Helgaas
@ 2023-03-07 18:28 ` Bjorn Helgaas
  2023-03-07 18:28 ` [PATCH 08/10] scsi: mpt3sas: " Bjorn Helgaas
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Bjorn Helgaas @ 2023-03-07 18:28 UTC (permalink / raw)
  To: James E . J . Bottomley, Martin K . Petersen
  Cc: linux-scsi, linux-kernel, Bjorn Helgaas, James Smart, Dick Kennedy

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, 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 <bhelgaas@google.com>
Cc: James Smart <james.smart@broadcom.com>
Cc: Dick Kennedy <dick.kennedy@broadcom.com>
---
 drivers/scsi/lpfc/lpfc.h      |  2 -
 drivers/scsi/lpfc/lpfc_attr.c | 96 ++++++++++-------------------------
 drivers/scsi/lpfc/lpfc_init.c |  1 -
 drivers/scsi/lpfc/lpfc_sli.c  | 55 --------------------
 4 files changed, 27 insertions(+), 127 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
index cf55f8e3bd9f..5e3a93d13a91 100644
--- a/drivers/scsi/lpfc/lpfc.h
+++ b/drivers/scsi/lpfc/lpfc.h
@@ -1036,7 +1036,6 @@ struct lpfc_hba {
 #define FCF_TS_INPROG           0x200 /* FCF table scan in progress */
 #define FCF_RR_INPROG           0x400 /* FCF roundrobin flogi in progress */
 #define HBA_FIP_SUPPORT		0x800 /* FIP support in HBA */
-#define HBA_AER_ENABLED		0x1000 /* AER enabled with HBA */
 #define HBA_DEVLOSS_TMO         0x2000 /* HBA in devloss timeout */
 #define HBA_RRQ_ACTIVE		0x4000 /* process the rrq active list */
 #define HBA_IOQ_FLUSH		0x8000 /* FCP/NVME I/O queues being flushed */
@@ -1190,7 +1189,6 @@ struct lpfc_hba {
 #define LPFC_MAX_ENBL_FC4_TYPE LPFC_ENABLE_FCP
 #define LPFC_DEF_ENBL_FC4_TYPE LPFC_ENABLE_FCP
 #endif
-	uint32_t cfg_aer_support;
 	uint32_t cfg_sriov_nr_virtfn;
 	uint32_t cfg_request_firmware_upgrade;
 	uint32_t cfg_suppress_link_up;
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index 22f2e046e8eb..5cc7b59b528f 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -4365,13 +4365,22 @@ static DEVICE_ATTR_RW(lpfc_link_speed);
 
 /*
 # lpfc_aer_support: Support PCIe device Advanced Error Reporting (AER)
-#       0  = aer disabled or not supported
 #       1  = aer supported and enabled (default)
-# Value range is [0,1]. Default value is 1.
+# PCIe error reporting is always enabled by the PCI core, so this always
+# shows 1.
+#
+# N.B. Parts of LPFC_ATTR open-coded since some of the underlying
+# infrastructure (phba->cfg_aer_support) is gone.
 */
-LPFC_ATTR(aer_support, 1, 0, 1,
-	"Enable PCIe device AER support");
-lpfc_param_show(aer_support)
+static uint lpfc_aer_support = 1;
+module_param(lpfc_aer_support, uint, S_IRUGO);
+MODULE_PARM_DESC(lpfc_aer_support, "Enable PCIe device AER support");
+static ssize_t
+lpfc_aer_support_show(struct device *dev, struct device_attribute *attr,
+		      char *buf)
+{
+	return scnprintf(buf, PAGE_SIZE, "%d\n", lpfc_aer_support);
+}
 
 /**
  * lpfc_aer_support_store - Set the adapter for aer support
@@ -4382,76 +4391,27 @@ lpfc_param_show(aer_support)
  * @count: unused variable.
  *
  * Description:
- * If the val is 1 and currently the device's AER capability was not
- * enabled, invoke the kernel's enable AER helper routine, trying to
- * enable the device's AER capability. If the helper routine enabling
- * AER returns success, update the device's cfg_aer_support flag to
- * indicate AER is supported by the device; otherwise, if the device
- * AER capability is already enabled to support AER, then do nothing.
- *
- * If the val is 0 and currently the device's AER support was enabled,
- * invoke the kernel's disable AER helper routine. After that, update
- * the device's cfg_aer_support flag to indicate AER is not supported
- * by the device; otherwise, if the device AER capability is already
- * disabled from supporting AER, then do nothing.
+ * PCIe error reporting is enabled by the PCI core, so drivers don't need
+ * to do anything.  Retain this interface for backwards compatibility,
+ * but do nothing.
  *
  * Returns:
- * length of the buf on success if val is in range the intended mode
- * is supported.
- * -EINVAL if val out of range or intended mode is not supported.
+ * length of the buf on success
+ * -EINVAL if val out of range
  **/
 static ssize_t
 lpfc_aer_support_store(struct device *dev, struct device_attribute *attr,
 		       const char *buf, size_t count)
 {
-	struct Scsi_Host *shost = class_to_shost(dev);
-	struct lpfc_vport *vport = (struct lpfc_vport *)shost->hostdata;
-	struct lpfc_hba *phba = vport->phba;
-	int val = 0, rc = -EINVAL;
+	int val = 0;
 
 	if (!isdigit(buf[0]))
 		return -EINVAL;
 	if (sscanf(buf, "%i", &val) != 1)
 		return -EINVAL;
 
-	switch (val) {
-	case 0:
-		if (phba->hba_flag & HBA_AER_ENABLED) {
-			rc = pci_disable_pcie_error_reporting(phba->pcidev);
-			if (!rc) {
-				spin_lock_irq(&phba->hbalock);
-				phba->hba_flag &= ~HBA_AER_ENABLED;
-				spin_unlock_irq(&phba->hbalock);
-				phba->cfg_aer_support = 0;
-				rc = strlen(buf);
-			} else
-				rc = -EPERM;
-		} else {
-			phba->cfg_aer_support = 0;
-			rc = strlen(buf);
-		}
-		break;
-	case 1:
-		if (!(phba->hba_flag & HBA_AER_ENABLED)) {
-			rc = pci_enable_pcie_error_reporting(phba->pcidev);
-			if (!rc) {
-				spin_lock_irq(&phba->hbalock);
-				phba->hba_flag |= HBA_AER_ENABLED;
-				spin_unlock_irq(&phba->hbalock);
-				phba->cfg_aer_support = 1;
-				rc = strlen(buf);
-			} else
-				 rc = -EPERM;
-		} else {
-			phba->cfg_aer_support = 1;
-			rc = strlen(buf);
-		}
-		break;
-	default:
-		rc = -EINVAL;
-		break;
-	}
-	return rc;
+	dev_info_once(dev, "PCIe error reporting automatically enabled by the PCI core; sysfs write ignored\n");
+	return strlen(buf);
 }
 
 static DEVICE_ATTR_RW(lpfc_aer_support);
@@ -4464,16 +4424,16 @@ static DEVICE_ATTR_RW(lpfc_aer_support);
  * @count: unused variable.
  *
  * Description:
- * If the @buf contains 1 and the device currently has the AER support
- * enabled, then invokes the kernel AER helper routine
+ * If the @buf contains 1, invokes the kernel AER helper routine
  * pci_aer_clear_nonfatal_status() to clean up the uncorrectable
  * error status register.
  *
  * Notes:
  *
  * Returns:
- * -EINVAL if the buf does not contain the 1 or the device is not currently
- * enabled with the AER support.
+ * -EINVAL if the buf does not contain 1
+ * -EPERM if the OS cannot clear AER error status, i.e., when platform
+ * firmware owns the AER Capability
  **/
 static ssize_t
 lpfc_aer_cleanup_state(struct device *dev, struct device_attribute *attr,
@@ -4491,8 +4451,7 @@ lpfc_aer_cleanup_state(struct device *dev, struct device_attribute *attr,
 	if (val != 1)
 		return -EINVAL;
 
-	if (phba->hba_flag & HBA_AER_ENABLED)
-		rc = pci_aer_clear_nonfatal_status(phba->pcidev);
+	rc = pci_aer_clear_nonfatal_status(phba->pcidev);
 
 	if (rc == 0)
 		return strlen(buf);
@@ -7277,7 +7236,6 @@ lpfc_get_cfgparam(struct lpfc_hba *phba)
 
 	lpfc_sg_seg_cnt_init(phba, lpfc_sg_seg_cnt);
 	lpfc_hba_queue_depth_init(phba, lpfc_hba_queue_depth);
-	lpfc_aer_support_init(phba, lpfc_aer_support);
 	lpfc_sriov_nr_virtfn_init(phba, lpfc_sriov_nr_virtfn);
 	lpfc_request_firmware_upgrade_init(phba, lpfc_req_fw_upgrade);
 	lpfc_suppress_link_up_init(phba, lpfc_suppress_link_up);
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 61958a24a43d..d3d4477dd472 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -32,7 +32,6 @@
 #include <linux/spinlock.h>
 #include <linux/sched/clock.h>
 #include <linux/ctype.h>
-#include <linux/aer.h>
 #include <linux/slab.h>
 #include <linux/firmware.h>
 #include <linux/miscdevice.h>
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index c5b69f313af3..b2294e638e29 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -34,7 +34,6 @@
 #include <scsi/scsi_host.h>
 #include <scsi/scsi_transport_fc.h>
 #include <scsi/fc/fc_fs.h>
-#include <linux/aer.h>
 #include <linux/crash_dump.h>
 #ifdef CONFIG_X86
 #include <asm/set_memory.h>
@@ -5204,13 +5203,9 @@ lpfc_sli_brdrestart_s3(struct lpfc_hba *phba)
 	volatile struct MAILBOX_word0 mb;
 	struct lpfc_sli *psli;
 	void __iomem *to_slim;
-	uint32_t hba_aer_enabled;
 
 	spin_lock_irq(&phba->hbalock);
 
-	/* Take PCIe device Advanced Error Reporting (AER) state */
-	hba_aer_enabled = phba->hba_flag & HBA_AER_ENABLED;
-
 	psli = &phba->sli;
 
 	/* Restart HBA */
@@ -5251,10 +5246,6 @@ lpfc_sli_brdrestart_s3(struct lpfc_hba *phba)
 	/* Give the INITFF and Post time to settle. */
 	mdelay(100);
 
-	/* Reset HBA AER if it was enabled, note hba_flag was reset above */
-	if (hba_aer_enabled)
-		pci_disable_pcie_error_reporting(phba->pcidev);
-
 	lpfc_hba_down_post(phba);
 
 	return 0;
@@ -5273,7 +5264,6 @@ static int
 lpfc_sli_brdrestart_s4(struct lpfc_hba *phba)
 {
 	struct lpfc_sli *psli = &phba->sli;
-	uint32_t hba_aer_enabled;
 	int rc;
 
 	/* Restart HBA */
@@ -5281,9 +5271,6 @@ lpfc_sli_brdrestart_s4(struct lpfc_hba *phba)
 			"0296 Restart HBA Data: x%x x%x\n",
 			phba->pport->port_state, psli->sli_flag);
 
-	/* Take PCIe device Advanced Error Reporting (AER) state */
-	hba_aer_enabled = phba->hba_flag & HBA_AER_ENABLED;
-
 	rc = lpfc_sli4_brdreset(phba);
 	if (rc) {
 		phba->link_state = LPFC_HBA_ERROR;
@@ -5301,10 +5288,6 @@ lpfc_sli_brdrestart_s4(struct lpfc_hba *phba)
 	memset(&psli->lnk_stat_offsets, 0, sizeof(psli->lnk_stat_offsets));
 	psli->stats_start = ktime_get_seconds();
 
-	/* Reset HBA AER if it was enabled, note hba_flag was reset above */
-	if (hba_aer_enabled)
-		pci_disable_pcie_error_reporting(phba->pcidev);
-
 hba_down_queue:
 	lpfc_hba_down_post(phba);
 	lpfc_sli4_queue_destroy(phba);
@@ -5725,25 +5708,6 @@ lpfc_sli_hba_setup(struct lpfc_hba *phba)
 	}
 	phba->fcp_embed_io = 0;	/* SLI4 FC support only */
 
-	/* Enable PCIe device Advanced Error Reporting (AER) if configured */
-	if (phba->cfg_aer_support == 1 && !(phba->hba_flag & HBA_AER_ENABLED)) {
-		rc = pci_enable_pcie_error_reporting(phba->pcidev);
-		if (!rc) {
-			lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
-					"2709 This device supports "
-					"Advanced Error Reporting (AER)\n");
-			spin_lock_irq(&phba->hbalock);
-			phba->hba_flag |= HBA_AER_ENABLED;
-			spin_unlock_irq(&phba->hbalock);
-		} else {
-			lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
-					"2708 This device does not support "
-					"Advanced Error Reporting (AER): %d\n",
-					rc);
-			phba->cfg_aer_support = 0;
-		}
-	}
-
 	if (phba->sli_rev == 3) {
 		phba->iocb_cmd_size = SLI3_IOCB_CMD_SIZE;
 		phba->iocb_rsp_size = SLI3_IOCB_RSP_SIZE;
@@ -9053,25 +9017,6 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba)
 	mod_timer(&phba->eratt_poll,
 		  jiffies + msecs_to_jiffies(1000 * phba->eratt_poll_interval));
 
-	/* Enable PCIe device Advanced Error Reporting (AER) if configured */
-	if (phba->cfg_aer_support == 1 && !(phba->hba_flag & HBA_AER_ENABLED)) {
-		rc = pci_enable_pcie_error_reporting(phba->pcidev);
-		if (!rc) {
-			lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
-					"2829 This device supports "
-					"Advanced Error Reporting (AER)\n");
-			spin_lock_irq(&phba->hbalock);
-			phba->hba_flag |= HBA_AER_ENABLED;
-			spin_unlock_irq(&phba->hbalock);
-		} else {
-			lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
-					"2830 This device does not support "
-					"Advanced Error Reporting (AER)\n");
-			phba->cfg_aer_support = 0;
-		}
-		rc = 0;
-	}
-
 	/*
 	 * The port is ready, set the host's link state to LINK_DOWN
 	 * in preparation for link interrupts.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 08/10] scsi: mpt3sas: Drop redundant pci_enable_pcie_error_reporting()
  2023-03-07 18:28 [PATCH 00/10] PCI/AER: Remove redundant Device Control Error Reporting Enable Bjorn Helgaas
                   ` (6 preceding siblings ...)
  2023-03-07 18:28 ` [PATCH 07/10] scsi: lpfc: Drop redundant pci_enable_pcie_error_reporting() Bjorn Helgaas
@ 2023-03-07 18:28 ` Bjorn Helgaas
  2023-03-07 18:28 ` [PATCH 09/10] scsi: qla2xxx: " Bjorn Helgaas
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Bjorn Helgaas @ 2023-03-07 18:28 UTC (permalink / raw)
  To: James E . J . Bottomley, Martin K . Petersen
  Cc: linux-scsi, linux-kernel, Bjorn Helgaas, Sathya Prakash,
	Sreekanth Reddy, Suganath Prabu Subramani, MPT-FusionLinux.pdl

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, 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 <bhelgaas@google.com>
Cc: Sathya Prakash <sathya.prakash@broadcom.com>
Cc: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Cc: Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>
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 <linux/ktime.h>
 #include <linux/kthread.h>
 #include <asm/page.h>        /* To get host page size per arch */
-#include <linux/aer.h>
 
 
 #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 <linux/delay.h>
 #include <linux/pci.h>
 #include <linux/interrupt.h>
-#include <linux/aer.h>
 #include <linux/raid_class.h>
 #include <linux/blk-mq-pci.h>
 #include <asm/unaligned.h>
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 09/10] scsi: qla2xxx: Drop redundant pci_enable_pcie_error_reporting()
  2023-03-07 18:28 [PATCH 00/10] PCI/AER: Remove redundant Device Control Error Reporting Enable Bjorn Helgaas
                   ` (7 preceding siblings ...)
  2023-03-07 18:28 ` [PATCH 08/10] scsi: mpt3sas: " Bjorn Helgaas
@ 2023-03-07 18:28 ` Bjorn Helgaas
  2023-03-07 18:28 ` [PATCH 10/10] scsi: qla4xxx: " Bjorn Helgaas
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Bjorn Helgaas @ 2023-03-07 18:28 UTC (permalink / raw)
  To: James E . J . Bottomley, Martin K . Petersen
  Cc: linux-scsi, linux-kernel, Bjorn Helgaas, Nilesh Javali,
	GR-QLogic-Storage-Upstream

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, 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 <bhelgaas@google.com>
Cc: Nilesh Javali <njavali@marvell.com>
Cc: GR-QLogic-Storage-Upstream@marvell.com
---
 drivers/scsi/qla2xxx/qla_def.h | 1 -
 drivers/scsi/qla2xxx/qla_os.c  | 6 ------
 2 files changed, 7 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index ec0e987b71fa..df5e5b7fdcfe 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -22,7 +22,6 @@
 #include <linux/interrupt.h>
 #include <linux/workqueue.h>
 #include <linux/firmware.h>
-#include <linux/aer.h>
 #include <linux/mutex.h>
 #include <linux/btree.h>
 
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 545167627e48..a6c5e0d8641d 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -2940,9 +2940,6 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
 		ql2xallocfwdump = 0;
 	}
 
-	/* This may fail but that's ok */
-	pci_enable_pcie_error_reporting(pdev);
-
 	ha = kzalloc(sizeof(struct qla_hw_data), GFP_KERNEL);
 	if (!ha) {
 		ql_log_pci(ql_log_fatal, pdev, 0x0009,
@@ -3949,8 +3946,6 @@ qla2x00_remove_one(struct pci_dev *pdev)
 	pci_release_selected_regions(ha->pdev, ha->bars);
 	kfree(ha);
 
-	pci_disable_pcie_error_reporting(pdev);
-
 	pci_disable_device(pdev);
 }
 
@@ -6825,7 +6820,6 @@ qla2x00_disable_board_on_pci_error(struct work_struct *work)
 	qla2x00_unmap_iobases(ha);
 
 	pci_release_selected_regions(ha->pdev, ha->bars);
-	pci_disable_pcie_error_reporting(pdev);
 	pci_disable_device(pdev);
 
 	/*
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 10/10] scsi: qla4xxx: Drop redundant pci_enable_pcie_error_reporting()
  2023-03-07 18:28 [PATCH 00/10] PCI/AER: Remove redundant Device Control Error Reporting Enable Bjorn Helgaas
                   ` (8 preceding siblings ...)
  2023-03-07 18:28 ` [PATCH 09/10] scsi: qla2xxx: " Bjorn Helgaas
@ 2023-03-07 18:28 ` Bjorn Helgaas
  2023-03-10  3:03 ` [PATCH 00/10] PCI/AER: Remove redundant Device Control Error Reporting Enable Martin K. Petersen
  2023-03-17  4:04 ` Martin K. Petersen
  11 siblings, 0 replies; 13+ messages in thread
From: Bjorn Helgaas @ 2023-03-07 18:28 UTC (permalink / raw)
  To: James E . J . Bottomley, Martin K . Petersen
  Cc: linux-scsi, linux-kernel, Bjorn Helgaas, Nilesh Javali,
	Manish Rangankar, GR-QLogic-Storage-Upstream

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, 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 <bhelgaas@google.com>
Cc: Nilesh Javali <njavali@marvell.com>
Cc: Manish Rangankar <mrangankar@marvell.com>
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 <linux/delay.h>
 #include <linux/interrupt.h>
 #include <linux/mutex.h>
-#include <linux/aer.h>
 #include <linux/bsg-lib.h>
 #include <linux/vmalloc.h>
 
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);
 }
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH 00/10] PCI/AER: Remove redundant Device Control Error Reporting Enable
  2023-03-07 18:28 [PATCH 00/10] PCI/AER: Remove redundant Device Control Error Reporting Enable Bjorn Helgaas
                   ` (9 preceding siblings ...)
  2023-03-07 18:28 ` [PATCH 10/10] scsi: qla4xxx: " Bjorn Helgaas
@ 2023-03-10  3:03 ` Martin K. Petersen
  2023-03-17  4:04 ` Martin K. Petersen
  11 siblings, 0 replies; 13+ messages in thread
From: Martin K. Petersen @ 2023-03-10  3:03 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: James E . J . Bottomley, Martin K . Petersen, linux-scsi,
	linux-kernel, Bjorn Helgaas, Anil Gurumurthy, Dick Kennedy,
	Don Brace, James Smart, Johannes Thumshirn, Ketan Mukadam,
	Manish Rangankar, Nilesh Javali, Raghava Aditya Renukunta,
	Sathya Prakash, Sreekanth Reddy, Sudarsana Kalluru,
	Suganath Prabu Subramani, Tomas Henzl,
	Adaptec OEM Raid Solutions, GR-QLogic-Storage-Upstream,
	MPT-FusionLinux.pdl, storagedev


Bjorn,

> Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is
> native"), which appeared in v6.0, the PCI core has enabled PCIe error
> reporting for all devices during enumeration.
>
> Remove driver code to do this and remove unnecessary includes of
> <linux/aer.h> from several other drivers.

Applied to 6.4/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 00/10] PCI/AER: Remove redundant Device Control Error Reporting Enable
  2023-03-07 18:28 [PATCH 00/10] PCI/AER: Remove redundant Device Control Error Reporting Enable Bjorn Helgaas
                   ` (10 preceding siblings ...)
  2023-03-10  3:03 ` [PATCH 00/10] PCI/AER: Remove redundant Device Control Error Reporting Enable Martin K. Petersen
@ 2023-03-17  4:04 ` Martin K. Petersen
  11 siblings, 0 replies; 13+ messages in thread
From: Martin K. Petersen @ 2023-03-17  4:04 UTC (permalink / raw)
  To: James E . J . Bottomley, Bjorn Helgaas
  Cc: Martin K . Petersen, linux-scsi, linux-kernel, Bjorn Helgaas,
	Anil Gurumurthy, Dick Kennedy, Don Brace, James Smart,
	Johannes Thumshirn, Ketan Mukadam, Manish Rangankar,
	Nilesh Javali, Raghava Aditya Renukunta, Sathya Prakash,
	Sreekanth Reddy, Sudarsana Kalluru, Suganath Prabu Subramani,
	Tomas Henzl, Adaptec OEM Raid Solutions,
	GR-QLogic-Storage-Upstream, MPT-FusionLinux.pdl, storagedev

On Tue, 07 Mar 2023 12:28:32 -0600, Bjorn Helgaas wrote:

> Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"),
> which appeared in v6.0, the PCI core has enabled PCIe error reporting for
> all devices during enumeration.
> 
> Remove driver code to do this and remove unnecessary includes of
> <linux/aer.h> from several other drivers.
> 
> [...]

Applied to 6.4/scsi-queue, thanks!

[01/10] scsi: aacraid: Drop redundant pci_enable_pcie_error_reporting()
        https://git.kernel.org/mkp/scsi/c/b3e2bf9c967b
[02/10] scsi: arcmsr: Remove unnecessary aer.h include
        https://git.kernel.org/mkp/scsi/c/915b071a6f83
[03/10] scsi: be2iscsi: Drop redundant pci_enable_pcie_error_reporting()
        https://git.kernel.org/mkp/scsi/c/6574fb2580b0
[04/10] scsi: bfa: Drop redundant pci_enable_pcie_error_reporting()
        https://git.kernel.org/mkp/scsi/c/b54e1e47b5f5
[05/10] scsi: csiostor: Remove unnecessary aer.h include
        https://git.kernel.org/mkp/scsi/c/3afe8d64c4f5
[06/10] scsi: hpsa: Remove unnecessary pci_disable_pcie_error_reporting() comment
        https://git.kernel.org/mkp/scsi/c/b2bce40c5b81
[07/10] scsi: lpfc: Drop redundant pci_enable_pcie_error_reporting()
        https://git.kernel.org/mkp/scsi/c/e891681b1d5d
[08/10] scsi: mpt3sas: Drop redundant pci_enable_pcie_error_reporting()
        https://git.kernel.org/mkp/scsi/c/edf6722f4ad2
[09/10] scsi: qla2xxx: Drop redundant pci_enable_pcie_error_reporting()
        https://git.kernel.org/mkp/scsi/c/c5c440bbff86
[10/10] scsi: qla4xxx: Drop redundant pci_enable_pcie_error_reporting()
        https://git.kernel.org/mkp/scsi/c/d7ba106418d6

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-03-17  4:05 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-07 18:28 [PATCH 00/10] PCI/AER: Remove redundant Device Control Error Reporting Enable Bjorn Helgaas
2023-03-07 18:28 ` [PATCH 01/10] scsi: aacraid: Drop redundant pci_enable_pcie_error_reporting() Bjorn Helgaas
2023-03-07 18:28 ` [PATCH 02/10] scsi: arcmsr: Remove unnecessary aer.h include Bjorn Helgaas
2023-03-07 18:28 ` [PATCH 03/10] scsi: be2iscsi: Drop redundant pci_enable_pcie_error_reporting() Bjorn Helgaas
2023-03-07 18:28 ` [PATCH 04/10] scsi: bfa: " Bjorn Helgaas
2023-03-07 18:28 ` [PATCH 05/10] scsi: csiostor: Remove unnecessary aer.h include Bjorn Helgaas
2023-03-07 18:28 ` [PATCH 06/10] scsi: hpsa: Remove unnecessary pci_disable_pcie_error_reporting() comment Bjorn Helgaas
2023-03-07 18:28 ` [PATCH 07/10] scsi: lpfc: Drop redundant pci_enable_pcie_error_reporting() Bjorn Helgaas
2023-03-07 18:28 ` [PATCH 08/10] scsi: mpt3sas: " Bjorn Helgaas
2023-03-07 18:28 ` [PATCH 09/10] scsi: qla2xxx: " Bjorn Helgaas
2023-03-07 18:28 ` [PATCH 10/10] scsi: qla4xxx: " Bjorn Helgaas
2023-03-10  3:03 ` [PATCH 00/10] PCI/AER: Remove redundant Device Control Error Reporting Enable Martin K. Petersen
2023-03-17  4:04 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).