diff options
author | Harihara Kadayam <harihara.kadayam@qlogic.com> | 2008-04-03 16:13:26 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-04-07 13:19:15 -0400 |
commit | 4d4df1932b6b116aecc81039066fec27f2050762 (patch) | |
tree | ee02f449a0bb456e40fcdb5287609b98e8e8f62f /drivers/scsi/qla2xxx/qla_isr.c | |
parent | b93480e319654b8921364b49528532dff4822a45 (diff) |
[SCSI] qla2xxx: Add ISP84XX support.
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Additional cleanups and
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_isr.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_isr.c | 48 |
1 files changed, 43 insertions, 5 deletions
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index e88600082c01..360af4e09d12 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c | |||
@@ -271,6 +271,7 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) | |||
271 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; | 271 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; |
272 | uint32_t rscn_entry, host_pid; | 272 | uint32_t rscn_entry, host_pid; |
273 | uint8_t rscn_queue_index; | 273 | uint8_t rscn_queue_index; |
274 | unsigned long flags; | ||
274 | 275 | ||
275 | /* Setup to process RIO completion. */ | 276 | /* Setup to process RIO completion. */ |
276 | handle_cnt = 0; | 277 | handle_cnt = 0; |
@@ -432,9 +433,10 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) | |||
432 | break; | 433 | break; |
433 | 434 | ||
434 | case MBA_LOOP_DOWN: /* Loop Down Event */ | 435 | case MBA_LOOP_DOWN: /* Loop Down Event */ |
435 | DEBUG2(printk("scsi(%ld): Asynchronous LOOP DOWN (%x).\n", | 436 | DEBUG2(printk("scsi(%ld): Asynchronous LOOP DOWN " |
436 | ha->host_no, mb[1])); | 437 | "(%x %x %x).\n", ha->host_no, mb[1], mb[2], mb[3])); |
437 | qla_printk(KERN_INFO, ha, "LOOP DOWN detected (%x).\n", mb[1]); | 438 | qla_printk(KERN_INFO, ha, "LOOP DOWN detected (%x %x %x).\n", |
439 | mb[1], mb[2], mb[3]); | ||
438 | 440 | ||
439 | if (atomic_read(&ha->loop_state) != LOOP_DOWN) { | 441 | if (atomic_read(&ha->loop_state) != LOOP_DOWN) { |
440 | atomic_set(&ha->loop_state, LOOP_DOWN); | 442 | atomic_set(&ha->loop_state, LOOP_DOWN); |
@@ -640,6 +642,42 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) | |||
640 | DEBUG2(printk("scsi(%ld): Trace Notification -- %04x %04x.\n", | 642 | DEBUG2(printk("scsi(%ld): Trace Notification -- %04x %04x.\n", |
641 | ha->host_no, mb[1], mb[2])); | 643 | ha->host_no, mb[1], mb[2])); |
642 | break; | 644 | break; |
645 | |||
646 | case MBA_ISP84XX_ALERT: | ||
647 | DEBUG2(printk("scsi(%ld): ISP84XX Alert Notification -- " | ||
648 | "%04x %04x %04x\n", ha->host_no, mb[1], mb[2], mb[3])); | ||
649 | |||
650 | spin_lock_irqsave(&ha->cs84xx->access_lock, flags); | ||
651 | switch (mb[1]) { | ||
652 | case A84_PANIC_RECOVERY: | ||
653 | qla_printk(KERN_INFO, ha, "Alert 84XX: panic recovery " | ||
654 | "%04x %04x\n", mb[2], mb[3]); | ||
655 | break; | ||
656 | case A84_OP_LOGIN_COMPLETE: | ||
657 | ha->cs84xx->op_fw_version = mb[3] << 16 | mb[2]; | ||
658 | DEBUG2(qla_printk(KERN_INFO, ha, "Alert 84XX:" | ||
659 | "firmware version %x\n", ha->cs84xx->op_fw_version)); | ||
660 | break; | ||
661 | case A84_DIAG_LOGIN_COMPLETE: | ||
662 | ha->cs84xx->diag_fw_version = mb[3] << 16 | mb[2]; | ||
663 | DEBUG2(qla_printk(KERN_INFO, ha, "Alert 84XX:" | ||
664 | "diagnostic firmware version %x\n", | ||
665 | ha->cs84xx->diag_fw_version)); | ||
666 | break; | ||
667 | case A84_GOLD_LOGIN_COMPLETE: | ||
668 | ha->cs84xx->diag_fw_version = mb[3] << 16 | mb[2]; | ||
669 | ha->cs84xx->fw_update = 1; | ||
670 | DEBUG2(qla_printk(KERN_INFO, ha, "Alert 84XX: gold " | ||
671 | "firmware version %x\n", | ||
672 | ha->cs84xx->gold_fw_version)); | ||
673 | break; | ||
674 | default: | ||
675 | qla_printk(KERN_ERR, ha, | ||
676 | "Alert 84xx: Invalid Alert %04x %04x %04x\n", | ||
677 | mb[1], mb[2], mb[3]); | ||
678 | } | ||
679 | spin_unlock_irqrestore(&ha->cs84xx->access_lock, flags); | ||
680 | break; | ||
643 | } | 681 | } |
644 | 682 | ||
645 | if (!ha->parent && ha->num_vhosts) | 683 | if (!ha->parent && ha->num_vhosts) |
@@ -1747,7 +1785,7 @@ qla2x00_request_irqs(scsi_qla_host_t *ha) | |||
1747 | device_reg_t __iomem *reg = ha->iobase; | 1785 | device_reg_t __iomem *reg = ha->iobase; |
1748 | 1786 | ||
1749 | /* If possible, enable MSI-X. */ | 1787 | /* If possible, enable MSI-X. */ |
1750 | if (!IS_QLA2432(ha) && !IS_QLA2532(ha)) | 1788 | if (!IS_QLA2432(ha) && !IS_QLA2532(ha) && !IS_QLA8432(ha)) |
1751 | goto skip_msix; | 1789 | goto skip_msix; |
1752 | 1790 | ||
1753 | if (IS_QLA2432(ha) && (ha->chip_revision < QLA_MSIX_CHIP_REV_24XX || | 1791 | if (IS_QLA2432(ha) && (ha->chip_revision < QLA_MSIX_CHIP_REV_24XX || |
@@ -1782,7 +1820,7 @@ qla2x00_request_irqs(scsi_qla_host_t *ha) | |||
1782 | "MSI-X: Falling back-to INTa mode -- %d.\n", ret); | 1820 | "MSI-X: Falling back-to INTa mode -- %d.\n", ret); |
1783 | skip_msix: | 1821 | skip_msix: |
1784 | 1822 | ||
1785 | if (!IS_QLA24XX(ha) && !IS_QLA2532(ha)) | 1823 | if (!IS_QLA24XX(ha) && !IS_QLA2532(ha) && !IS_QLA8432(ha)) |
1786 | goto skip_msi; | 1824 | goto skip_msi; |
1787 | 1825 | ||
1788 | ret = pci_enable_msi(ha->pdev); | 1826 | ret = pci_enable_msi(ha->pdev); |