public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix computation related to FC_EX_CLOSED in FC local port
@ 2010-12-16 15:54 Hillf Danton
  2010-12-16 20:05 ` [Open-FCoE] " Vasu Dev
  0 siblings, 1 reply; 3+ messages in thread
From: Hillf Danton @ 2010-12-16 15:54 UTC (permalink / raw)
  To: devel; +Cc: Joe Eykholt, linux-scsi

In fc_lport_error(), FC_EX_CLOSED could be understood to be no more
rettries, so resetting local port is reasonable and necessary.

When processing response to flogi request, FC_EX_CLOSED should be
treated as other errors, since the state machine of local port could
reach reset.

Signed-off-by: Hillf Danton <dhillf@gmail.com>
---

--- a/drivers/scsi/libfc/fc_lport.c	2010-11-01 19:54:12.000000000 +0800
+++ b/drivers/scsi/libfc/fc_lport.c	2010-12-16 23:46:06.000000000 +0800
@@ -1013,7 +1013,7 @@ static void fc_lport_error(struct fc_lpo
 		     lport->retry_count);

 	if (PTR_ERR(fp) == -FC_EX_CLOSED)
-		return;
+		goto reset;

 	/*
 	 * Memory allocation failure, or the exchange timed out
@@ -1029,6 +1029,7 @@ static void fc_lport_error(struct fc_lpo

 		schedule_delayed_work(&lport->retry_work, delay);
 	} else
+ reset:
 		fc_lport_enter_reset(lport);
 }

@@ -1428,9 +1429,6 @@ void fc_lport_flogi_resp(struct fc_seq *

 	FC_LPORT_DBG(lport, "Received a FLOGI %s\n", fc_els_resp_type(fp));

-	if (fp == ERR_PTR(-FC_EX_CLOSED))
-		return;
-
 	mutex_lock(&lport->lp_mutex);

 	if (lport->state != LPORT_ST_FLOGI) {

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-12-17 13:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-16 15:54 [PATCH] fix computation related to FC_EX_CLOSED in FC local port Hillf Danton
2010-12-16 20:05 ` [Open-FCoE] " Vasu Dev
2010-12-17 13:17   ` Hillf Danton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox