scsi: libfc: Do not login if the port is already started
When the port is already started we don't need to login; that will only confuse the state machine. Signed-off-by: Hannes Reinecke <hare@suse.com> Acked-by: Johannes Thumshirn <jth@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
e5a20009da
commit
06ee2571a4
|
@ -418,6 +418,12 @@ static int fc_rport_login(struct fc_rport_priv *rdata)
|
|||
{
|
||||
mutex_lock(&rdata->rp_mutex);
|
||||
|
||||
if (rdata->flags & FC_RP_STARTED) {
|
||||
FC_RPORT_DBG(rdata, "port already started\n");
|
||||
mutex_unlock(&rdata->rp_mutex);
|
||||
return 0;
|
||||
}
|
||||
|
||||
rdata->flags |= FC_RP_STARTED;
|
||||
switch (rdata->rp_state) {
|
||||
case RPORT_ST_READY:
|
||||
|
|
Loading…
Reference in New Issue