Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: bfa: Drop redundant pci_enable_pcie_error_reporting()

pci_enable_pcie_error_reporting() enables the device to send ERR_*
Messages. Since commit 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>
Link: https://lore.kernel.org/r/20230307182842.870378-5-helgaas@kernel.org
Cc: Anil Gurumurthy <anil.gurumurthy@qlogic.com>
Cc: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Bjorn Helgaas and committed by
Martin K. Petersen
b54e1e47 6574fb25

-7
-6
drivers/scsi/bfa/bfad.c
··· 738 738 goto out_release_region; 739 739 } 740 740 741 - /* Enable PCIE Advanced Error Recovery (AER) if kernel supports */ 742 - pci_enable_pcie_error_reporting(pdev); 743 - 744 741 bfad->pci_bar0_kva = pci_iomap(pdev, 0, pci_resource_len(pdev, 0)); 745 742 bfad->pci_bar2_kva = pci_iomap(pdev, 2, pci_resource_len(pdev, 2)); 746 743 ··· 798 801 pci_iounmap(pdev, bfad->pci_bar0_kva); 799 802 pci_iounmap(pdev, bfad->pci_bar2_kva); 800 803 pci_release_regions(pdev); 801 - /* Disable PCIE Advanced Error Recovery (AER) */ 802 - pci_disable_pcie_error_reporting(pdev); 803 804 pci_disable_device(pdev); 804 805 } 805 806 ··· 1557 1562 if (restart_bfa(bfad) == -1) 1558 1563 goto out_disable_device; 1559 1564 1560 - pci_enable_pcie_error_reporting(pdev); 1561 1565 dev_printk(KERN_WARNING, &pdev->dev, 1562 1566 "slot_reset completed flags: 0x%x!\n", bfad->bfad_flags); 1563 1567
-1
drivers/scsi/bfa/bfad_drv.h
··· 30 30 #include <linux/vmalloc.h> 31 31 #include <linux/workqueue.h> 32 32 #include <linux/bitops.h> 33 - #include <linux/aer.h> 34 33 #include <scsi/scsi.h> 35 34 #include <scsi/scsi_host.h> 36 35 #include <scsi/scsi_tcq.h>