Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 89877e42827f16fa5f86b1df0c2860b1 > files > 1909

kernel-2.6.18-128.1.10.el5.src.rpm

From: Marcus Barrow <mbarrow@redhat.com>
Date: Wed, 9 Apr 2008 21:10:09 -0400
Subject: Revert: [scsi] qla2xxx: pci ee error handling support
Message-id: 7FD29D55-7AFA-44B8-93AB-2C4679584300@redhat.com
O-Subject: [rhel5.2 feat] [4/6][Retract] Update qla2xxx - PCI EE error handling support
Bugzilla: 441779

I filed this BZ:

441779 qla2xxx - retract earlier patch for PCI enhanced Error
Handling (EEH)
https://bugzilla.redhat.com/show_bug.cgi?id=441779

to request removal of this patch:
[Bug 253267][QLogic][RHEL 5.2 feat 4/6]Update qla2xxx - PCI EE error
handling support
https://bugzilla.redhat.com/show_bug.cgi?id=253267

In addition the two follow on fixes should not be applied:
[rhel 5.2 bug] qla2xxx - EEH error on JS22 results in panic.
[rhel 5.2 bug] qla2xxx - EEH error on JS22 results in panic.
[DISABLE] [2/2]
https://bugzilla.redhat.com/show_bug.cgi?id=437384

As agreed by QLogic and it's partners this work will be resubmitted
for RHEL 5.3 when testing problems are resolved.

Thank-You,
Marcus Barrow

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 00c7c9b..3f7f1a0 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1840,7 +1840,7 @@ probe_out:
 	return ret;
 }
 
-static void
+static void __devexit
 qla2x00_remove_one(struct pci_dev *pdev)
 {
 	scsi_qla_host_t *ha;
@@ -2887,104 +2887,6 @@ qla2x00_release_firmware(void)
 	up(&qla_fw_lock);
 }
 
-static pci_ers_result_t
-qla2xxx_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
-{
-	switch (state) {
-	case pci_channel_io_normal:
-		return PCI_ERS_RESULT_CAN_RECOVER;
-	case pci_channel_io_frozen:
-		pci_disable_device(pdev);
-		return PCI_ERS_RESULT_NEED_RESET;
-	case pci_channel_io_perm_failure:
-		qla2x00_remove_one(pdev);
-		return PCI_ERS_RESULT_DISCONNECT;
-	}
-	return PCI_ERS_RESULT_NEED_RESET;
-}
-
-static pci_ers_result_t
-qla2xxx_pci_mmio_enabled(struct pci_dev *pdev)
-{
-	int risc_paused = 0;
-	uint32_t stat;
-	unsigned long flags;
-	scsi_qla_host_t *ha = pci_get_drvdata(pdev);
-	struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;
-	struct device_reg_24xx __iomem *reg24 = &ha->iobase->isp24;
-
-	spin_lock_irqsave(&ha->hardware_lock, flags);
-	if (IS_QLA2100(ha) || IS_QLA2200(ha)){
-	stat = RD_REG_DWORD(&reg->hccr);
-		if (stat & HCCR_RISC_PAUSE)
-			risc_paused = 1;
-	} else if (IS_QLA23XX(ha)) {
-		stat = RD_REG_DWORD(&reg->u.isp2300.host_status);
-		if (stat & HSR_RISC_PAUSED)
-			risc_paused = 1;
-	} else if (IS_FWI2_CAPABLE(ha)) {
-		stat = RD_REG_DWORD(&reg24->host_status);
-		if (stat & HSRX_RISC_PAUSED)
-			risc_paused = 1;
-	}
-	spin_unlock_irqrestore(&ha->hardware_lock, flags);
-
-	if (risc_paused) {
-		qla_printk(KERN_INFO, ha, "RISC paused -- mmio_enabled, "
-		    "Dumping firmware!\n");
-		ha->isp_ops->fw_dump(ha, 0);
-
-		return PCI_ERS_RESULT_NEED_RESET;
-	} else
-		return PCI_ERS_RESULT_RECOVERED;
-}
-
-static pci_ers_result_t
-qla2xxx_pci_slot_reset(struct pci_dev *pdev)
-{
-	pci_ers_result_t ret = PCI_ERS_RESULT_DISCONNECT;
-	scsi_qla_host_t *ha = pci_get_drvdata(pdev);
-
-	if (pci_enable_device(pdev)) {
-		qla_printk(KERN_WARNING, ha,
-		    "Can't re-enable PCI device after reset.\n");
-
-		return ret;
-	}
-	pci_set_master(pdev);
-
-	if (ha->isp_ops->pci_config(ha))
-		return ret;
-
-	set_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags);
-	if (qla2x00_abort_isp(ha)== QLA_SUCCESS)
-		ret =  PCI_ERS_RESULT_RECOVERED;
-	clear_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags);
-
-	return ret;
-}
-
-static void
-qla2xxx_pci_resume(struct pci_dev *pdev)
-{
-	scsi_qla_host_t *ha = pci_get_drvdata(pdev);
-	int ret;
-
-	ret = qla2x00_wait_for_hba_online(ha);
-	if (ret != QLA_SUCCESS) {
-		qla_printk(KERN_ERR, ha,
-		    "the device failed to resume I/O "
-		    "from slot/link_reset");
-	}
-}
-
-static struct pci_error_handlers qla2xxx_err_handler = {
-	.error_detected = qla2xxx_pci_error_detected,
-	.mmio_enabled = qla2xxx_pci_mmio_enabled,
-	.slot_reset = qla2xxx_pci_slot_reset,
-	.resume = qla2xxx_pci_resume,
-};
-
 static struct pci_device_id qla2xxx_pci_tbl[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2100) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2200) },
@@ -3009,8 +2911,7 @@ static struct pci_driver qla2xxx_pci_driver = {
 	},
 	.id_table	= qla2xxx_pci_tbl,
 	.probe		= qla2x00_probe_one,
-	.remove		= qla2x00_remove_one,
-	.err_handler	= &qla2xxx_err_handler,
+	.remove		= __devexit_p(qla2x00_remove_one),
 };
 
 /**