[Open-FCoE] [PATCH 27/28] libfc: change fc_ns.c to fc_disc.c

Robert Love robert.w.love at intel.com
Tue Sep 30 18:27:14 UTC 2008


Signed-off-by: Robert Love <robert.w.love at intel.com>
---

 drivers/scsi/fcoe/fcoe_if.c   |    2 
 drivers/scsi/libfc/Makefile   |    2 
 drivers/scsi/libfc/fc_disc.c  |  593 +++++++++++++++++++++++++++++++++++++++++
 drivers/scsi/libfc/fc_lport.c |    8 -
 drivers/scsi/libfc/fc_ns.c    |  593 -----------------------------------------
 drivers/scsi/libfc/fc_rport.c |    2 
 include/scsi/libfc/libfc.h    |   26 +-
 7 files changed, 613 insertions(+), 613 deletions(-)

diff --git a/drivers/scsi/fcoe/fcoe_if.c b/drivers/scsi/fcoe/fcoe_if.c
index d5f1df0..73b83ce 100644
--- a/drivers/scsi/fcoe/fcoe_if.c
+++ b/drivers/scsi/fcoe/fcoe_if.c
@@ -388,7 +388,7 @@ static int libfc_config(struct fc_lport *lp)
 	fc_exch_init(lp);
 	fc_lport_init(lp);
 	fc_rport_init(lp);
-	fc_ns_init(lp);
+	fc_disc_init(lp);
 
 	return 0;
 }
diff --git a/drivers/scsi/libfc/Makefile b/drivers/scsi/libfc/Makefile
index 4eba777..e6d4086 100644
--- a/drivers/scsi/libfc/Makefile
+++ b/drivers/scsi/libfc/Makefile
@@ -3,7 +3,7 @@
 obj-$(CONFIG_LIBFC) += libfc.o
 
 libfc-objs := \
