aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_isr.c
diff options
context:
space:
mode:
authorSeokmann Ju <seokmann.ju@qlogic.com>2007-09-20 17:07:36 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-10-12 14:49:47 -0400
commit14e660e677ddd3574247495aae4ef63eb8899072 (patch)
treefbf817d4e37887ae31ed46652f72440901c1f94b /drivers/scsi/qla2xxx/qla_isr.c
parentb7cc176c9eb3aa6989ac099efd8bdd6d0eaa784a (diff)
[SCSI] qla2xxx: Add PCI error recovery support.
Additional cleanups and Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_isr.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_isr.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index eecae9905ec..dcfb24b198f 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -34,6 +34,7 @@ qla2100_intr_handler(int irq, void *dev_id)
34 int status; 34 int status;
35 unsigned long flags; 35 unsigned long flags;
36 unsigned long iter; 36 unsigned long iter;
37 uint16_t hccr;
37 uint16_t mb[4]; 38 uint16_t mb[4];
38 39
39 ha = (scsi_qla_host_t *) dev_id; 40 ha = (scsi_qla_host_t *) dev_id;
@@ -48,7 +49,23 @@ qla2100_intr_handler(int irq, void *dev_id)
48 49
49 spin_lock_irqsave(&ha->hardware_lock, flags); 50 spin_lock_irqsave(&ha->hardware_lock, flags);
50 for (iter = 50; iter--; ) { 51 for (iter = 50; iter--; ) {
51 if ((RD_REG_WORD(&reg->istatus) & ISR_RISC_INT) == 0) 52 hccr = RD_REG_WORD(&reg->hccr);
53 if (hccr & HCCR_RISC_PAUSE) {
54 if (pci_channel_offline(ha->pdev))
55 break;
56
57 /*
58 * Issue a "HARD" reset in order for the RISC interrupt
59 * bit to be cleared. Schedule a big hammmer to get
60 * out of the RISC PAUSED state.
61 */
62 WRT_REG_WORD(&reg->hccr, HCCR_RESET_RISC);
63 RD_REG_WORD(&reg->hccr);
64
65 ha->isp_ops->fw_dump(ha, 1);
66 set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
67 break;
68 } else if ((RD_REG_WORD(&reg->istatus) & ISR_RISC_INT) == 0)
52 break; 69 break;
53 70
54 if (RD_REG_WORD(&reg->semaphore) & BIT_0) { 71 if (RD_REG_WORD(&reg->semaphore) & BIT_0) {
@@ -127,6 +144,9 @@ qla2300_intr_handler(int irq, void *dev_id)
127 for (iter = 50; iter--; ) { 144 for (iter = 50; iter--; ) {
128 stat = RD_REG_DWORD(&reg->u.isp2300.host_status); 145 stat = RD_REG_DWORD(&reg->u.isp2300.host_status);
129 if (stat & HSR_RISC_PAUSED) { 146 if (stat & HSR_RISC_PAUSED) {
147 if (pci_channel_offline(ha->pdev))
148 break;
149
130 hccr = RD_REG_WORD(&reg->hccr); 150 hccr = RD_REG_WORD(&reg->hccr);
131 if (hccr & (BIT_15 | BIT_13 | BIT_11 | BIT_8)) 151 if (hccr & (BIT_15 | BIT_13 | BIT_11 | BIT_8))
132 qla_printk(KERN_INFO, ha, "Parity error -- " 152 qla_printk(KERN_INFO, ha, "Parity error -- "
@@ -1499,6 +1519,9 @@ qla24xx_intr_handler(int irq, void *dev_id)
1499 for (iter = 50; iter--; ) { 1519 for (iter = 50; iter--; ) {
1500 stat = RD_REG_DWORD(&reg->host_status); 1520 stat = RD_REG_DWORD(&reg->host_status);
1501 if (stat & HSRX_RISC_PAUSED) { 1521 if (stat & HSRX_RISC_PAUSED) {
1522 if (pci_channel_offline(ha->pdev))
1523 break;
1524
1502 hccr = RD_REG_DWORD(&reg->hccr); 1525 hccr = RD_REG_DWORD(&reg->hccr);
1503 1526
1504 qla_printk(KERN_INFO, ha, "RISC paused -- HCCR=%x, " 1527 qla_printk(KERN_INFO, ha, "RISC paused -- HCCR=%x, "
@@ -1633,6 +1656,9 @@ qla24xx_msix_default(int irq, void *dev_id)
1633 for (iter = 50; iter--; ) { 1656 for (iter = 50; iter--; ) {
1634 stat = RD_REG_DWORD(&reg->host_status); 1657 stat = RD_REG_DWORD(&reg->host_status);
1635 if (stat & HSRX_RISC_PAUSED) { 1658 if (stat & HSRX_RISC_PAUSED) {
1659 if (pci_channel_offline(ha->pdev))
1660 break;
1661
1636 hccr = RD_REG_DWORD(&reg->hccr); 1662 hccr = RD_REG_DWORD(&reg->hccr);
1637 1663
1638 qla_printk(KERN_INFO, ha, "RISC paused -- HCCR=%x, " 1664 qla_printk(KERN_INFO, ha, "RISC paused -- HCCR=%x, "