aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc/fc_rport.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2016-09-30 11:01:17 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2016-11-08 17:29:47 -0500
commite5a20009dae054344d71a79e9bfbea84152f3eb8 (patch)
treed9ee32ff8a4ba467562195116d15e8460b80df1a /drivers/scsi/libfc/fc_rport.c
parentscsi: libfc: Do not take rdata->rp_mutex when processing a -FC_EX_CLOSED ELS response. (diff)
downloadlinux-dev-e5a20009dae054344d71a79e9bfbea84152f3eb8.tar.xz
linux-dev-e5a20009dae054344d71a79e9bfbea84152f3eb8.zip
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: Hannes Reinecke <hare@suse.com> Acked-by: Johannes Thumshirn <jth@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/libfc/fc_rport.c')
-rw-r--r--drivers/scsi/libfc/fc_rport.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index ff33ae6bdf7c..4e4087a00836 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
@@ -427,10 +427,14 @@ static int fc_rport_login(struct fc_rport_priv *rdata)
case RPORT_ST_DELETE:
FC_RPORT_DBG(rdata, "Restart deleted port\n");
break;
- default:
+ case RPORT_ST_INIT:
FC_RPORT_DBG(rdata, "Login to port\n");
fc_rport_enter_flogi(rdata);
break;
+ default:
+ FC_RPORT_DBG(rdata, "Login in progress, state %s\n",
+ fc_rport_state(rdata));
+ break;
}
mutex_unlock(&rdata->rp_mutex);