Commit e5a20009 authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Martin K. Petersen

scsi: libfc: Do not drop down to FLOGI for fc_rport_login()

When fc_rport_login() is called while the rport is not
in RPORT_ST_INIT, RPORT_ST_READY, or RPORT_ST_DELETE
login is already in progress and there's no need to
drop down to FLOGI; doing so will only confuse the
other side.
Signed-off-by: default avatarHannes Reinecke <hare@suse.com>
Acked-by: default avatarJohannes Thumshirn <jth@kernel.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 785141c6
...@@ -427,10 +427,14 @@ static int fc_rport_login(struct fc_rport_priv *rdata) ...@@ -427,10 +427,14 @@ static int fc_rport_login(struct fc_rport_priv *rdata)
case RPORT_ST_DELETE: case RPORT_ST_DELETE:
FC_RPORT_DBG(rdata, "Restart deleted port\n"); FC_RPORT_DBG(rdata, "Restart deleted port\n");
break; break;
default: case RPORT_ST_INIT:
FC_RPORT_DBG(rdata, "Login to port\n"); FC_RPORT_DBG(rdata, "Login to port\n");
fc_rport_enter_flogi(rdata); fc_rport_enter_flogi(rdata);
break; break;
default:
FC_RPORT_DBG(rdata, "Login in progress, state %s\n",
fc_rport_state(rdata));
break;
} }
mutex_unlock(&rdata->rp_mutex); mutex_unlock(&rdata->rp_mutex);
......
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