-	fc_ns.o \
+	fc_disc.o \
 	fc_exch.o \
 	fc_frame.o \
 	fc_lport.o \
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
new file mode 100644
index 0000000..fc0da8f
--- /dev/null
+++ b/drivers/scsi/libfc/fc_disc.c
@@ -0,0 +1,593 @@
+/*
+ * Copyright(c) 2007 - 2008 Intel Corporation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Maintained at www.Open-FCoE.org
+ */
+
+/*
+ * Target Discovery
+ * Actually, this discovers all FC-4 remote ports, including FCP initiators.
+ */
+
+#include <linux/timer.h>
+#include <linux/err.h>
+#include <asm/unaligned.h>
+
+#include <scsi/fc/fc_gs.h>
+
+#include <scsi/libfc/libfc.h>
+
+#define FC_DISC_RETRY_LIMIT	3	/* max retries */
+#define FC_DISC_RETRY_DELAY	500UL	/* (msecs) delay */
+
+int fc_disc_debug;
+
+static void fc_disc_gpn_ft_req(struct fc_lport *);
+static void fc_disc_gpn_ft_resp(struct fc_seq *, struct fc_frame *, void *);
+static int fc_disc_new_target(struct fc_lport *, struct fc_rport *,
+			    struct fc_rport_identifiers *);
+static void fc_disc_del_target(struct fc_lport *, struct fc_rport *);
+static void fc_disc_done(struct fc_lport *);
+static void fc_disc_error(struct fc_lport *, struct fc_frame *);
+static void fc_disc_timeout(struct work_struct *);
+static void fc_disc_single(struct fc_lport *, struct fc_disc_port *);
+static int fc_disc_restart(struct fc_lport *);
+
+/**
+ * fc_disc_rscn_req - Handle Registered State Change Notification (RSCN)
+ * @sp: Current sequence of the RSCN exchange
+ * @fp: RSCN Frame
+ * @lp: Fibre Channel host port instance
+ */
+static void fc_disc_rscn_req(struct fc_seq *sp, struct fc_frame *fp,
+			   struct fc_lport *lp)
+{
+	struct fc_els_rscn *rp;
+	struct fc_els_rscn_page *pp;
+	struct fc_seq_els_data rjt_data;
+	unsigned int len;
+	int redisc = 0;
+	enum fc_els_rscn_ev_qual ev_qual;
+	enum fc_els_rscn_addr_fmt fmt;
+	LIST_HEAD(disc_list);
+	struct fc_disc_port *dp, *next;
+
+	rp = fc_frame_payload_get(fp, sizeof(*rp));
+
+	if (!rp || rp->rscn_page_len != sizeof(*pp))
+		goto reject;
+
+	len = ntohs(rp->rscn_plen);
+	if (len < sizeof(*rp))
+		goto reject;
+	len -= sizeof(*rp);
+
+	for (pp = (void *)(rp + 1); len; len -= sizeof(*pp), pp++) {
+		ev_qual = pp->rscn_page_flags >> ELS_RSCN_EV_QUAL_BIT;
+		ev_qual &= ELS_RSCN_EV_QUAL_MASK;
+		fmt = pp->rscn_page_flags >> ELS_RSCN_ADDR_FMT_BIT;
+		fmt &= ELS_RSCN_ADDR_FMT_MASK;
+		/*
+		 * if we get an address format other than port
+		 * (area, domain, fabric), then do a full discovery
+		 */
+		switch (fmt) {
+		case ELS_ADDR_FMT_PORT:
+			dp = kzalloc(sizeof(*dp), GFP_KERNEL);
+			if (!dp) {
+				redisc = 1;
+				break;
+			}
+			dp->lp = lp;
+			dp->ids.port_id = ntoh24(pp->rscn_fid);
+			dp->ids.port_name = -1;
+			dp->ids.node_name = -1;
+			dp->ids.roles = FC_RPORT_ROLE_UNKNOWN;
+			list_add_tail(&dp->peers, &disc_list);
+			break;
+		case ELS_ADDR_FMT_AREA:
+		case ELS_ADDR_FMT_DOM:
+		case ELS_ADDR_FMT_FAB:
+		default:
+			redisc = 1;
+			break;
+		}
+	}
+	lp->tt.seq_els_rsp_send(sp, ELS_LS_ACC, NULL);
+	if (redisc) {
+		if (fc_disc_debug)
+			FC_DBG("RSCN received: rediscovering\n");
+		list_for_each_entry_safe(dp, next, &disc_list, peers) {
+			list_del(&dp->peers);
+			kfree(dp);
+		}
+		fc_disc_restart(lp);
+	} else {
+		if (fc_disc_debug)
+			FC_DBG("RSCN received: not rediscovering. "
+				"redisc %d state %d in_prog %d\n",
+				redisc, lp->state, lp->disc_pending);
+		list_for_each_entry_safe(dp, next, &disc_list, peers) {
+			list_del(&dp->peers);
+			fc_disc_single(lp, dp);
+		}
+	}
+	fc_frame_free(fp);
+	return;
+reject:
+	rjt_data.fp = NULL;
+	rjt_data.reason = ELS_RJT_LOGIC;
+	rjt_data.explan = ELS_EXPL_NONE;
+	lp->tt.seq_els_rsp_send(sp, ELS_LS_RJT, &rjt_data);
+	fc_frame_free(fp);
+}
+
+static void fc_disc_recv_req(struct fc_seq *sp, struct fc_frame *fp,
+			   struct fc_lport *lp)
+{
+	switch (fc_frame_payload_op(fp)) {
+	case ELS_RSCN:
+		fc_disc_rscn_req(sp, fp, lp);
+		break;
+	default:
+		FC_DBG("fc_disc recieved an unexpected request\n");
+		break;
+	}
+}
+
+/*
+ * Refresh target discovery, perhaps due to an RSCN.
+ * A configurable delay is introduced to collect any subsequent RSCNs.
+ */
+static int fc_disc_restart(struct fc_lport *lp)
+{
+	if (!lp->disc_requested && !lp->disc_pending) {
+		schedule_delayed_work(&lp->disc_work,
+				msecs_to_jiffies(lp->disc_delay * 1000));
+	}
+	lp->disc_requested = 1;
+	return 0;
+}
+
+/*
+ * Fibre Channel Target discovery.
+ *
+ * Returns non-zero if discovery cannot be started.
+ *
+ * Callback is called for each target remote port found in discovery.
+ * When discovery is complete, the callback is called with a NULL remote port.
+ * Discovery may be restarted after an RSCN is received, causing the
+ * callback to be called after discovery complete is indicated.
+ */
+int fc_disc_start(struct fc_lport *lp)
+{
+	struct fc_rport *rport;
+	int error;
+	struct fc_rport_identifiers ids;
+
+	/*
+	 * If not ready, or already running discovery, just set request flag.
+	 */
+	if (!fc_lport_test_ready(lp) || lp->disc_pending) {
+		lp->disc_requested = 1;
+
+		return 0;
+	}
+	lp->disc_pending = 1;
+	lp->disc_requested = 0;
+	lp->disc_retry_count = 0;
+
+	/*
+	 * Handle point-to-point mode as a simple discovery
+	 * of the remote port.
+	 */
+	rport = lp->ptp_rp;
+	if (rport) {
+		ids.port_id = rport->port_id;
+		ids.port_name = rport->port_name;
+		ids.node_name = rport->node_name;
+		ids.roles = FC_RPORT_ROLE_UNKNOWN;
+		get_device(&rport->dev);
+
+		error = fc_disc_new_target(lp, rport, &ids);
+		put_device(&rport->dev);
+		if (!error)
+			fc_disc_done(lp);
+	} else {
+
+		fc_block_rports(lp);
+		fc_disc_gpn_ft_req(lp);	/* get ports by FC-4 type */
+		error = 0;
+	}
+	return error;
+}
+
+/*
+ * Restart discovery after a delay due to resource shortages.
+ * If the error persists, the discovery will be abandoned.
+ */
+static void fc_disc_retry(struct fc_lport *lp)
+{
+	unsigned long delay = FC_DISC_RETRY_DELAY;
+
+	if (!lp->disc_retry_count)
+		delay /= 4;	/* timeout faster first time */
+	if (lp->disc_retry_count++ < FC_DISC_RETRY_LIMIT)
+		schedule_delayed_work(&lp->disc_work,
+				      msecs_to_jiffies(delay));
+	else
+		fc_disc_done(lp);
+}
+
+/*
+ * Handle new target found by discovery.
+ * Create remote port and session if needed.
+ * Ignore returns of our own FID & WWPN.
+ *
+ * If a non-NULL rp is passed in, it is held for the caller, but not for us.
+ *
+ * Events delivered are:
+ *  FC_EV_READY, when remote port is rediscovered.
+ */
+static int fc_disc_new_target(struct fc_lport *lp,
+			    struct fc_rport *rport,
+			    struct fc_rport_identifiers *ids)
+{
+	struct fc_rport_libfc_priv *rp;
+	int error = 0;
+
+	if (rport && ids->port_name) {
+		if (rport->port_name == -1) {
+			/*
+			 * Set WWN and fall through to notify of create.
+			 */
+			fc_rport_set_name(rport, ids->port_name,
+					  rport->node_name);
+		} else if (rport->port_name != ids->port_name) {
+			/*
+			 * This is a new port with the same FCID as
+			 * a previously-discovered port.  Presumably the old
+			 * port logged out and a new port logged in and was
+			 * assigned the same FCID.  This should be rare.
+			 * Delete the old one and fall thru to re-create.
+			 */
+			fc_disc_del_target(lp, rport);
+			rport = NULL;
+		}
+	}
+	if (((ids->port_name != -1) || (ids->port_id != -1)) &&
+	    ids->port_id != lp->fid && ids->port_name != lp->wwpn) {
+		if (!rport) {
+			rport = lp->tt.rport_lookup(lp, ids->port_id);
+			if (rport == NULL)
+				rport = lp->tt.rport_create(lp, ids);
+			if (!rport)
+				error = ENOMEM;
+		}
+		if (rport) {
+			rp = rport->dd_data;
+			rp->event_callback = lp->tt.event_callback;
+			rp->rp_state = RPORT_ST_INIT;
+			lp->tt.rport_login(rport);
+		}
+	}
+	return error;
+}
+
+/*
+ * Delete the remote port.
+ */
+static void fc_disc_del_target(struct fc_lport *lp, struct fc_rport *rport)
+{
+	lp->tt.rport_reset(rport);
+	fc_remote_port_delete(rport);	/* release hold from create */
+}
+
+/*
+ * Done with discovery
+ */
+static void fc_disc_done(struct fc_lport *lp)
+{
+	lp->disc_done = 1;
+	lp->disc_pending = 0;
+	if (lp->disc_requested)
+		lp->tt.disc_start(lp);
+}
+
+/**
+ * fc_disc_gpn_ft_req - Send Get Port Names by FC-4 type (GPN_FT) request
+ * @lp: Fibre Channel host port instance
+ */
+static void fc_disc_gpn_ft_req(struct fc_lport *lp)
+{
+	struct fc_frame *fp;
+	struct fc_seq *sp = NULL;
+	struct req {
+		struct fc_ct_hdr ct;
+		struct fc_ns_gid_ft gid;
+	} *rp;
+	int error = 0;
+
+	lp->disc_buf_len = 0;
+	lp->disc_seq_count = 0;
+	fp = fc_frame_alloc(lp, sizeof(*rp));
+	if (fp == NULL) {
+		error = ENOMEM;
+	} else {
+		rp = fc_frame_payload_get(fp, sizeof(*rp));
+		fc_fill_dns_hdr(lp, &rp->ct, FC_NS_GPN_FT, sizeof(rp->gid));
+		rp->gid.fn_fc4_type = FC_TYPE_FCP;
+
+		WARN_ON(!fc_lport_test_ready(lp));
+
+		fc_frame_setup(fp, FC_RCTL_DD_UNSOL_CTL, FC_TYPE_CT);
+		sp = lp->tt.exch_seq_send(lp, fp,
+					  fc_disc_gpn_ft_resp, NULL,
+					  lp, lp->e_d_tov,
+					  lp->fid,
+					  FC_FID_DIR_SERV,
+					  FC_FC_SEQ_INIT | FC_FC_END_SEQ);
+	}
+	if (error || sp == NULL)
+		fc_disc_retry(lp);
+}
+
+/*
+ * Handle error on dNS request.
+ */
+static void fc_disc_error(struct fc_lport *lp, struct fc_frame *fp)
+{
+	int err = PTR_ERR(fp);
+
+	switch (err) {
+	case -FC_EX_TIMEOUT:
+		if (lp->disc_retry_count++ < FC_DISC_RETRY_LIMIT) {
+			fc_disc_gpn_ft_req(lp);
+		} else {
+			FC_DBG("err %d - ending\n", err);
+			fc_disc_done(lp);
+		}
+		break;
+	default:
+		FC_DBG("err %d - ending\n", err);
+		fc_disc_done(lp);
+		break;
+	}
+}
+
+/**
+ * fc_disc_gpn_ft_parse - Parse the list of IDs and names resulting from a request
+ * @lp: Fibre Channel host port instance
+ * @buf: GPN_FT response buffer
+ * @len: size of response buffer
+ */
+static int fc_disc_gpn_ft_parse(struct fc_lport *lp, void *buf, size_t len)
+{
+	struct fc_gpn_ft_resp *np;
+	char *bp;
+	size_t plen;
+	size_t tlen;
+	int error = 0;
+	struct fc_disc_port dp;
+	struct fc_rport *rp;
+	struct fc_rport_libfc_priv *rpp;
+
+	/*
+	 * Handle partial name record left over from previous call.
+	 */
+	bp = buf;
+	plen = len;
+	np = (struct fc_gpn_ft_resp *)bp;
+	tlen = lp->disc_buf_len;
+	if (tlen) {
+		WARN_ON(tlen >= sizeof(*np));
+		plen = sizeof(*np) - tlen;
+		WARN_ON(plen <= 0);
+		WARN_ON(plen >= sizeof(*np));
+		if (plen > len)
+			plen = len;
+		np = &lp->disc_buf;
+		memcpy((char *)np + tlen, bp, plen);
+
+		/*
+		 * Set bp so that the loop below will advance it to the
+		 * first valid full name element.
+		 */
+		bp -= tlen;
+		len += tlen;
+		plen += tlen;
+		lp->disc_buf_len = (unsigned char) plen;
+		if (plen == sizeof(*np))
+			lp->disc_buf_len = 0;
+	}
+
+	/*
+	 * Handle full name records, including the one filled from above.
+	 * Normally, np == bp and plen == len, but from the partial case above,
+	 * bp, len describe the overall buffer, and np, plen describe the
+	 * partial buffer, which if would usually be full now.
+	 * After the first time through the loop, things return to "normal".
+	 */
+	while (plen >= sizeof(*np)) {
+		dp.lp = lp;
+		dp.ids.port_id = ntoh24(np->fp_fid);
+		dp.ids.port_name = ntohll(np->fp_wwpn);
+		dp.ids.node_name = -1;
+		dp.ids.roles = FC_RPORT_ROLE_UNKNOWN;
+
+		if ((dp.ids.port_id != lp->fid) &&
+		    (dp.ids.port_name != lp->wwpn)) {
+			rp = fc_rport_dummy_create(&dp);
+			if (rp) {
+				rpp = rp->dd_data;
+				rpp->local_port = lp;
+				lp->tt.rport_login(rp);
+			} else
+				FC_DBG("Failed to allocate memory for "
+				       "the newly discovered port (%6x)\n",
+				       dp.ids.port_id);
+		}
+
+		if (np->fp_flags & FC_NS_FID_LAST) {
+			fc_disc_done(lp);
+			len = 0;
+			break;
+		}
+		len -= sizeof(*np);
+		bp += sizeof(*np);
+		np = (struct fc_gpn_ft_resp *)bp;
+		plen = len;
+	}
+
+	/*
+	 * Save any partial record at the end of the buffer for next time.
+	 */
+	if (error == 0 && len > 0 && len < sizeof(*np)) {
+		if (np != &lp->disc_buf)
+			memcpy(&lp->disc_buf, np, len);
+		lp->disc_buf_len = (unsigned char) len;
+	} else {
+		lp->disc_buf_len = 0;
+	}
+	return error;
+}
+
+/*
+ * Handle retry of memory allocation for remote ports.
+ */
+static void fc_disc_timeout(struct work_struct *work)
+{
+	struct fc_lport *lp;
+
+	lp = container_of(work, struct fc_lport, disc_work.work);
+
+	if (lp->disc_pending)
+		fc_disc_gpn_ft_req(lp);
+	else
+		lp->tt.disc_start(lp);
+}
+
+/**
+ * fc_disc_gpn_ft_resp - Handle a response frame from Get Port Names (GPN_FT)
+ * @sp: Current sequence of GPN_FT exchange
+ * @fp: response frame
+ * @lp_arg: Fibre Channel host port instance
+ *
+ * The response may be in multiple frames
+ */
+static void fc_disc_gpn_ft_resp(struct fc_seq *sp, struct fc_frame *fp,
+			      void *lp_arg)
+{
+	struct fc_lport *lp = lp_arg;
+	struct fc_ct_hdr *cp;
+	struct fc_frame_header *fh;
+	unsigned int seq_cnt;
+	void *buf = NULL;
+	unsigned int len;
+	int error;
+
+	if (IS_ERR(fp)) {
+		fc_disc_error(lp, fp);
+		return;
+	}
+
+	WARN_ON(!fc_frame_is_linear(fp));	/* buffer must be contiguous */
+	fh = fc_frame_header_get(fp);
+	len = fr_len(fp) - sizeof(*fh);
+	seq_cnt = ntohs(fh->fh_seq_cnt);
+	if (fr_sof(fp) == FC_SOF_I3 && seq_cnt == 0 &&
+	    lp->disc_seq_count == 0) {
+		cp = fc_frame_payload_get(fp, sizeof(*cp));
+		if (cp == NULL) {
+			FC_DBG("GPN_FT response too short, len %d\n",
+			       fr_len(fp));
+		} else if (ntohs(cp->ct_cmd) == FC_FS_ACC) {
+
+			/*
+			 * Accepted.  Parse response.
+			 */
+			buf = cp + 1;
+			len -= sizeof(*cp);
+		} else if (ntohs(cp->ct_cmd) == FC_FS_RJT) {
+			FC_DBG("GPN_FT rejected reason %x exp %x "
+			       "(check zoning)\n", cp->ct_reason,
+			       cp->ct_explan);
+			fc_disc_done(lp);
+		} else {
+			FC_DBG("GPN_FT unexpected response code %x\n",
+			       ntohs(cp->ct_cmd));
+		}
+	} else if (fr_sof(fp) == FC_SOF_N3 &&
+		   seq_cnt == lp->disc_seq_count) {
+		buf = fh + 1;
+	} else {
+		FC_DBG("GPN_FT unexpected frame - out of sequence? "
+		       "seq_cnt %x expected %x sof %x eof %x\n",
+		       seq_cnt, lp->disc_seq_count, fr_sof(fp), fr_eof(fp));
+	}
+	if (buf) {
+		error = fc_disc_gpn_ft_parse(lp, buf, len);
+		if (error)
+			fc_disc_retry(lp);
+		else
+			lp->disc_seq_count++;
+	}
+	fc_frame_free(fp);
+}
+
+/*
+ * Discover the directory information for a single target.
+ * This could be from an RSCN that reported a change for the target.
+ */
+static void fc_disc_single(struct fc_lport *lp, struct fc_disc_port *dp)
+{
+	struct fc_rport *rport;
+	struct fc_rport *rp;
+	struct fc_rport_libfc_priv *rpp;
+
+	if (dp->ids.port_id == lp->fid)
+		goto out;
+
+	rport = lp->tt.rport_lookup(lp, dp->ids.port_id);
+	if (rport) {
+		fc_disc_del_target(lp, rport);
+		put_device(&rport->dev); /* hold from lookup */
+	}
+
+	rp = fc_rport_dummy_create(dp);
+	if (rp) {
+		rpp = rp->dd_data;
+		kfree(dp);
+		lp->tt.rport_login(rp);
+	}
+	return;
+out:
+	kfree(dp);
+}
+
+int fc_disc_init(struct fc_lport *lp)
+{
+	INIT_DELAYED_WORK(&lp->disc_work, fc_disc_timeout);
+
+	if (!lp->tt.disc_start)
+		lp->tt.disc_start = fc_disc_start;
+
+	if (!lp->tt.disc_recv_req)
+		lp->tt.disc_recv_req = fc_disc_recv_req;
+
+	return 0;
+}
+EXPORT_SYMBOL(fc_disc_init);
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index a43c48b..f5eac8b 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -525,7 +525,7 @@ EXPORT_SYMBOL(fc_fabric_logoff);
 int fc_lport_destroy(struct fc_lport *lport)
 {
 	mutex_lock(&lport->lp_mutex);
-	cancel_delayed_work_sync(&lport->ns_disc_work);
+	cancel_delayed_work_sync(&lport->disc_work);
 	lport->tt.scsi_abort_io(lport);
 	lport->tt.frame_send = fc_frame_drop;
 	lport->tt.exch_mgr_reset(lport->emp, 0, 0);
@@ -554,7 +554,7 @@ int fc_set_mfs(struct fc_lport *lport, u32 mfs)
 	}
 
 	if (!rc && mfs < old_mfs) {
-		lport->ns_disc_done = 0;
+		lport->disc_done = 0;
 		fc_lport_enter_reset(lport);
 	}
 
