Skip to content

Commit

Permalink
scsi: qla2xxx: Fix sending ADISC command for login
Browse files Browse the repository at this point in the history
This patch fixes login_retry login for ADISC command.

when login_retry count reaches 0, further attempt to send ADISC command
is ignored by the code. Remove this redundant login_retry count check
from qla24xx_fcport_handle_login()

[mkp: fix typo]

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 f6972d7 commit 625a1ca
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/scsi/qla2xxx/qla_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1167,9 +1167,6 @@ int qla24xx_fcport_handle_login(struct scsi_qla_host *vha, fc_port_t *fcport)
fcport->login_gen, fcport->login_retry,
fcport->loop_id, fcport->scan_state);

if (fcport->login_retry == 0)
return 0;

if (fcport->scan_state != QLA_FCPORT_FOUND)
return 0;

Expand All @@ -1194,7 +1191,8 @@ int qla24xx_fcport_handle_login(struct scsi_qla_host *vha, fc_port_t *fcport)
return 0;
}

fcport->login_retry--;
if (fcport->login_retry > 0)
fcport->login_retry--;

switch (fcport->disc_state) {
case DSC_DELETED:
Expand Down

0 comments on commit 625a1ca

Please sign in to comment.