diff options
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_fw.h | 4 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_isr.c | 53 |
2 files changed, 56 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h index d5344d7a8625..db63386f96b0 100644 --- a/drivers/scsi/qla2xxx/qla_fw.h +++ b/drivers/scsi/qla2xxx/qla_fw.h | |||
@@ -942,7 +942,9 @@ struct device_reg_24xx { | |||
942 | uint16_t mailbox31; | 942 | uint16_t mailbox31; |
943 | 943 | ||
944 | uint32_t iobase_window; | 944 | uint32_t iobase_window; |
945 | uint32_t unused_4[8]; /* Gap. */ | 945 | uint32_t unused_4; /* Gap. */ |
946 | uint32_t iobase_c8; | ||
947 | uint32_t unused_4_1[6]; /* Gap. */ | ||
946 | uint32_t iobase_q; | 948 | uint32_t iobase_q; |
947 | uint32_t unused_5[2]; /* Gap. */ | 949 | uint32_t unused_5[2]; /* Gap. */ |
948 | uint32_t iobase_select; | 950 | uint32_t iobase_select; |
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index dcfb24b198f0..f61c2fe8eb59 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c | |||
@@ -6,6 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | #include "qla_def.h" | 7 | #include "qla_def.h" |
8 | 8 | ||
9 | #include <linux/delay.h> | ||
9 | #include <scsi/scsi_tcq.h> | 10 | #include <scsi/scsi_tcq.h> |
10 | 11 | ||
11 | static void qla2x00_mbx_completion(scsi_qla_host_t *, uint16_t); | 12 | static void qla2x00_mbx_completion(scsi_qla_host_t *, uint16_t); |
@@ -1484,6 +1485,52 @@ qla24xx_process_response_queue(struct scsi_qla_host *ha) | |||
1484 | WRT_REG_DWORD(®->rsp_q_out, ha->rsp_ring_index); | 1485 | WRT_REG_DWORD(®->rsp_q_out, ha->rsp_ring_index); |
1485 | } | 1486 | } |
1486 | 1487 | ||
1488 | static void | ||
1489 | qla2xxx_check_risc_status(scsi_qla_host_t *ha) | ||
1490 | { | ||
1491 | int rval; | ||
1492 | uint32_t cnt; | ||
1493 | struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; | ||
1494 | |||
1495 | if (!IS_QLA25XX(ha)) | ||
1496 | return; | ||
1497 | |||
1498 | rval = QLA_SUCCESS; | ||
1499 | WRT_REG_DWORD(®->iobase_addr, 0x7C00); | ||
1500 | RD_REG_DWORD(®->iobase_addr); | ||
1501 | WRT_REG_DWORD(®->iobase_window, 0x0001); | ||
1502 | for (cnt = 10000; (RD_REG_DWORD(®->iobase_window) & BIT_0) == 0 && | ||
1503 | rval == QLA_SUCCESS; cnt--) { | ||
1504 | if (cnt) { | ||
1505 | WRT_REG_DWORD(®->iobase_window, 0x0001); | ||
1506 | udelay(10); | ||
1507 | } else | ||
1508 | rval = QLA_FUNCTION_TIMEOUT; | ||
1509 | } | ||
1510 | if (rval == QLA_SUCCESS) | ||
1511 | goto next_test; | ||
1512 | |||
1513 | WRT_REG_DWORD(®->iobase_window, 0x0003); | ||
1514 | for (cnt = 100; (RD_REG_DWORD(®->iobase_window) & BIT_0) == 0 && | ||
1515 | rval == QLA_SUCCESS; cnt--) { | ||
1516 | if (cnt) { | ||
1517 | WRT_REG_DWORD(®->iobase_window, 0x0003); | ||
1518 | udelay(10); | ||
1519 | } else | ||
1520 | rval = QLA_FUNCTION_TIMEOUT; | ||
1521 | } | ||
1522 | if (rval != QLA_SUCCESS) | ||
1523 | goto done; | ||
1524 | |||
1525 | next_test: | ||
1526 | if (RD_REG_DWORD(®->iobase_c8) & BIT_3) | ||
1527 | qla_printk(KERN_INFO, ha, "Additional code -- 0x55AA.\n"); | ||
1528 | |||
1529 | done: | ||
1530 | WRT_REG_DWORD(®->iobase_window, 0x0000); | ||
1531 | RD_REG_DWORD(®->iobase_window); | ||
1532 | } | ||
1533 | |||
1487 | /** | 1534 | /** |
1488 | * qla24xx_intr_handler() - Process interrupts for the ISP23xx and ISP63xx. | 1535 | * qla24xx_intr_handler() - Process interrupts for the ISP23xx and ISP63xx. |
1489 | * @irq: | 1536 | * @irq: |
@@ -1526,6 +1573,9 @@ qla24xx_intr_handler(int irq, void *dev_id) | |||
1526 | 1573 | ||
1527 | qla_printk(KERN_INFO, ha, "RISC paused -- HCCR=%x, " | 1574 | qla_printk(KERN_INFO, ha, "RISC paused -- HCCR=%x, " |
1528 | "Dumping firmware!\n", hccr); | 1575 | "Dumping firmware!\n", hccr); |
1576 | |||
1577 | qla2xxx_check_risc_status(ha); | ||
1578 | |||
1529 | ha->isp_ops->fw_dump(ha, 1); | 1579 | ha->isp_ops->fw_dump(ha, 1); |
1530 | set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); | 1580 | set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); |
1531 | break; | 1581 | break; |
@@ -1663,6 +1713,9 @@ qla24xx_msix_default(int irq, void *dev_id) | |||
1663 | 1713 | ||
1664 | qla_printk(KERN_INFO, ha, "RISC paused -- HCCR=%x, " | 1714 | qla_printk(KERN_INFO, ha, "RISC paused -- HCCR=%x, " |
1665 | "Dumping firmware!\n", hccr); | 1715 | "Dumping firmware!\n", hccr); |
1716 | |||
1717 | qla2xxx_check_risc_status(ha); | ||
1718 | |||
1666 | ha->isp_ops->fw_dump(ha, 1); | 1719 | ha->isp_ops->fw_dump(ha, 1); |
1667 | set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); | 1720 | set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); |
1668 | break; | 1721 | break; |