diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2007-09-20 17:07:37 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-10-12 14:49:51 -0400 |
commit | 05236a050f8e3a20962bad98ad8ceb94bbdb748c (patch) | |
tree | 90228c381a90632cc9a6b2913152e9a6b383b1ff /drivers/scsi/qla2xxx/qla_isr.c | |
parent | 14e660e677ddd3574247495aae4ef63eb8899072 (diff) |
[SCSI] qla2xxx: Query additional RISC information during a pause.
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.c | 53 |
1 files changed, 53 insertions, 0 deletions
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; |