aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJoe Eykholt <jeykholt@cisco.com>2010-06-11 19:44:57 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-27 13:01:53 -0400
commitf034260db330bb3ffc815fcb682b1c84aca09591 (patch)
tree4570860e30b7dfcaedceff905eeb1ab244b1a504 /drivers
parent4b2164d4d212e437c9f080023a67f8f9356d2c4c (diff)
[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')
-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 d385efc68c15..363cde30c940 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)
257 case RPORT_EV_READY: 257 case RPORT_EV_READY:
258 ids = rdata->ids; 258 ids = rdata->ids;
259 rdata->event = RPORT_EV_NONE; 259 rdata->event = RPORT_EV_NONE;
260 rdata->major_retries = 0;
260 kref_get(&rdata->kref); 261 kref_get(&rdata->kref);
261 mutex_unlock(&rdata->rp_mutex); 262 mutex_unlock(&rdata->rp_mutex);
262 263
@@ -323,7 +324,10 @@ static void fc_rport_work(struct work_struct *work)
323 if (port_id == FC_FID_DIR_SERV) { 324 if (port_id == FC_FID_DIR_SERV) {
324 rdata->event = RPORT_EV_NONE; 325 rdata->event = RPORT_EV_NONE;
325 mutex_unlock(&rdata->rp_mutex); 326 mutex_unlock(&rdata->rp_mutex);
326 } else if (rdata->flags & FC_RP_STARTED) { 327 } else if ((rdata->flags & FC_RP_STARTED) &&
328 rdata->major_retries <
329 lport->max_rport_retry_count) {
330 rdata->major_retries++;
327 rdata->event = RPORT_EV_NONE; 331 rdata->event = RPORT_EV_NONE;
328 FC_RPORT_DBG(rdata, "work restart\n"); 332 FC_RPORT_DBG(rdata, "work restart\n");
329 fc_rport_enter_plogi(rdata); 333 fc_rport_enter_plogi(rdata);