[Open-FCoE] [PATCH 1/5] Removed outer port allocation

Vasu Dev vasu.dev at intel.com
Tue Apr 1 14:12:28 UTC 2008


Removed outer port allocation from FCS in fcs_create().
Used fcs_recv() outer port ingress function directly inside
FCS.

The outer port egress, mfs and frame-alloc functions using
removed outer port instance are fixed in next few patches
of this series.

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

 drivers/scsi/ofc/openfc/openfc_if.c |   19 +------------------
 1 files changed, 1 insertions(+), 18 deletions(-)

diff --git a/drivers/scsi/ofc/openfc/openfc_if.c b/drivers/scsi/ofc/openfc/openfc_if.c
index 786f8a6..ab26a9b 100644
--- a/drivers/scsi/ofc/openfc/openfc_if.c
+++ b/drivers/scsi/ofc/openfc/openfc_if.c
@@ -801,9 +801,8 @@ static void openfc_timeout_handler(ulong vp)
 void openfc_rcv(struct fcdev *dev, struct fc_frame *fp)
 {
 	struct openfc_softc *openfcp = openfc_get_softc(dev);
-	struct fc_port *portp = openfcp->fcs_port;
 
-	fc_port_ingress(portp, fp);
+	fcs_recv(openfcp->fcs_state, fp);
 }
 EXPORT_SYMBOL(openfc_rcv);
 
@@ -923,7 +922,6 @@ int openfc_register(struct fcdev *dev)
 {
 	struct openfc_softc *openfcp;
 	struct Scsi_Host *host;
-	struct fc_port *port;
 	struct class_device *cp;
 	int i;
 	int rc;
@@ -971,19 +969,6 @@ int openfc_register(struct fcdev *dev)
 	 */
 	openfcp->state = OPENFC_INITIALIZATION;
 	openfcp->status = OPENFC_LINK_UP;
-	port = fc_port_alloc();
-	if (!port) {
-		OFC_DBG("Could not create fc_port structure");
-		goto out_host_rem;
-	}
-	openfcp->fcs_port = port;
-	if (dev->port_ops.frame_alloc)
-		fc_port_set_frame_alloc(port, dev->port_ops.frame_alloc);
-
-	fc_port_set_egress(port,
-			   (int (*)(void *, struct fc_frame *))dev->port_ops.
-			   send, dev);
-	ofc_fcs_args.fca_port = port;
 
 	if (dev->min_xid)
 		ofc_fcs_args.fca_min_xid = dev->min_xid;
@@ -994,12 +979,10 @@ int openfc_register(struct fcdev *dev)
 	else
 		ofc_fcs_args.fca_max_xid = OPENFC_MAX_XID;
 
-	fc_port_set_max_frame_size(port, dev->framesize);
 	ofc_fcs_args.fca_cb_arg = (void *)openfcp;
 	openfcp->fcs_state = fcs_create(&ofc_fcs_args);
 	if (openfcp->fcs_state == NULL) {
 		OFC_DBG("Could not create fcs_state structure");
-		fc_port_close_ingress(port);
 		goto out_host_rem;
 	}
 




More information about the devel mailing list