[Open-FCoE] [PATCH 3/5] libfc: block all rports on reset / link down

Chris Leech christopher.leech at intel.com
Thu Sep 25 19:07:48 UTC 2008


Signed-off-by: Chris Leech <christopher.leech at intel.com>
---

 drivers/scsi/libfc/fc_lport.c |    4 ++++
 drivers/scsi/libfc/fc_ns.c    |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)


diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index fe4f6cf..0f33f20 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -664,6 +664,8 @@ static void fc_lport_recv(struct fc_lport *lp, struct fc_seq *sp,
 	lp->tt.exch_done(sp);
 }
 
+extern void fc_block_rports(struct fc_lport *lp);
+
 /*
  * Put the local port back into the initial state.  Reset all sessions.
  * This is called after a SCSI reset or the driver is unloading
@@ -680,6 +682,8 @@ int fc_lport_enter_reset(struct fc_lport *lp)
 	}
 	fc_lport_ptp_clear(lp);
 
+	fc_block_rports(lp);
+
 	/*
 	 * Setting state RESET keeps fc_lport_error() callbacks
 	 * by exch_mgr_reset() from recursing on the lock.
diff --git a/drivers/scsi/libfc/fc_ns.c b/drivers/scsi/libfc/fc_ns.c
index 7624ca4..fc3a6dc 100644
--- a/drivers/scsi/libfc/fc_ns.c
+++ b/drivers/scsi/libfc/fc_ns.c
@@ -383,7 +383,7 @@ static void __scsi_target_block(struct device *dev)
 		device_for_each_child(dev, NULL, __target_block);
 }
 
-static void fc_block_rports(struct fc_lport *lp)
+void fc_block_rports(struct fc_lport *lp)
 {
 	struct Scsi_Host *shost = lp->host;
 	struct fc_rport *rport;




More information about the devel mailing list