diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_mr.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mr.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mr.c b/drivers/scsi/qla2xxx/qla_mr.c index 4775baa8b6a0..80867599527d 100644 --- a/drivers/scsi/qla2xxx/qla_mr.c +++ b/drivers/scsi/qla2xxx/qla_mr.c | |||
@@ -695,11 +695,11 @@ qlafx00_pci_info_str(struct scsi_qla_host *vha, char *str) | |||
695 | } | 695 | } |
696 | 696 | ||
697 | char * | 697 | char * |
698 | qlafx00_fw_version_str(struct scsi_qla_host *vha, char *str) | 698 | qlafx00_fw_version_str(struct scsi_qla_host *vha, char *str, size_t size) |
699 | { | 699 | { |
700 | struct qla_hw_data *ha = vha->hw; | 700 | struct qla_hw_data *ha = vha->hw; |
701 | 701 | ||
702 | sprintf(str, "%s", ha->mr.fw_version); | 702 | snprintf(str, size, "%s", ha->mr.fw_version); |
703 | return str; | 703 | return str; |
704 | } | 704 | } |
705 | 705 | ||
@@ -1551,7 +1551,10 @@ qlafx00_timer_routine(scsi_qla_host_t *vha) | |||
1551 | ha->mr.fw_reset_timer_tick = | 1551 | ha->mr.fw_reset_timer_tick = |
1552 | QLAFX00_MAX_RESET_INTERVAL; | 1552 | QLAFX00_MAX_RESET_INTERVAL; |
1553 | } | 1553 | } |
1554 | ha->mr.old_aenmbx0_state = aenmbx0; | 1554 | if (ha->mr.old_aenmbx0_state != aenmbx0) { |
1555 | ha->mr.old_aenmbx0_state = aenmbx0; | ||
1556 | ha->mr.fw_reset_timer_tick = QLAFX00_RESET_INTERVAL; | ||
1557 | } | ||
1555 | ha->mr.fw_reset_timer_tick--; | 1558 | ha->mr.fw_reset_timer_tick--; |
1556 | } | 1559 | } |
1557 | if (test_bit(FX00_CRITEMP_RECOVERY, &vha->dpc_flags)) { | 1560 | if (test_bit(FX00_CRITEMP_RECOVERY, &vha->dpc_flags)) { |
@@ -1675,17 +1678,16 @@ qlafx00_get_fcport(struct scsi_qla_host *vha, int tgt_id) | |||
1675 | fc_port_t *fcport; | 1678 | fc_port_t *fcport; |
1676 | 1679 | ||
1677 | /* Check for matching device in remote port list. */ | 1680 | /* Check for matching device in remote port list. */ |
1678 | fcport = NULL; | ||
1679 | list_for_each_entry(fcport, &vha->vp_fcports, list) { | 1681 | list_for_each_entry(fcport, &vha->vp_fcports, list) { |
1680 | if (fcport->tgt_id == tgt_id) { | 1682 | if (fcport->tgt_id == tgt_id) { |
1681 | ql_dbg(ql_dbg_async, vha, 0x5072, | 1683 | ql_dbg(ql_dbg_async, vha, 0x5072, |
1682 | "Matching fcport(%p) found with TGT-ID: 0x%x " | 1684 | "Matching fcport(%p) found with TGT-ID: 0x%x " |
1683 | "and Remote TGT_ID: 0x%x\n", | 1685 | "and Remote TGT_ID: 0x%x\n", |
1684 | fcport, fcport->tgt_id, tgt_id); | 1686 | fcport, fcport->tgt_id, tgt_id); |
1685 | break; | 1687 | return fcport; |
1686 | } | 1688 | } |
1687 | } | 1689 | } |
1688 | return fcport; | 1690 | return NULL; |
1689 | } | 1691 | } |
1690 | 1692 | ||
1691 | static void | 1693 | static void |
@@ -2924,7 +2926,7 @@ qlafx00_intr_handler(int irq, void *dev_id) | |||
2924 | vha = pci_get_drvdata(ha->pdev); | 2926 | vha = pci_get_drvdata(ha->pdev); |
2925 | for (iter = 50; iter--; clr_intr = 0) { | 2927 | for (iter = 50; iter--; clr_intr = 0) { |
2926 | stat = QLAFX00_RD_INTR_REG(ha); | 2928 | stat = QLAFX00_RD_INTR_REG(ha); |
2927 | if (qla2x00_check_reg_for_disconnect(vha, stat)) | 2929 | if (qla2x00_check_reg32_for_disconnect(vha, stat)) |
2928 | break; | 2930 | break; |
2929 | intr_stat = stat & QLAFX00_HST_INT_STS_BITS; | 2931 | intr_stat = stat & QLAFX00_HST_INT_STS_BITS; |
2930 | if (!intr_stat) | 2932 | if (!intr_stat) |