this is really just a state of the lport, move it to
the lport's file.
Also remove disc_stop from the libfc_function_template as
nobody should be calling this from outside fc_lport.c.
Signed-off-by: Robert Love <[EMAIL PROTECTED]>
---
drivers/scsi/libfc/fc_lport.c | 19 +++++++++++++++++--
drivers/scsi/libfc/fc_ns.c | 22 ----------------------
2 files changed, 17 insertions(+), 24 deletions(-)
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index dc65e76..de61ceb 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -38,6 +38,7 @@ static int fc_lport_debug;
static void fc_lport_enter_flogi(struct fc_lport *);
static void fc_lport_enter_dns(struct fc_lport *);
+static void fc_lport_enter_dns_stop(struct fc_lport *);
static void fc_lport_enter_reg_pn(struct fc_lport *);
static void fc_lport_enter_reg_ft(struct fc_lport *);
static void fc_lport_enter_scr(struct fc_lport *);
@@ -385,7 +386,7 @@ int fc_fabric_logoff(struct fc_lport *lp)
case LPORT_ST_REG_FT:
case LPORT_ST_SCR:
case LPORT_ST_READY:
- lp->tt.disc_stop(lp);
+ fc_lport_enter_dns_stop(lp);
break;
}
fc_lport_unlock(lp);
@@ -509,7 +510,7 @@ static void fc_lport_enter_reject(struct fc_lport *lp)
fc_lport_enter_scr(lp);
break;
case LPORT_ST_SCR:
- lp->tt.disc_stop(lp);
+ fc_lport_enter_dns_stop(lp);
break;
case LPORT_ST_LOGO:
fc_lport_enter_reset(lp);
@@ -538,6 +539,20 @@ static void fc_lport_retry(struct fc_lport *lp)
}
/*
+ * Logoff the DNS rport
+ */
+static void fc_lport_enter_dns_stop(struct fc_lport *lp)
+{
+ if (fc_lport_debug)
+ FC_DBG("Processing DNS_STOP state");
+
+ fc_lport_state_enter(lp, LPORT_ST_DNS_STOP);
+
+ if (lp->dns_rp)
+ lp->tt.rport_logout(lp->dns_rp);
+}
+
+/*
* Setup session to dNS if not already set up.
*/
static void fc_lport_enter_dns(struct fc_lport *lp)
diff --git a/drivers/scsi/libfc/fc_ns.c b/drivers/scsi/libfc/fc_ns.c
index 2e9d424..628d77b 100644
--- a/drivers/scsi/libfc/fc_ns.c
+++ b/drivers/scsi/libfc/fc_ns.c
@@ -755,25 +755,6 @@ static void fc_ns_gpn_id_error(struct fc_ns_port *dp,
struct fc_frame *fp)
kfree(dp);
}
-/*
- * Logoff DNS session.
- * We should get an event call when the session has been logged out.
- */
-static void fc_ns_enter_dns_stop(struct fc_lport *lp)
-{
- struct fc_rport *rport = lp->dns_rp;
-
- if (fc_ns_debug)
- FC_DBG("Processing DNS_STOP state");
-
- fc_lport_state_enter(lp, LPORT_ST_DNS_STOP);
-
- if (rport)
- lp->tt.rport_logout(rport);
- else
- lp->tt.lport_logout(lp);
-}
-
int fc_ns_init(struct fc_lport *lp)
{
INIT_DELAYED_WORK(&lp->ns_disc_work, fc_ns_timeout);
@@ -784,9 +765,6 @@ int fc_ns_init(struct fc_lport *lp)
if (!lp->tt.disc_recv_req)
lp->tt.disc_recv_req = fc_ns_recv_req;
- if (!lp->tt.disc_stop)
- lp->tt.disc_stop = fc_ns_enter_dns_stop;
-
return 0;
}
EXPORT_SYMBOL(fc_ns_init);
_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel