[Open-FCoE] [RFC PATCH 2/5] libfc: skip lport reset in case the lport port_id is zero

Vasu Dev vasu.dev at intel.com
Fri Jan 14 20:13:34 UTC 2011


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

 drivers/scsi/libfc/fc_lport.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index 903a5db..b32b7a2 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -975,8 +975,12 @@ static void fc_lport_enter_reset(struct fc_lport *lport)
 			fc_vport_set_state(lport->vport, FC_VPORT_LINKDOWN);
 	}
 	fc_lport_state_enter(lport, LPORT_ST_RESET);
-	fc_vports_linkchange(lport);
-	fc_lport_reset_locked(lport);
+
+	if (lport->port_id) {
+		fc_vports_linkchange(lport);
+		fc_lport_reset_locked(lport);
+	}
+
 	if (lport->link_up)
 		fc_lport_enter_flogi(lport);
 }




More information about the devel mailing list