This simply adds a delayed_work struct to the fc_ns_port
structure. This will allow us to start a work thread
and pass it the fc_ns_port. Currently the RP work thread
is passed a fc_rport eventually it will be passed the
fc_ns_port.

This patch also moves the fc_ns_port definition to libfc.h
so that fc_rport.c can use it.

Signed-off-by: Robert Love <[EMAIL PROTECTED]>
---

 drivers/scsi/libfc/fc_ns.c |   12 ------------
 include/scsi/libfc/libfc.h |   14 ++++++++++++++
 2 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/drivers/scsi/libfc/fc_ns.c b/drivers/scsi/libfc/fc_ns.c
index 51ff66d..2bdeafa 100644
--- a/drivers/scsi/libfc/fc_ns.c
+++ b/drivers/scsi/libfc/fc_ns.c
@@ -44,18 +44,6 @@ static void fc_ns_disc_done(struct fc_lport *);
 static void fcdt_ns_error(struct fc_lport *, struct fc_frame *);
 static void fc_ns_timeout(struct work_struct *);
 
-/**
- * struct fc_ns_port - temporary discovery port to hold rport identifiers
- * @lp: Fibre Channel host port instance
- * @peers: node for list management during discovery and RSCN processing
- * @ids: identifiers structure to pass to fc_remote_port_add()
- */
-struct fc_ns_port {
-       struct fc_lport *lp;
-       struct list_head peers;
-       struct fc_rport_identifiers ids;
-};
-
 static int fc_ns_gpn_id_req(struct fc_lport *, struct fc_ns_port *);
 static void fc_ns_gpn_id_resp(struct fc_seq *, struct fc_frame *, void *);
 static void fc_ns_gpn_id_error(struct fc_ns_port *rp, struct fc_frame *fp);
diff --git a/include/scsi/libfc/libfc.h b/include/scsi/libfc/libfc.h
index b201749..085c71c 100644
--- a/include/scsi/libfc/libfc.h
+++ b/include/scsi/libfc/libfc.h
@@ -114,6 +114,20 @@ enum fc_rport_state {
 };
 
 /**
+ * struct fc_ns_port - temporary discovery port to hold rport identifiers
+ * @lp: Fibre Channel host port instance
+ * @peers: node for list management during discovery and RSCN processing
+ * @ids: identifiers structure to pass to fc_remote_port_add()
+ * @delayed_work: 
+ */
+struct fc_ns_port {
+       struct fc_lport             *lp;
+       struct list_head            peers;
+       struct fc_rport_identifiers ids;
+       struct work_struct          rport_create_work;
+};
+
+/**
  * struct fc_rport_libfc_priv - libfc internal information about a remote port
  * @local_port: Fibre Channel host port instance
  * @rp_state: state tracks progress of PLOGI, PRLI, and RTV exchanges

_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel

Reply via email to