diff options
author | Joe Eykholt <jeykholt@cisco.com> | 2010-06-11 16:44:57 -0700 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-27 12:01:53 -0500 |
commit | f034260db330bb3ffc815fcb682b1c84aca09591 (patch) | |
tree | 4570860e30b7dfcaedceff905eeb1ab244b1a504 /drivers/scsi/libfc/fc_rport.c | |
parent | 4b2164d4d212e437c9f080023a67f8f9356d2c4c (diff) | |
download | kernel_goldelico_gta04-f034260db330bb3ffc815fcb682b1c84aca09591.zip kernel_goldelico_gta04-f034260db330bb3ffc815fcb682b1c84aca09591.tar.gz kernel_goldelico_gta04-f034260db330bb3ffc815fcb682b1c84aca09591.tar.bz2 |
[SCSI] libfc: fix indefinite rport restart
Remote ports were restarting indefinitely after getting
rejects in PRLI.
Fix by adding a counter of restarts and limiting that with
the port login retry limit as well.
Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/libfc/fc_rport.c')
-rw-r--r-- | drivers/scsi/libfc/fc_rport.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c index d385efc..363cde3 100644 --- a/drivers/scsi/libfc/fc_rport.c +++ b/drivers/scsi/libfc/fc_rport.c @@ -257,6 +257,7 @@ static void fc_rport_work(struct work_struct *work) case RPORT_EV_READY: ids = rdata->ids; rdata->event = RPORT_EV_NONE; + rdata->major_retries = 0; kref_get(&rdata->kref); mutex_unlock(&rdata->rp_mutex); @@ -323,7 +324,10 @@ static void fc_rport_work(struct work_struct *work) if (port_id == FC_FID_DIR_SERV) { rdata->event = RPORT_EV_NONE; mutex_unlock(&rdata->rp_mutex); - } else if (rdata->flags & FC_RP_STARTED) { + } else if ((rdata->flags & FC_RP_STARTED) && + rdata->major_retries < + lport->max_rport_retry_count) { + rdata->major_retries++; rdata->event = RPORT_EV_NONE; FC_RPORT_DBG(rdata, "work restart\n"); fc_rport_enter_plogi(rdata); |