@@ -1142,7 +1142,7 @@ static void fc_lport_enter_dns(struct fc_lport *lport)
 {
 	struct fc_rport *rport;
 	struct fc_rport_libfc_priv *rdata;
-	struct fc_ns_port dp;
+	struct fc_disc_port dp;
 
 	dp.ids.port_id = FC_FID_DIR_SERV;
 	dp.ids.port_name = -1;
@@ -1442,7 +1442,7 @@ int fc_lport_config(struct fc_lport *lport)
 
 	fc_lport_state_enter(lport, LPORT_ST_NONE);
 
-	lport->ns_disc_delay = DNS_DELAY;
+	lport->disc_delay = DNS_DELAY;
 
 	fc_lport_add_fc4_type(lport, FC_TYPE_FCP);
 	fc_lport_add_fc4_type(lport, FC_TYPE_CT);
diff --git a/drivers/scsi/libfc/fc_ns.c b/drivers/scsi/libfc/fc_ns.c
deleted file mode 100644
index 8881af3..0000000
--- a/drivers/scsi/libfc/fc_ns.c
+++ /dev/null
@@ -1,593 +0,0 @@
-/*
- * Copyright(c) 2007 - 2008 Intel Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Maintained at www.Open-FCoE.org
- */
-
-/*
- * Target Discovery
- * Actually, this discovers all FC-4 remote ports, including FCP initiators.
- */
-
-#include <linux/timer.h>
-#include <linux/err.h>
-#include <asm/unaligned.h>
-
-#include <scsi/fc/fc_gs.h>
-
-#include <scsi/libfc/libfc.h>
-
-#define FC_NS_RETRY_LIMIT	3	/* max retries */
-#define FC_NS_RETRY_DELAY	500UL	/* (msecs) delay */
-
-int fc_ns_debug;
-
-static void fc_ns_gpn_ft_req(struct fc_lport *);
-static void fc_ns_gpn_ft_resp(struct fc_seq *, struct fc_frame *, void *);
-static int fc_ns_new_target(struct fc_lport *, struct fc_rport *,
-			    struct fc_rport_identifiers *);
-static void fc_ns_del_target(struct fc_lport *, struct fc_rport *);
-static void fc_ns_disc_done(struct fc_lport *);
-static void fc_ns_error(struct fc_lport *, struct fc_frame *);
-static void fc_ns_timeout(struct work_struct *);
-static void fc_ns_single(struct fc_lport *, struct fc_ns_port *);
-static int fc_ns_restart(struct fc_lport *);
-
-/**
- * fc_ns_rscn_req - Handle Registered State Change Notification (RSCN)
- * @sp: Current sequence of the RSCN exchange
- * @fp: RSCN Frame
- * @lp: Fibre Channel host port instance
- */
-static void fc_ns_rscn_req(struct fc_seq *sp, struct fc_frame *fp,
-			   struct fc_lport *lp)
-{
-	struct fc_els_rscn *rp;
-	struct fc_els_rscn_page *pp;
-	struct fc_seq_els_data rjt_data;
-	unsigned int len;
-	int redisc = 0;
-	enum fc_els_rscn_ev_qual ev_qual;
-	enum fc_els_rscn_addr_fmt fmt;
-	LIST_HEAD(disc_list);
-	struct fc_ns_port *dp, *next;
-
-	rp = fc_frame_payload_get(fp, sizeof(*rp));
-
-	if (!rp || rp->rscn_page_len != sizeof(*pp))
-		goto reject;
-
-	len = ntohs(rp->rscn_plen);
-	if (len < sizeof(*rp))
-		goto reject;
-	len -= sizeof(*rp);
-
-	for (pp = (void *)(rp + 1); len; len -= sizeof(*pp), pp++) {
-		ev_qual = pp->rscn_page_flags >> ELS_RSCN_EV_QUAL_BIT;
-		ev_qual &= ELS_RSCN_EV_QUAL_MASK;
-		fmt = pp->rscn_page_flags >> ELS_RSCN_ADDR_FMT_BIT;
-		fmt &= ELS_RSCN_ADDR_FMT_MASK;
-		/*
-		 * if we get an address format other than port
-		 * (area, domain, fabric), then do a full discovery
-		 */
-		switch (fmt) {
-		case ELS_ADDR_FMT_PORT:
-			dp = kzalloc(sizeof(*dp), GFP_KERNEL);
-			if (!dp) {
-				redisc = 1;
-				break;
-			}
-			dp->lp = lp;
-			dp->ids.port_id = ntoh24(pp->rscn_fid);
-			dp->ids.port_name = -1;
-			dp->ids.node_name = -1;
-			dp->ids.roles = FC_RPORT_ROLE_UNKNOWN;
-			list_add_tail(&dp->peers, &disc_list);
-			break;
-		case ELS_ADDR_FMT_AREA:
-		case ELS_ADDR_FMT_DOM:
-		case ELS_ADDR_FMT_FAB:
-		default:
-			redisc = 1;
-			break;
-		}
-	}
-	lp->tt.seq_els_rsp_send(sp, ELS_LS_ACC, NULL);
-	if (redisc) {
-		if (fc_ns_debug)
-			FC_DBG("RSCN received: rediscovering\n");
-		list_for_each_entry_safe(dp, next, &disc_list, peers) {
-			list_del(&dp->peers);
-			kfree(dp);
-		}
-		fc_ns_restart(lp);
-	} else {
-		if (fc_ns_debug)
-			FC_DBG("RSCN received: not rediscovering. "
-				"redisc %d state %d in_prog %d\n",
-				redisc, lp->state, lp->ns_disc_pending);
-		list_for_each_entry_safe(dp, next, &disc_list, peers) {
-			list_del(&dp->peers);
-			fc_ns_single(lp, dp);
-		}
-	}
-	fc_frame_free(fp);
-	return;
-reject:
-	rjt_data.fp = NULL;
-	rjt_data.reason = ELS_RJT_LOGIC;
-	rjt_data.explan = ELS_EXPL_NONE;
-	lp->tt.seq_els_rsp_send(sp, ELS_LS_RJT, &rjt_data);
-	fc_frame_free(fp);
-}
-
-static void fc_ns_recv_req(struct fc_seq *sp, struct fc_frame *fp,
-			   struct fc_lport *lp)
-{
-	switch (fc_frame_payload_op(fp)) {
-	case ELS_RSCN:
-		fc_ns_rscn_req(sp, fp, lp);
-		break;
-	default:
-		FC_DBG("fc_ns recieved an unexpected request\n");
-		break;
-	}
-}
-
-/*
- * Refresh target discovery, perhaps due to an RSCN.
- * A configurable delay is introduced to collect any subsequent RSCNs.
- */
-static int fc_ns_restart(struct fc_lport *lp)
-{
-	if (!lp->ns_disc_requested && !lp->ns_disc_pending) {
-		schedule_delayed_work(&lp->ns_disc_work,
-				msecs_to_jiffies(lp->ns_disc_delay * 1000));
-	}
-	lp->ns_disc_requested = 1;
-	return 0;
-}
-
-/*
- * Fibre Channel Target discovery.
- *
- * Returns non-zero if discovery cannot be started.
- *
- * Callback is called for each target remote port found in discovery.
- * When discovery is complete, the callback is called with a NULL remote port.
- * Discovery may be restarted after an RSCN is received, causing the
- * callback to be called after discovery complete is indicated.
- */
-int fc_ns_disc_start(struct fc_lport *lp)
-{
-	struct fc_rport *rport;
-	int error;
-	struct fc_rport_identifiers ids;
-
-	/*
-	 * If not ready, or already running discovery, just set request flag.
-	 */
-	if (!fc_lport_test_ready(lp) || lp->ns_disc_pending) {
-		lp->ns_disc_requested = 1;
-
-		return 0;
-	}
-	lp->ns_disc_pending = 1;
-	lp->ns_disc_requested = 0;
-	lp->ns_disc_retry_count = 0;
-
-	/*
-	 * Handle point-to-point mode as a simple discovery
-	 * of the remote port.
-	 */
-	rport = lp->ptp_rp;
-	if (rport) {
-		ids.port_id = rport->port_id;
-		ids.port_name = rport->port_name;
-		ids.node_name = rport->node_name;
-		ids.roles = FC_RPORT_ROLE_UNKNOWN;
-		get_device(&rport->dev);
-
-		error = fc_ns_new_target(lp, rport, &ids);
-		put_device(&rport->dev);
-		if (!error)
-			fc_ns_disc_done(lp);
-	} else {
-
-		fc_block_rports(lp);
-		fc_ns_gpn_ft_req(lp);	/* get ports by FC-4 type */
-		error = 0;
-	}
-	return error;
-}
-
-/*
- * Restart discovery after a delay due to resource shortages.
- * If the error persists, the discovery will be abandoned.
- */
-static void fc_ns_retry(struct fc_lport *lp)
-{
-	unsigned long delay = FC_NS_RETRY_DELAY;
-
-	if (!lp->ns_disc_retry_count)
-		delay /= 4;	/* timeout faster first time */
-	if (lp->ns_disc_retry_count++ < FC_NS_RETRY_LIMIT)
-		schedule_delayed_work(&lp->ns_disc_work,
-				      msecs_to_jiffies(delay));
-	else
-		fc_ns_disc_done(lp);
-}
-
-/*
- * Handle new target found by discovery.
- * Create remote port and session if needed.
- * Ignore returns of our own FID & WWPN.
- *
- * If a non-NULL rp is passed in, it is held for the caller, but not for us.
- *
- * Events delivered are:
- *  FC_EV_READY, when remote port is rediscovered.
- */
-static int fc_ns_new_target(struct fc_lport *lp,
-			    struct fc_rport *rport,
-			    struct fc_rport_identifiers *ids)
-{
-	struct fc_rport_libfc_priv *rp;
-	int error = 0;
-
-	if (rport && ids->port_name) {
-		if (rport->port_name == -1) {
-			/*
-			 * Set WWN and fall through to notify of create.
-			 */
-			fc_rport_set_name(rport, ids->port_name,
-					  rport->node_name);
-		} else if (rport->port_name != ids->port_name) {
-			/*
-			 * This is a new port with the same FCID as
-			 * a previously-discovered port.  Presumably the old
-			 * port logged out and a new port logged in and was
-			 * assigned the same FCID.  This should be rare.
-			 * Delete the old one and fall thru to re-create.
-			 */
-			fc_ns_del_target(lp, rport);
-			rport = NULL;
-		}
-	}
-	if (((ids->port_name != -1) || (ids->port_id != -1)) &&
-	    ids->port_id != lp->fid && ids->port_name != lp->wwpn) {
-		if (!rport) {
-			rport = lp->tt.rport_lookup(lp, ids->port_id);
-			if (rport == NULL)
-				rport = lp->tt.rport_create(lp, ids);
-			if (!rport)
-				error = ENOMEM;
-		}
-		if (rport) {
-			rp = rport->dd_data;
-			rp->event_callback = lp->tt.event_callback;
-			rp->rp_state = RPORT_ST_INIT;
-			lp->tt.rport_login(rport);
-		}
-	}
-	return error;
-}
-
-/*
- * Delete the remote port.
- */
-static void fc_ns_del_target(struct fc_lport *lp, struct fc_rport *rport)
-{
-	lp->tt.rport_reset(rport);
-	fc_remote_port_delete(rport);	/* release hold from create */
-}
-
-/*
- * Done with discovery
- */
-static void fc_ns_disc_done(struct fc_lport *lp)
-{
-	lp->ns_disc_done = 1;
-	lp->ns_disc_pending = 0;
-	if (lp->ns_disc_requested)
-		lp->tt.disc_start(lp);
-}
-
-/**
- * fc_ns_gpn_ft_req - Send Get Port Names by FC-4 type (GPN_FT) request
- * @lp: Fibre Channel host port instance
- */
-static void fc_ns_gpn_ft_req(struct fc_lport *lp)
-{
-	struct fc_frame *fp;
-	struct fc_seq *sp = NULL;
-	struct req {
-		struct fc_ct_hdr ct;
-		struct fc_ns_gid_ft gid;
-	} *rp;
-	int error = 0;
-
-	lp->ns_disc_buf_len = 0;
-	lp->ns_disc_seq_count = 0;
-	fp = fc_frame_alloc(lp, sizeof(*rp));
-	if (fp == NULL) {
-		error = ENOMEM;
-	} else {
-		rp = fc_frame_payload_get(fp, sizeof(*rp));
-		fc_fill_dns_hdr(lp, &rp->ct, FC_NS_GPN_FT, sizeof(rp->gid));
-		rp->gid.fn_fc4_type = FC_TYPE_FCP;
-
-		WARN_ON(!fc_lport_test_ready(lp));
-
-		fc_frame_setup(fp, FC_RCTL_DD_UNSOL_CTL, FC_TYPE_CT);
-		sp = lp->tt.exch_seq_send(lp, fp,
-					  fc_ns_gpn_ft_resp, NULL,
-					  lp, lp->e_d_tov,
-					  lp->fid,
-					  FC_FID_DIR_SERV,
-					  FC_FC_SEQ_INIT | FC_FC_END_SEQ);
-	}
-	if (error || sp == NULL)
-		fc_ns_retry(lp);
-}
-
-/*
- * Handle error on dNS request.
- */
-static void fc_ns_error(struct fc_lport *lp, struct fc_frame *fp)
-{
-	int err = PTR_ERR(fp);
-
-	switch (err) {
-	case -FC_EX_TIMEOUT:
-		if (lp->ns_disc_retry_count++ < FC_NS_RETRY_LIMIT) {
-			fc_ns_gpn_ft_req(lp);
-		} else {
-			FC_DBG("err %d - ending\n", err);
-			fc_ns_disc_done(lp);
-		}
-		break;
-	default:
-		FC_DBG("err %d - ending\n", err);
-		fc_ns_disc_done(lp);
-		break;
-	}
-}
-
-/**
- * fc_ns_gpn_ft_parse - Parse the list of IDs and names resulting from a request
- * @lp: Fibre Channel host port instance
- * @buf: GPN_FT response buffer
- * @len: size of response buffer
- */
-static int fc_ns_gpn_ft_parse(struct fc_lport *lp, void *buf, size_t len)
-{
-	struct fc_gpn_ft_resp *np;
-	char *bp;
-	size_t plen;
-	size_t tlen;
-	int error = 0;
-	struct fc_ns_port dp;
-	struct fc_rport *rp;
-	struct fc_rport_libfc_priv *rpp;
-
-	/*
-	 * Handle partial name record left over from previous call.
-	 */
-	bp = buf;
-	plen = len;
-	np = (struct fc_gpn_ft_resp *)bp;
-	tlen = lp->ns_disc_buf_len;
-	if (tlen) {
-		WARN_ON(tlen >= sizeof(*np));
-		plen = sizeof(*np) - tlen;
-		WARN_ON(plen <= 0);
-		WARN_ON(plen >= sizeof(*np));
-		if (plen > len)
-			plen = len;
-		np = &lp->ns_disc_buf;
-		memcpy((char *)np + tlen, bp, plen);
-
-		/*
-		 * Set bp so that the loop below will advance it to the
-		 * first valid full name element.
-		 */
-		bp -= tlen;
-		len += tlen;
-		plen += tlen;
-		lp->ns_disc_buf_len = (unsigned char) plen;
-		if (plen == sizeof(*np))
-			lp->ns_disc_buf_len = 0;
-	}
-
-	/*
-	 * Handle full name records, including the one filled from above.
-	 * Normally, np == bp and plen == len, but from the partial case above,
-	 * bp, len describe the overall buffer, and np, plen describe the
-	 * partial buffer, which if would usually be full now.
-	 * After the first time through the loop, things return to "normal".
-	 */
-	while (plen >= sizeof(*np)) {
-		dp.lp = lp;
-		dp.ids.port_id = ntoh24(np->fp_fid);
-		dp.ids.port_name = ntohll(np->fp_wwpn);
-		dp.ids.node_name = -1;
-		dp.ids.roles = FC_RPORT_ROLE_UNKNOWN;
-
-		if ((dp.ids.port_id != lp->fid) &&
-		    (dp.ids.port_name != lp->wwpn)) {
-			rp = fc_rport_dummy_create(&dp);
-			if (rp) {
-				rpp = rp->dd_data;
-				rpp->local_port = lp;
-				lp->tt.rport_login(rp);
-			} else
-				FC_DBG("Failed to allocate memory for "
-				       "the newly discovered port (%6x)\n",
-				       dp.ids.port_id);
-		}
-
-		if (np->fp_flags & FC_NS_FID_LAST) {
-			fc_ns_disc_done(lp);
-			len = 0;
-			break;
-		}
-		len -= sizeof(*np);
-		bp += sizeof(*np);
-		np = (struct fc_gpn_ft_resp *)bp;
-		plen = len;
-	}
-
-	/*
-	 * Save any partial record at the end of the buffer for next time.
-	 */
-	if (error == 0 && len > 0 && len < sizeof(*np)) {
-		if (np != &lp->ns_disc_buf)
-			memcpy(&lp->ns_disc_buf, np, len);
-		lp->ns_disc_buf_len = (unsigned char) len;
-	} else {
-		lp->ns_disc_buf_len = 0;
-	}
-	return error;
-}
-
-/*
- * Handle retry of memory allocation for remote ports.
- */
-static void fc_ns_timeout(struct work_struct *work)
-{
-	struct fc_lport *lp;
-
-	lp = container_of(work, struct fc_lport, ns_disc_work.work);
-
-	if (lp->ns_disc_pending)
-		fc_ns_gpn_ft_req(lp);
-	else
-		lp->tt.disc_start(lp);
-}
-
-/**
- * fc_ns_gpn_ft_resp - Handle a response frame from Get Port Names (GPN_FT)
- * @sp: Current sequence of GPN_FT exchange
- * @fp: response frame
- * @lp_arg: Fibre Channel host port instance
- *
- * The response may be in multiple frames
- */
-static void fc_ns_gpn_ft_resp(struct fc_seq *sp, struct fc_frame *fp,
-			      void *lp_arg)
-{
-	struct fc_lport *lp = lp_arg;
-	struct fc_ct_hdr *cp;
-	struct fc_frame_header *fh;
-	unsigned int seq_cnt;
-	void *buf = NULL;
-	unsigned int len;
-	int error;
-
-	if (IS_ERR(fp)) {
-		fc_ns_error(lp, fp);
-		return;
-	}
-
-	WARN_ON(!fc_frame_is_linear(fp));	/* buffer must be contiguous */
-	fh = fc_frame_header_get(fp);
-	len = fr_len(fp) - sizeof(*fh);
-	seq_cnt = ntohs(fh->fh_seq_cnt);
-	if (fr_sof(fp) == FC_SOF_I3 && seq_cnt == 0 &&
-	    lp->ns_disc_seq_count == 0) {
-		cp = fc_frame_payload_get(fp, sizeof(*cp));
-		if (cp == NULL) {
-			FC_DBG("GPN_FT response too short, len %d\n",
-			       fr_len(fp));
-		} else if (ntohs(cp->ct_cmd) == FC_FS_ACC) {
-
-			/*
-			 * Accepted.  Parse response.
-			 */
-			buf = cp + 1;
-			len -= sizeof(*cp);
-		} else if (ntohs(cp->ct_cmd) == FC_FS_RJT) {
-			FC_DBG("GPN_FT rejected reason %x exp %x "
-			       "(check zoning)\n", cp->ct_reason,
-			       cp->ct_explan);
-			fc_ns_disc_done(lp);
-		} else {
-			FC_DBG("GPN_FT unexpected response code %x\n",
-			       ntohs(cp->ct_cmd));
-		}
-	} else if (fr_sof(fp) == FC_SOF_N3 &&
-		   seq_cnt == lp->ns_disc_seq_count) {
-		buf = fh + 1;
-	} else {
-		FC_DBG("GPN_FT unexpected frame - out of sequence? "
-		       "seq_cnt %x expected %x sof %x eof %x\n",
-		       seq_cnt, lp->ns_disc_seq_count, fr_sof(fp), fr_eof(fp));
-	}
-	if (buf) {
-		error = fc_ns_gpn_ft_parse(lp, buf, len);
-		if (error)
-			fc_ns_retry(lp);
-		else
-			lp->ns_disc_seq_count++;
-	}
-	fc_frame_free(fp);
-}
-
-/*
- * Discover the directory information for a single target.
- * This could be from an RSCN that reported a change for the target.
- */
-static void fc_ns_single(struct fc_lport *lp, struct fc_ns_port *dp)
-{
-	struct fc_rport *rport;
-	struct fc_rport *rp;
-	struct fc_rport_libfc_priv *rpp;
-
-	if (dp->ids.port_id == lp->fid)
-		goto out;
-
-	rport = lp->tt.rport_lookup(lp, dp->ids.port_id);
-	if (rport) {
-		fc_ns_del_target(lp, rport);
-		put_device(&rport->dev); /* hold from lookup */
-	}
-
-	rp = fc_rport_dummy_create(dp);
-	if (rp) {
-		rpp = rp->dd_data;
-		kfree(dp);
-		lp->tt.rport_login(rp);
-	}
-	return;
-out:
-	kfree(dp);
-}
-
-int fc_ns_init(struct fc_lport *lp)
-{
-	INIT_DELAYED_WORK(&lp->ns_disc_work, fc_ns_timeout);
-
-	if (!lp->tt.disc_start)
-		lp->tt.disc_start = fc_ns_disc_start;
-
-	if (!lp->tt.disc_recv_req)
-		lp->tt.disc_recv_req = fc_ns_recv_req;
-
-	return 0;
-}
-EXPORT_SYMBOL(fc_ns_init);
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index b8c2a55..d720143 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
@@ -79,7 +79,7 @@ static const char *fc_rport_state_names[] = {
 	[RPORT_ST_LOGO] = "LOGO",
 };
 
-struct fc_rport *fc_rport_dummy_create(struct fc_ns_port *dp)
+struct fc_rport *fc_rport_dummy_create(struct fc_disc_port *dp)
 {
 	struct fc_rport *rport;
 	struct fc_rport_libfc_priv *rdata;
diff --git a/include/scsi/libfc/libfc.h b/include/scsi/libfc/libfc.h
index 4f47ece..8d55c3a 100644
--- a/include/scsi/libfc/libfc.h
+++ b/include/scsi/libfc/libfc.h
@@ -118,13 +118,13 @@ enum fc_rport_state {
 };
 
 /**
- * struct fc_ns_port - temporary discovery port to hold rport identifiers
+ * struct fc_disc_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()
  * @rport_work: work struct for starting the rport state machine
  */
-struct fc_ns_port {
+struct fc_disc_port {
 	struct fc_lport             *lp;
 	struct list_head            peers;
 	struct fc_rport_identifiers ids;
@@ -162,7 +162,7 @@ struct fc_rport_libfc_priv {
 	u32 roles;
 };
 
-struct fc_rport *fc_rport_dummy_create(struct fc_ns_port *);
+struct fc_rport *fc_rport_dummy_create(struct fc_disc_port *);
 void fc_rport_dummy_destroy(struct fc_rport *);
 
 static inline void fc_rport_set_name(struct fc_rport *rport, u64 wwpn, u64 wwnn)
@@ -425,7 +425,7 @@ struct fc_lport {
 	/* Operational Information */
 	struct libfc_function_template tt;
 	u16			link_status;
-	u8			ns_disc_done;
+	u8			disc_done;
 	enum fc_lport_state	state;
 	unsigned long		boot_time;
 
@@ -436,12 +436,12 @@ struct fc_lport {
 	u64			wwnn;
 	u32			fid;
 	u8			retry_count;
-	unsigned char		ns_disc_retry_count;
-	unsigned char		ns_disc_delay;
-	unsigned char		ns_disc_pending;
-	unsigned char		ns_disc_requested;
-	unsigned short		ns_disc_seq_count;
-	unsigned char		ns_disc_buf_len;
+	unsigned char		disc_retry_count;
+	unsigned char		disc_delay;
+	unsigned char		disc_pending;
+	unsigned char		disc_requested;
+	unsigned short		disc_seq_count;
+	unsigned char		disc_buf_len;
 
 	/* Capabilities */
 	char			ifname[IFNAMSIZ];
@@ -460,9 +460,9 @@ struct fc_lport {
 	struct mutex lp_mutex;
 
 	/* Miscellaneous */
-	struct fc_gpn_ft_resp	ns_disc_buf;	/* partial name buffer */
+	struct fc_gpn_ft_resp	disc_buf;	/* partial name buffer */
 	struct delayed_work	retry_work;
-	struct delayed_work	ns_disc_work;
+	struct delayed_work	disc_work;
 
 	void			*drv_priv;
 };
@@ -584,7 +584,7 @@ void fc_block_rports(struct fc_lport *lp);
 /**
  * DISCOVERY LAYER
  *****************************/
-int fc_ns_init(struct fc_lport *lp);
+int fc_disc_init(struct fc_lport *lp);
 
 
 /**




More information about the devel mailing list