Skip to content

Commit

Permalink
scsi: qla2xxx: Fix Rport and session state getting out of sync
Browse files Browse the repository at this point in the history
This patch fixes rport state and session state getting out of sync.

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>
  • Loading branch information
Quinn Tran authored and Martin K. Petersen committed May 8, 2018
1 parent 625a1ca commit 2952849
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions drivers/scsi/qla2xxx/qla_target.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,24 +601,18 @@ void qla2x00_async_nack_sp_done(void *s, int res)

vha->fcport_count++;

if (!IS_IIDMA_CAPABLE(vha->hw) ||
!vha->hw->flags.gpsc_supported) {
ql_dbg(ql_dbg_disc, vha, 0x20f3,
"%s %d %8phC post upd_fcport fcp_cnt %d\n",
__func__, __LINE__,
sp->fcport->port_name,
vha->fcport_count);
sp->fcport->disc_state = DSC_UPD_FCPORT;
qla24xx_post_upd_fcport_work(vha, sp->fcport);
} else {
ql_dbg(ql_dbg_disc, vha, 0x20f5,
"%s %d %8phC post gpsc fcp_cnt %d\n",
__func__, __LINE__,
sp->fcport->port_name,
vha->fcport_count);

qla24xx_post_gpsc_work(vha, sp->fcport);
}
ql_dbg(ql_dbg_disc, vha, 0x20f3,
"%s %d %8phC post upd_fcport fcp_cnt %d\n",
__func__, __LINE__,
sp->fcport->port_name,
vha->fcport_count);
sp->fcport->disc_state = DSC_UPD_FCPORT;
qla24xx_post_upd_fcport_work(vha, sp->fcport);
} else {
sp->fcport->login_retry = 0;
sp->fcport->disc_state = DSC_LOGIN_COMPLETE;
sp->fcport->deleted = 0;
sp->fcport->logout_on_delete = 1;
}
break;

Expand Down

0 comments on commit 2952849

Please sign in to comment.