[Open-FCoE] [PATCH 3/4] Move fc_set_rport_loss_tmo() from fc_attr.c to fc_rport.c

Steve Ma steve.ma at intel.com
Tue Sep 23 00:40:54 UTC 2008


Move the function fc_set_rport_loss_tmo() from fc_attr.c
to fc_rport.c in order to prepare for the removal of
fc_attr.c.

Signed-off-by: Steve Ma <steve.ma at intel.com>
---

 drivers/scsi/libfc/fc_attr.c  |   10 ----------
 drivers/scsi/libfc/fc_rport.c |   14 ++++++++++++++
 2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/drivers/scsi/libfc/fc_attr.c b/drivers/scsi/libfc/fc_attr.c
index 18520b7..e7f1f05 100644
--- a/drivers/scsi/libfc/fc_attr.c
+++ b/drivers/scsi/libfc/fc_attr.c
@@ -28,16 +28,6 @@ MODULE_AUTHOR("Open-FCoE.org");
 MODULE_DESCRIPTION("libfc");
 MODULE_LICENSE("GPL");
 
-void fc_set_rport_loss_tmo(struct fc_rport *rport, u32 timeout)
-{
-	if (timeout)
-		rport->dev_loss_tmo = timeout + 5;
-	else
-		rport->dev_loss_tmo = 30;
-
-}
-EXPORT_SYMBOL(fc_set_rport_loss_tmo);
-
 struct fc_host_statistics *fc_get_host_stats(struct Scsi_Host *shost)
 {
 	int i;
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index f9ede2c..a9e8f4b 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
@@ -113,6 +113,20 @@ static struct fc_rport *fc_remote_port_create(struct fc_lport *lp,
 	return rport;
 }
 
+/**
+ * fc_set_rport_loss_tmo - Set the remote port loss timeout in seconds.
+ * @rport: Pointer to Fibre Channel remote port structure
+ * @timeout: timeout in seconds
+ */
+void fc_set_rport_loss_tmo(struct fc_rport *rport, u32 timeout)
+{
+	if (timeout)
+		rport->dev_loss_tmo = timeout + 5;
+	else
+		rport->dev_loss_tmo = 30;
+}
+EXPORT_SYMBOL(fc_set_rport_loss_tmo);
+
 static inline void fc_rport_lock(struct fc_rport *rport)
 {
 	struct fc_rport_libfc_priv *rp = rport->dd_data;




More information about the devel mailing list