diff options
author | Quinn Tran <quinn.tran@cavium.com> | 2017-01-20 07:28:01 +0100 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2017-02-09 09:39:01 +0100 |
commit | ead038556f646788e22ad7f0398556d10981ca5f (patch) | |
tree | 0627114e9d75f7363e679bbe5366f94033be9651 /drivers/scsi/qla2xxx/qla_isr.c | |
parent | qla2xxx: Add framework for async fabric discovery (diff) | |
download | linux-ead038556f646788e22ad7f0398556d10981ca5f.tar.xz linux-ead038556f646788e22ad7f0398556d10981ca5f.zip |
qla2xxx: Add Dual mode support in the driver
Add switch to allow both Initiator Mode & Target
mode to operate at the same time.
Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_isr.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_isr.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index bb747d7ebdab..a0a3412030cb 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -1025,7 +1025,8 @@ global_port_update: qla2x00_mark_all_devices_lost(vha, 1); - if (vha->vp_idx == 0 && !qla_ini_mode_enabled(vha)) + if (vha->vp_idx == 0 && + (qla_tgt_mode_enabled(vha) || qla_dual_mode_enabled(vha))) set_bit(SCR_PENDING, &vha->dpc_flags); set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); @@ -1637,6 +1638,7 @@ qla24xx_logio_entry(scsi_qla_host_t *vha, struct req_que *req, fcport->d_id.b.area, fcport->d_id.b.al_pa, le32_to_cpu(logio->io_parameter[0])); + vha->hw->exch_starvation = 0; data[0] = MBS_COMMAND_COMPLETE; if (sp->type != SRB_LOGIN_CMD) goto logio_done; @@ -1672,6 +1674,21 @@ qla24xx_logio_entry(scsi_qla_host_t *vha, struct req_que *req, case LSC_SCODE_NPORT_USED: data[0] = MBS_LOOP_ID_USED; break; + case LSC_SCODE_NOXCB: + vha->hw->exch_starvation++; + if (vha->hw->exch_starvation > 5) { + ql_log(ql_log_warn, vha, 0xffff, + "Exchange starvation. Resetting RISC\n"); + + vha->hw->exch_starvation = 0; + + if (IS_P3P_TYPE(vha->hw)) + set_bit(FCOE_CTX_RESET_NEEDED, &vha->dpc_flags); + else + set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); + qla2xxx_wake_dpc(vha); + } + /* drop through */ default: data[0] = MBS_COMMAND_ERROR; break; |