Commit 0754d5e0 authored by Quinn Tran's avatar Quinn Tran Committed by Martin K. Petersen

scsi: qla2xxx: Decrement login retry count for only plogi

Decrement login retry count only for plogi instead of number of attempts made
for login.
Signed-off-by: default avatarQuinn Tran <quinn.tran@cavium.com>
Signed-off-by: default avatarHimanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent cd4ed6b4
...@@ -1276,7 +1276,8 @@ static void qla_chk_n2n_b4_login(struct scsi_qla_host *vha, fc_port_t *fcport) ...@@ -1276,7 +1276,8 @@ static void qla_chk_n2n_b4_login(struct scsi_qla_host *vha, fc_port_t *fcport)
login = 1; login = 1;
} }
if (login) { if (login && fcport->login_retry) {
fcport->login_retry--;
if (fcport->loop_id == FC_NO_LOOP_ID) { if (fcport->loop_id == FC_NO_LOOP_ID) {
fcport->fw_login_state = DSC_LS_PORT_UNAVAIL; fcport->fw_login_state = DSC_LS_PORT_UNAVAIL;
rc = qla2x00_find_new_loop_id(vha, fcport); rc = qla2x00_find_new_loop_id(vha, fcport);
...@@ -1302,13 +1303,12 @@ int qla24xx_fcport_handle_login(struct scsi_qla_host *vha, fc_port_t *fcport) ...@@ -1302,13 +1303,12 @@ int qla24xx_fcport_handle_login(struct scsi_qla_host *vha, fc_port_t *fcport)
u64 wwn; u64 wwn;
u16 sec; u16 sec;
ql_dbg(ql_dbg_disc, vha, 0x20d8, ql_dbg(ql_dbg_disc + ql_dbg_verbose, vha, 0x20d8,
"%s %8phC DS %d LS %d P %d fl %x confl %p rscn %d|%d login %d retry %d lid %d scan %d\n", "%s %8phC DS %d LS %d P %d fl %x confl %p rscn %d|%d login %d lid %d scan %d\n",
__func__, fcport->port_name, fcport->disc_state, __func__, fcport->port_name, fcport->disc_state,
fcport->fw_login_state, fcport->login_pause, fcport->flags, fcport->fw_login_state, fcport->login_pause, fcport->flags,
fcport->conflict, fcport->last_rscn_gen, fcport->rscn_gen, fcport->conflict, fcport->last_rscn_gen, fcport->rscn_gen,
fcport->login_gen, fcport->login_retry, fcport->login_gen, fcport->loop_id, fcport->scan_state);
fcport->loop_id, fcport->scan_state);
if (fcport->scan_state != QLA_FCPORT_FOUND) if (fcport->scan_state != QLA_FCPORT_FOUND)
return 0; return 0;
...@@ -1407,10 +1407,6 @@ int qla24xx_fcport_handle_login(struct scsi_qla_host *vha, fc_port_t *fcport) ...@@ -1407,10 +1407,6 @@ int qla24xx_fcport_handle_login(struct scsi_qla_host *vha, fc_port_t *fcport)
break; break;
case DSC_LOGIN_FAILED: case DSC_LOGIN_FAILED:
fcport->login_retry--;
ql_dbg(ql_dbg_disc, vha, 0x20d0,
"%s %d %8phC post gidpn\n",
__func__, __LINE__, fcport->port_name);
if (N2N_TOPO(vha->hw)) if (N2N_TOPO(vha->hw))
qla_chk_n2n_b4_login(vha, fcport); qla_chk_n2n_b4_login(vha, fcport);
else else
...@@ -1419,10 +1415,6 @@ int qla24xx_fcport_handle_login(struct scsi_qla_host *vha, fc_port_t *fcport) ...@@ -1419,10 +1415,6 @@ int qla24xx_fcport_handle_login(struct scsi_qla_host *vha, fc_port_t *fcport)
case DSC_LOGIN_COMPLETE: case DSC_LOGIN_COMPLETE:
/* recheck login state */ /* recheck login state */
ql_dbg(ql_dbg_disc, vha, 0x20d1,
"%s %d %8phC post adisc\n",
__func__, __LINE__, fcport->port_name);
fcport->login_retry--;
data[0] = data[1] = 0; data[0] = data[1] = 0;
qla2x00_post_async_adisc_work(vha, fcport, data); qla2x00_post_async_adisc_work(vha, fcport, data);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment