summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_init.c
diff options
context:
space:
mode:
authorQuinn Tran <quinn.tran@cavium.com>2017-12-28 12:33:22 -0800
committerMartin K. Petersen <martin.petersen@oracle.com>2018-01-03 23:41:06 -0500
commit82abdcaf3ededf5ad18644ac7a416f5e4f95a7fe (patch)
tree4b7594825844cc4a117a5d4ed2be9998a0de27f1 /drivers/scsi/qla2xxx/qla_init.c
parent045d6ea200af794ba15515984cff63787a7fc3c0 (diff)
downloadblackbird-op-linux-82abdcaf3ededf5ad18644ac7a416f5e4f95a7fe.tar.gz
blackbird-op-linux-82abdcaf3ededf5ad18644ac7a416f5e4f95a7fe.zip
scsi: qla2xxx: Allow target mode to accept PRLI in dual mode
For Dual Mode, Initiator side of the driver finish login, target side receive PRLI, but driver terminates PRLI. This patch allows target side to go ahead and accept PRLI. Signed-off-by: Quinn Tran <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_init.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 4e6d3eb4caa4..34ee8c755655 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -1537,6 +1537,7 @@ qla24xx_handle_plogi_done_event(struct scsi_qla_host *vha, struct event_arg *ea)
port_id_t cid; /* conflict Nport id */
u16 lid;
struct fc_port *conflict_fcport;
+ unsigned long flags;
switch (ea->data[0]) {
case MBS_COMMAND_COMPLETE:
@@ -1557,10 +1558,14 @@ qla24xx_handle_plogi_done_event(struct scsi_qla_host *vha, struct event_arg *ea)
ea->fcport->loop_id, ea->fcport->d_id.b24);
set_bit(ea->fcport->loop_id, vha->hw->loop_id_map);
+ spin_lock_irqsave(&vha->hw->tgt.sess_lock, flags);
ea->fcport->loop_id = FC_NO_LOOP_ID;
ea->fcport->chip_reset = vha->hw->base_qpair->chip_reset;
ea->fcport->logout_on_delete = 1;
ea->fcport->send_els_logo = 0;
+ ea->fcport->fw_login_state = DSC_LS_PRLI_COMP;
+ spin_unlock_irqrestore(&vha->hw->tgt.sess_lock, flags);
+
qla24xx_post_gpdb_work(vha, ea->fcport, 0);
}
break;
OpenPOWER on IntegriCloud