diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-07 21:29:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-07 21:29:18 -0400 |
commit | 9a50aaefc1b896e734bf7faf3d085f71a360ce97 (patch) | |
tree | 82fd9003d6c1d1a7dcf107f46d77b92f11d3f697 /drivers/scsi/qla2xxx/qla_mr.c | |
parent | 1e345ac6869cd2f2d5d4b780fc5d5332dd1e8905 (diff) | |
parent | 19ac97ff701ae3c0eda09dd88f590806f1c4eb2d (diff) |
Merge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI updates from James Bottomley:
"This patch set consists of the usual driver updates (megaraid_sas,
arcmsr, be2iscsi, lpfc, mpt2sas, mpt3sas, qla2xxx, ufs) plus several
assorted fixes and miscellaneous updates (including the
pci_msix_enable_range() changes that have been pending for a while)"
* tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (202 commits)
scsi: add a CONFIG_SCSI_MQ_DEFAULT option
ufs: definitions for phy interface
ufs: tune bkops while power managment events
ufs: Add support for clock scaling using devfreq framework
ufs: Add freq-table-hz property for UFS device
ufs: Add support for clock gating
ufs: refactor configuring power mode
ufs: add UFS power management support
ufs: introduce well known logical unit in ufs
ufs: manually add well known logical units
ufs: Active Power Mode - configuring bActiveICCLevel
ufs: improve init sequence
ufs: refactor query descriptor API support
ufs: add voting support for host controller power
ufs: Add clock initialization support
ufs: Add regulator enable support
ufs: Allow vendor specific initialization
scsi: don't add scsi_device if its already visible
scsi: fix the type for well known LUs
scsi: fix comment in struct Scsi_Host definition
...
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 4775baa8b6a..80867599527 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) } char * -qlafx00_fw_version_str(struct scsi_qla_host *vha, char *str) +qlafx00_fw_version_str(struct scsi_qla_host *vha, char *str, size_t size) { struct qla_hw_data *ha = vha->hw; - sprintf(str, "%s", ha->mr.fw_version); + snprintf(str, size, "%s", ha->mr.fw_version); return str; } @@ -1551,7 +1551,10 @@ qlafx00_timer_routine(scsi_qla_host_t *vha) ha->mr.fw_reset_timer_tick = QLAFX00_MAX_RESET_INTERVAL; } - ha->mr.old_aenmbx0_state = aenmbx0; + if (ha->mr.old_aenmbx0_state != aenmbx0) { + ha->mr.old_aenmbx0_state = aenmbx0; + ha->mr.fw_reset_timer_tick = QLAFX00_RESET_INTERVAL; + } ha->mr.fw_reset_timer_tick--; } if (test_bit(FX00_CRITEMP_RECOVERY, &vha->dpc_flags)) { @@ -1675,17 +1678,16 @@ qlafx00_get_fcport(struct scsi_qla_host *vha, int tgt_id) fc_port_t *fcport; /* Check for matching device in remote port list. */ - fcport = NULL; list_for_each_entry(fcport, &vha->vp_fcports, list) { if (fcport->tgt_id == tgt_id) { ql_dbg(ql_dbg_async, vha, 0x5072, "Matching fcport(%p) found with TGT-ID: 0x%x " "and Remote TGT_ID: 0x%x\n", fcport, fcport->tgt_id, tgt_id); - break; + return fcport; } } - return fcport; + return NULL; } static void @@ -2924,7 +2926,7 @@ qlafx00_intr_handler(int irq, void *dev_id) vha = pci_get_drvdata(ha->pdev); for (iter = 50; iter--; clr_intr = 0) { stat = QLAFX00_RD_INTR_REG(ha); - if (qla2x00_check_reg_for_disconnect(vha, stat)) + if (qla2x00_check_reg32_for_disconnect(vha, stat)) break; intr_stat = stat & QLAFX00_HST_INT_STS_BITS; if (!intr_stat) |