diff options
author | Vikas Chaudhary <vikas.chaudhary@qlogic.com> | 2013-08-16 07:03:02 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-09-03 10:27:53 -0400 |
commit | b37ca4183c287448ad0096381d030ca5fc788059 (patch) | |
tree | 7333fbd680b2b6cff6530bebc61377feef9ca515 /drivers/scsi/qla4xxx/ql4_isr.c | |
parent | 4d81233c7c9e59b24db82416e8651b4f862f452e (diff) |
[SCSI] qla4xxx: Added support for ISP8042
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_isr.c')
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_isr.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_isr.c b/drivers/scsi/qla4xxx/ql4_isr.c index 482287f4005f..fbd415db5a52 100644 --- a/drivers/scsi/qla4xxx/ql4_isr.c +++ b/drivers/scsi/qla4xxx/ql4_isr.c | |||
@@ -588,7 +588,7 @@ static int qla4_83xx_loopback_in_progress(struct scsi_qla_host *ha) | |||
588 | { | 588 | { |
589 | int rval = 1; | 589 | int rval = 1; |
590 | 590 | ||
591 | if (is_qla8032(ha)) { | 591 | if (is_qla8032(ha) || is_qla8042(ha)) { |
592 | if ((ha->idc_info.info2 & ENABLE_INTERNAL_LOOPBACK) || | 592 | if ((ha->idc_info.info2 & ENABLE_INTERNAL_LOOPBACK) || |
593 | (ha->idc_info.info2 & ENABLE_EXTERNAL_LOOPBACK)) { | 593 | (ha->idc_info.info2 & ENABLE_EXTERNAL_LOOPBACK)) { |
594 | DEBUG2(ql4_printk(KERN_INFO, ha, | 594 | DEBUG2(ql4_printk(KERN_INFO, ha, |
@@ -621,7 +621,7 @@ static void qla4xxx_isr_decode_mailbox(struct scsi_qla_host * ha, | |||
621 | uint32_t mbox_sts[MBOX_AEN_REG_COUNT]; | 621 | uint32_t mbox_sts[MBOX_AEN_REG_COUNT]; |
622 | __le32 __iomem *mailbox_out; | 622 | __le32 __iomem *mailbox_out; |
623 | 623 | ||
624 | if (is_qla8032(ha)) | 624 | if (is_qla8032(ha) || is_qla8042(ha)) |
625 | mailbox_out = &ha->qla4_83xx_reg->mailbox_out[0]; | 625 | mailbox_out = &ha->qla4_83xx_reg->mailbox_out[0]; |
626 | else if (is_qla8022(ha)) | 626 | else if (is_qla8022(ha)) |
627 | mailbox_out = &ha->qla4_82xx_reg->mailbox_out[0]; | 627 | mailbox_out = &ha->qla4_82xx_reg->mailbox_out[0]; |
@@ -665,7 +665,8 @@ static void qla4xxx_isr_decode_mailbox(struct scsi_qla_host * ha, | |||
665 | qla4xxx_dump_registers(ha); | 665 | qla4xxx_dump_registers(ha); |
666 | 666 | ||
667 | if ((is_qla8022(ha) && ql4xdontresethba) || | 667 | if ((is_qla8022(ha) && ql4xdontresethba) || |
668 | (is_qla8032(ha) && qla4_83xx_idc_dontreset(ha))) { | 668 | ((is_qla8032(ha) || is_qla8042(ha)) && |
669 | qla4_83xx_idc_dontreset(ha))) { | ||
669 | DEBUG2(printk("scsi%ld: %s:Don't Reset HBA\n", | 670 | DEBUG2(printk("scsi%ld: %s:Don't Reset HBA\n", |
670 | ha->host_no, __func__)); | 671 | ha->host_no, __func__)); |
671 | } else { | 672 | } else { |
@@ -836,7 +837,7 @@ static void qla4xxx_isr_decode_mailbox(struct scsi_qla_host * ha, | |||
836 | case MBOX_ASTS_IDC_REQUEST_NOTIFICATION: | 837 | case MBOX_ASTS_IDC_REQUEST_NOTIFICATION: |
837 | { | 838 | { |
838 | uint32_t opcode; | 839 | uint32_t opcode; |
839 | if (is_qla8032(ha)) { | 840 | if (is_qla8032(ha) || is_qla8042(ha)) { |
840 | DEBUG2(ql4_printk(KERN_INFO, ha, | 841 | DEBUG2(ql4_printk(KERN_INFO, ha, |
841 | "scsi%ld: AEN %04x, mbox_sts[1]=%08x, mbox_sts[2]=%08x, mbox_sts[3]=%08x, mbox_sts[4]=%08x\n", | 842 | "scsi%ld: AEN %04x, mbox_sts[1]=%08x, mbox_sts[2]=%08x, mbox_sts[3]=%08x, mbox_sts[4]=%08x\n", |
842 | ha->host_no, mbox_sts[0], | 843 | ha->host_no, mbox_sts[0], |
@@ -858,7 +859,7 @@ static void qla4xxx_isr_decode_mailbox(struct scsi_qla_host * ha, | |||
858 | } | 859 | } |
859 | 860 | ||
860 | case MBOX_ASTS_IDC_COMPLETE: | 861 | case MBOX_ASTS_IDC_COMPLETE: |
861 | if (is_qla8032(ha)) { | 862 | if (is_qla8032(ha) || is_qla8042(ha)) { |
862 | DEBUG2(ql4_printk(KERN_INFO, ha, | 863 | DEBUG2(ql4_printk(KERN_INFO, ha, |
863 | "scsi%ld: AEN %04x, mbox_sts[1]=%08x, mbox_sts[2]=%08x, mbox_sts[3]=%08x, mbox_sts[4]=%08x\n", | 864 | "scsi%ld: AEN %04x, mbox_sts[1]=%08x, mbox_sts[2]=%08x, mbox_sts[3]=%08x, mbox_sts[4]=%08x\n", |
864 | ha->host_no, mbox_sts[0], | 865 | ha->host_no, mbox_sts[0], |
@@ -1297,7 +1298,7 @@ qla4_8xxx_default_intr_handler(int irq, void *dev_id) | |||
1297 | uint32_t intr_status; | 1298 | uint32_t intr_status; |
1298 | uint8_t reqs_count = 0; | 1299 | uint8_t reqs_count = 0; |
1299 | 1300 | ||
1300 | if (is_qla8032(ha)) { | 1301 | if (is_qla8032(ha) || is_qla8042(ha)) { |
1301 | qla4_83xx_mailbox_intr_handler(irq, dev_id); | 1302 | qla4_83xx_mailbox_intr_handler(irq, dev_id); |
1302 | } else { | 1303 | } else { |
1303 | spin_lock_irqsave(&ha->hardware_lock, flags); | 1304 | spin_lock_irqsave(&ha->hardware_lock, flags); |
@@ -1334,7 +1335,7 @@ qla4_8xxx_msix_rsp_q(int irq, void *dev_id) | |||
1334 | uint32_t ival = 0; | 1335 | uint32_t ival = 0; |
1335 | 1336 | ||
1336 | spin_lock_irqsave(&ha->hardware_lock, flags); | 1337 | spin_lock_irqsave(&ha->hardware_lock, flags); |
1337 | if (is_qla8032(ha)) { | 1338 | if (is_qla8032(ha) || is_qla8042(ha)) { |
1338 | ival = readl(&ha->qla4_83xx_reg->iocb_int_mask); | 1339 | ival = readl(&ha->qla4_83xx_reg->iocb_int_mask); |
1339 | if (ival == 0) { | 1340 | if (ival == 0) { |
1340 | ql4_printk(KERN_INFO, ha, "%s: It is a spurious iocb interrupt!\n", | 1341 | ql4_printk(KERN_INFO, ha, "%s: It is a spurious iocb interrupt!\n", |
@@ -1425,10 +1426,10 @@ int qla4xxx_request_irqs(struct scsi_qla_host *ha) | |||
1425 | goto try_intx; | 1426 | goto try_intx; |
1426 | 1427 | ||
1427 | if (ql4xenablemsix == 2) { | 1428 | if (ql4xenablemsix == 2) { |
1428 | /* Note: MSI Interrupts not supported for ISP8324 */ | 1429 | /* Note: MSI Interrupts not supported for ISP8324 and ISP8042 */ |
1429 | if (is_qla8032(ha)) { | 1430 | if (is_qla8032(ha) || is_qla8042(ha)) { |
1430 | ql4_printk(KERN_INFO, ha, "%s: MSI Interrupts not supported for ISP8324, Falling back-to INTx mode\n", | 1431 | ql4_printk(KERN_INFO, ha, "%s: MSI Interrupts not supported for ISP%04x, Falling back-to INTx mode\n", |
1431 | __func__); | 1432 | __func__, ha->pdev->device); |
1432 | goto try_intx; | 1433 | goto try_intx; |
1433 | } | 1434 | } |
1434 | goto try_msi; | 1435 | goto try_msi; |
@@ -1444,9 +1445,9 @@ int qla4xxx_request_irqs(struct scsi_qla_host *ha) | |||
1444 | "MSI-X: Enabled (0x%X).\n", ha->revision_id)); | 1445 | "MSI-X: Enabled (0x%X).\n", ha->revision_id)); |
1445 | goto irq_attached; | 1446 | goto irq_attached; |
1446 | } else { | 1447 | } else { |
1447 | if (is_qla8032(ha)) { | 1448 | if (is_qla8032(ha) || is_qla8042(ha)) { |
1448 | ql4_printk(KERN_INFO, ha, "%s: ISP8324: MSI-X: Falling back-to INTx mode. ret = %d\n", | 1449 | ql4_printk(KERN_INFO, ha, "%s: ISP%04x: MSI-X: Falling back-to INTx mode. ret = %d\n", |
1449 | __func__, ret); | 1450 | __func__, ha->pdev->device, ret); |
1450 | goto try_intx; | 1451 | goto try_intx; |
1451 | } | 1452 | } |
1452 | } | 1453 | } |