diff options
author | Hannes Reinecke <hare@suse.de> | 2016-09-30 11:01:18 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-11-08 17:29:47 -0500 |
commit | 06ee2571a438653bd14c33c70379a5f008a91901 (patch) | |
tree | 8b3dde0e59f316662d1c976008f22251132b19bc /drivers/scsi/libfc/fc_rport.c | |
parent | e5a20009dae054344d71a79e9bfbea84152f3eb8 (diff) | |
download | linux-06ee2571a438653bd14c33c70379a5f008a91901.tar.bz2 |
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>
Diffstat (limited to 'drivers/scsi/libfc/fc_rport.c')
-rw-r--r-- | drivers/scsi/libfc/fc_rport.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c index 4e4087a00836..72a7183fdd06 100644 --- a/drivers/scsi/libfc/fc_rport.c +++ b/drivers/scsi/libfc/fc_rport.c @@ -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: |