scsi: qla2xxx: Move GPSC and GFPNID out of session management
Move GPSC & GFPNID commands out of session management to reduce time lag in reporting the session state to remote port. These commands are not essential when it comes to maintaining the rport state. Delay sending these commands after rport state is set to Online. 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>
This commit is contained in:
committed by
Martin K. Petersen
parent
bee8b84686
commit
cc28e0ace9
@@ -3175,7 +3175,6 @@ int qla24xx_async_gidpn(scsi_qla_host_t *vha, fc_port_t *fcport)
|
||||
|
||||
done_free_sp:
|
||||
sp->free(sp);
|
||||
fcport->flags &= ~FCF_ASYNC_SENT;
|
||||
done:
|
||||
fcport->flags &= ~FCF_ASYNC_ACTIVE;
|
||||
return rval;
|
||||
@@ -3239,7 +3238,7 @@ void qla24xx_handle_gpsc_event(scsi_qla_host_t *vha, struct event_arg *ea)
|
||||
return;
|
||||
}
|
||||
|
||||
qla24xx_post_upd_fcport_work(vha, ea->fcport);
|
||||
qla_post_iidma_work(vha, fcport);
|
||||
}
|
||||
|
||||
static void qla24xx_async_gpsc_sp_done(void *s, int res)
|
||||
@@ -3257,8 +3256,6 @@ static void qla24xx_async_gpsc_sp_done(void *s, int res)
|
||||
"Async done-%s res %x, WWPN %8phC \n",
|
||||
sp->name, res, fcport->port_name);
|
||||
|
||||
fcport->flags &= ~(FCF_ASYNC_SENT | FCF_ASYNC_ACTIVE);
|
||||
|
||||
if (res == (DID_ERROR << 16)) {
|
||||
/* entry status error */
|
||||
goto done;
|
||||
@@ -3327,7 +3324,6 @@ int qla24xx_async_gpsc(scsi_qla_host_t *vha, fc_port_t *fcport)
|
||||
if (!sp)
|
||||
goto done;
|
||||
|
||||
fcport->flags |= FCF_ASYNC_SENT;
|
||||
sp->type = SRB_CT_PTHRU_CMD;
|
||||
sp->name = "gpsc";
|
||||
sp->gen1 = fcport->rscn_gen;
|
||||
@@ -4555,7 +4551,6 @@ int qla24xx_async_gnnid(scsi_qla_host_t *vha, fc_port_t *fcport)
|
||||
|
||||
done_free_sp:
|
||||
sp->free(sp);
|
||||
fcport->flags &= ~FCF_ASYNC_SENT;
|
||||
done:
|
||||
return rval;
|
||||
}
|
||||
@@ -4617,7 +4612,6 @@ static void qla2x00_async_gfpnid_sp_done(void *s, int res)
|
||||
struct event_arg ea;
|
||||
u64 wwn;
|
||||
|
||||
fcport->flags &= ~FCF_ASYNC_SENT;
|
||||
wwn = wwn_to_u64(fpn);
|
||||
if (wwn)
|
||||
memcpy(fcport->fabric_port_name, fpn, WWN_SIZE);
|
||||
@@ -4646,12 +4640,10 @@ int qla24xx_async_gfpnid(scsi_qla_host_t *vha, fc_port_t *fcport)
|
||||
if (!vha->flags.online || (fcport->flags & FCF_ASYNC_SENT))
|
||||
return rval;
|
||||
|
||||
fcport->disc_state = DSC_GFPN_ID;
|
||||
sp = qla2x00_get_sp(vha, fcport, GFP_ATOMIC);
|
||||
if (!sp)
|
||||
goto done;
|
||||
|
||||
fcport->flags |= FCF_ASYNC_SENT;
|
||||
sp->type = SRB_CT_PTHRU_CMD;
|
||||
sp->name = "gfpnid";
|
||||
sp->gen1 = fcport->rscn_gen;
|
||||
|
||||
Reference in New Issue
Block a user