[Open-FCoE] [PATCH 6/7] Removed fc_port from various structures

Vasu Dev vasu.dev at intel.com
Tue Apr 1 15:26:08 UTC 2008


Removed fc_port use in :-
1. struct fc_frame
2. struct fc_local_port
3. struct fcs_state
4. struct fcs_create_args

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

 drivers/scsi/ofc/include/fc_frame.h          |    2 --
 drivers/scsi/ofc/include/fc_local_port.h     |    1 -
 drivers/scsi/ofc/include/fcs_state.h         |    1 -
 drivers/scsi/ofc/openfc/fc_local_port.c      |    2 --
 drivers/scsi/ofc/openfc/fc_local_port_impl.h |    1 -
 drivers/scsi/ofc/openfc/fcs_state.c          |    5 +----
 drivers/scsi/ofc/openfc/fcs_state_impl.h     |    1 -
 7 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/drivers/scsi/ofc/include/fc_frame.h b/drivers/scsi/ofc/include/fc_frame.h
index 116bf72..c0b3867 100644
--- a/drivers/scsi/ofc/include/fc_frame.h
+++ b/drivers/scsi/ofc/include/fc_frame.h
@@ -44,7 +44,6 @@
 #define FC_FRAME_SG_LEN 	4	/* scatter/gather list maximum length */
 
 struct fc_frame {
-	struct fc_port	*fr_in_port;	/* port where frame was received */
 	struct fcdev	*dev;		/* fc device instance */
 	struct fc_seq	*fr_seq;	/* for use with exchange manager */
 	struct fc_frame_header *fr_hdr;	/* pointer to frame header in buffer */
@@ -86,7 +85,6 @@ struct fc_frame {
  */
 static inline void fc_frame_init(struct fc_frame *fp)
 {
-	fp->fr_in_port = NULL;
 	fp->dev = NULL;
 	fp->fr_seq = NULL;
 	fp->fr_flags = 0;
diff --git a/drivers/scsi/ofc/include/fc_local_port.h b/drivers/scsi/ofc/include/fc_local_port.h
index 3626f54..6d16ea6 100644
--- a/drivers/scsi/ofc/include/fc_local_port.h
+++ b/drivers/scsi/ofc/include/fc_local_port.h
@@ -41,7 +41,6 @@ struct fc_ns_fts;
 
 struct fc_local_port *fc_local_port_create(struct fc_virt_fab *,
 					   struct fcdev *,
-					   struct fc_port *,
 					   struct fcs_state *,
 					   fc_wwn_t wwpn, fc_wwn_t wwnn,
 					   u_int timeout_msec,
diff --git a/drivers/scsi/ofc/include/fcs_state.h b/drivers/scsi/ofc/include/fcs_state.h
index c58fa4e..d6fbdb2 100644
--- a/drivers/scsi/ofc/include/fcs_state.h
+++ b/drivers/scsi/ofc/include/fcs_state.h
@@ -37,7 +37,6 @@ struct fcs_create_args {
 	int		(*fca_prli_accept)(void *arg, struct fc_remote_port *);
 	void		(*fca_prlo_notify)(void *arg, struct fc_remote_port *);
 	void		*fca_cb_arg;	/* arg for callbacks */
-	struct fc_port *fca_port;	/* transport interface to FC fabric */
 	struct fcdev	*dev;		/* transport driver instance */
 	u_int fca_service_params;	/* service parm flags from fc/fcp.h */
 	fc_xid_t	fca_min_xid;	/* starting exchange ID */
diff --git a/drivers/scsi/ofc/openfc/fc_local_port.c b/drivers/scsi/ofc/openfc/fc_local_port.c
index 537d611..2fb28d9 100644
--- a/drivers/scsi/ofc/openfc/fc_local_port.c
+++ b/drivers/scsi/ofc/openfc/fc_local_port.c
@@ -833,7 +833,6 @@ static void fc_local_port_enter_logo(struct fc_local_port *lp)
  */
 struct fc_local_port *fc_local_port_create(struct fc_virt_fab *vf,
 					   struct fcdev *dev,
-					   struct fc_port *port,
 					   struct fcs_state *sp,
 					   fc_wwn_t wwpn, fc_wwn_t wwnn,
 					   u_int timeout_msec,
@@ -848,7 +847,6 @@ struct fc_local_port *fc_local_port_create(struct fc_virt_fab *vf,
 	lp->fl_vf = vf;
 	atomic_set(&lp->fl_refcnt, 1);
 	lp->dev = dev;
-	lp->fl_port = port;
 	lp->sp = sp;
 	lp->fl_port_wwn = wwpn;
 	lp->fl_node_wwn = wwnn;
diff --git a/drivers/scsi/ofc/openfc/fc_local_port_impl.h b/drivers/scsi/ofc/openfc/fc_local_port_impl.h
index 06d6f35..8dccbcf 100644
--- a/drivers/scsi/ofc/openfc/fc_local_port_impl.h
+++ b/drivers/scsi/ofc/openfc/fc_local_port_impl.h
@@ -53,7 +53,6 @@ enum fc_local_port_state {
 struct fc_local_port {
 	struct fc_virt_fab *fl_vf;		/* virtual fabric */
 	struct list_head fl_list;		/* list headed in virt_fab */
-	struct fc_port	*fl_port;		/* port to use when sending */
 	struct fcs_state *sp;			/* fcs for this local port */
 	struct fcdev	*dev;			/* fc device instance */
 	struct fc_sess	*fl_dns_sess;		/* session for dNS queries */
diff --git a/drivers/scsi/ofc/openfc/fcs_state.c b/drivers/scsi/ofc/openfc/fcs_state.c
index 9aa4740..50119d5 100644
--- a/drivers/scsi/ofc/openfc/fcs_state.c
+++ b/drivers/scsi/ofc/openfc/fcs_state.c
@@ -183,7 +183,6 @@ void fcs_recv(struct fcs_state *sp, struct fc_frame *fp)
 {
 
 	if (sp->fs_local_port) {
-		fp->fr_in_port = sp->fs_inner_port;
 		fp->dev = sp->fs_args.dev;
 		fc_local_port_recv(sp->fs_local_port, fp);
 	} else {
@@ -218,10 +217,9 @@ int fcs_local_port_set(struct fcs_state *sp, fc_wwn_t wwnn, fc_wwn_t wwpn)
 {
 	struct fc_local_port *lp;
 
-	WARN_ON(!sp->fs_inner_port);
 	WARN_ON(sp->fs_local_port);
 	lp = fc_local_port_create(sp->fs_vf, sp->fs_args.dev,
-				  sp->fs_inner_port, sp, wwpn, wwnn,
+				  sp, wwpn, wwnn,
 				  sp->fs_args.fca_e_d_tov,
 				  sp->fs_args.fca_plogi_retries);
 	if (!lp)
@@ -459,7 +457,6 @@ static void fcs_event(int event, void *sp_arg)
 		fcs_ev_add(sp, OFC_EV_LINK_UP, NULL, 0);
 		break;
 	}
-	WARN_ON(!sp->fs_inner_port);
 }
 
 struct fc_local_port *fcs_get_local_port(struct fcs_state *sp)
diff --git a/drivers/scsi/ofc/openfc/fcs_state_impl.h b/drivers/scsi/ofc/openfc/fcs_state_impl.h
index 19b9cc0..ba1ec4b 100644
--- a/drivers/scsi/ofc/openfc/fcs_state_impl.h
+++ b/drivers/scsi/ofc/openfc/fcs_state_impl.h
@@ -31,7 +31,6 @@ struct fcs_state {
 	struct fc_virt_fab *fs_vf;		/* virtual fabric (domain) */
 	struct fc_local_port *fs_local_port;	/* local port */
 	u32	mfs;				/* max send frame size */
-	struct fc_port	*fs_inner_port;		/* port used by local port */
 	uint8_t		fs_disc_done;		/* discovery complete */
 	struct sa_event_list *events;		/* fcs events */
 };




More information about the devel mailing list