[Open-FCoE] [PATCH 4/7] Removed use of inner port ready check

Vasu Dev vasu.dev at intel.com
Tue Apr 1 15:25:58 UTC 2008


Instead used existing lp->fl_login_req flag  in
ready/down events handling for local port since these
events were setting port ready state accordingly via
inner port events.

Signed-off-by: Vasu Dev <vasu.dev at intel.com>
---

 drivers/scsi/ofc/openfc/fc_local_port.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/ofc/openfc/fc_local_port.c b/drivers/scsi/ofc/openfc/fc_local_port.c
index dcfc54e..3f85c20 100644
--- a/drivers/scsi/ofc/openfc/fc_local_port.c
+++ b/drivers/scsi/ofc/openfc/fc_local_port.c
@@ -1101,7 +1101,7 @@ static void fc_local_port_enter_init(struct fc_local_port *lp)
 	fc_local_port_enter_state(lp, LOCAL_PORT_ST_INIT);
 	sa_event_call_cancel(lp->fl_events, FC_EV_READY);
 	sa_event_call_defer(lp->fl_events, FC_EV_CLOSED);
-	if (lp->fl_logon_req && fc_port_ready(lp->fl_port))
+	if (lp->fl_logon_req)
 		fc_local_port_enter_flogi(lp);
 }
 
@@ -1555,6 +1555,7 @@ static void fc_local_port_fcs_event(int event, void *lp_arg)
 		OFC_DBG("local fid %6x port event %d\n", lp->fl_fid, event);
 	switch ((enum fc_event)event) {
 	case FC_EV_READY:
+		lp->fl_logon_req = 1;
 		fc_local_port_lock(lp);
 		if (lp->fl_logon_req && lp->fl_state == LOCAL_PORT_ST_INIT)
 			fc_local_port_enter_flogi(lp);
@@ -1563,6 +1564,7 @@ static void fc_local_port_fcs_event(int event, void *lp_arg)
 
 	case FC_EV_DOWN:
 	case FC_EV_CLOSED:	/* FCS or upper layer should handle */
+		lp->fl_logon_req = 0;
 		fc_local_port_reset(lp);
 		break;
 




More information about the devel mailing list