From: Peter Georg <peter.georg(a)physik.uni-regensburg.de>
qla4xxx: Add new messaging
Upstream Status: RHEL only
Signed-off-by: Peter Georg <peter.georg(a)physik.uni-regensburg.de>
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index blahblah..blahblah 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -8600,6 +8600,30 @@ static void qla4xxx_wait_login_resp_boot_tgt(struct scsi_qla_host
*ha)
fw_ddb_entry, fw_ddb_entry_dma);
}
+#ifdef CONFIG_RHEL_DIFFERENCES
+static const struct pci_device_id rh_disabled_pci_table[] = {
+ {
+ .vendor = PCI_VENDOR_ID_QLOGIC,
+ .device = PCI_DEVICE_ID_QLOGIC_ISP8022,
+ .subvendor = PCI_ANY_ID,
+ .subdevice = PCI_ANY_ID,
+ },
+ {
+ .vendor = PCI_VENDOR_ID_QLOGIC,
+ .device = PCI_DEVICE_ID_QLOGIC_ISP8324,
+ .subvendor = PCI_ANY_ID,
+ .subdevice = PCI_ANY_ID,
+ },
+ {
+ .vendor = PCI_VENDOR_ID_QLOGIC,
+ .device = PCI_DEVICE_ID_QLOGIC_ISP8042,
+ .subvendor = PCI_ANY_ID,
+ .subdevice = PCI_ANY_ID,
+ },
+ { 0 }
+};
+#endif
+
/**
* qla4xxx_probe_adapter - callback function to probe HBA
* @pdev: pointer to pci_dev structure
@@ -8620,6 +8644,11 @@ static int qla4xxx_probe_adapter(struct pci_dev *pdev,
struct qla4_8xxx_legacy_intr_set *nx_legacy_intr;
uint32_t dev_state;
+#ifdef CONFIG_RHEL_DIFFERENCES
+ if (pci_hw_disabled(rh_disabled_pci_table, pdev))
+ return -ENODEV;
+#endif
+
if (pci_enable_device(pdev))
return -1;
@@ -9855,7 +9884,6 @@ static struct pci_device_id qla4xxx_pci_tbl[] = {
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
},
-#ifndef CONFIG_RHEL_DIFFERENCES
{
.vendor = PCI_VENDOR_ID_QLOGIC,
.device = PCI_DEVICE_ID_QLOGIC_ISP8022,
@@ -9874,7 +9902,6 @@ static struct pci_device_id qla4xxx_pci_tbl[] = {
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
},
-#endif
{0, 0},
};
MODULE_DEVICE_TABLE(pci, qla4xxx_pci_tbl);
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1610