aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJoe Eykholt <jeykholt@cisco.com>2009-07-29 20:04:22 -0400
committerJames Bottomley <James.Bottomley@suse.de>2009-08-22 18:52:04 -0400
commitb1d9fd5574763abe5c763e32e3547a4adee9bd88 (patch)
treefbf80ee698c4f9c9ffa8dc054d5c84df2459076f /drivers
parentf161fb72104c7addac3d404a1ff543b2491c1426 (diff)
[SCSI] libfc: rename lport NONE state to DISABLED
The state NONE was meant to be invalid, but has been used as the initial state. Rename it to be DISABLED, as more descriptive. Further patches will make it the like the RESET state, except it won't transition to FLOGI until fc_lport_fabric_login() is called. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/libfc/fc_exch.c2
-rw-r--r--drivers/scsi/libfc/fc_lport.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
index 145ab9ba55ea..e6d82d780acd 100644
--- a/drivers/scsi/libfc/fc_exch.c
+++ b/drivers/scsi/libfc/fc_exch.c
@@ -1875,7 +1875,7 @@ void fc_exch_recv(struct fc_lport *lp, struct fc_exch_mgr *mp,
1875 u32 f_ctl; 1875 u32 f_ctl;
1876 1876
1877 /* lport lock ? */ 1877 /* lport lock ? */
1878 if (!lp || !mp || (lp->state == LPORT_ST_NONE)) { 1878 if (!lp || !mp || lp->state == LPORT_ST_DISABLED) {
1879 FC_LPORT_DBG(lp, "Receiving frames for an lport that " 1879 FC_LPORT_DBG(lp, "Receiving frames for an lport that "
1880 "has not been initialized correctly\n"); 1880 "has not been initialized correctly\n");
1881 fc_frame_free(fp); 1881 fc_frame_free(fp);
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index 745fa5555d6a..3b28190ca2eb 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -113,7 +113,7 @@ static void fc_lport_enter_ready(struct fc_lport *);
113static void fc_lport_enter_logo(struct fc_lport *); 113static void fc_lport_enter_logo(struct fc_lport *);
114 114
115static const char *fc_lport_state_names[] = { 115static const char *fc_lport_state_names[] = {
116 [LPORT_ST_NONE] = "none", 116 [LPORT_ST_DISABLED] = "disabled",
117 [LPORT_ST_FLOGI] = "FLOGI", 117 [LPORT_ST_FLOGI] = "FLOGI",
118 [LPORT_ST_DNS] = "dNS", 118 [LPORT_ST_DNS] = "dNS",
119 [LPORT_ST_RPN_ID] = "RPN_ID", 119 [LPORT_ST_RPN_ID] = "RPN_ID",
@@ -550,7 +550,7 @@ int fc_fabric_login(struct fc_lport *lport)
550 int rc = -1; 550 int rc = -1;
551 551
552 mutex_lock(&lport->lp_mutex); 552 mutex_lock(&lport->lp_mutex);
553 if (lport->state == LPORT_ST_NONE) { 553 if (lport->state == LPORT_ST_DISABLED) {
554 fc_lport_enter_reset(lport); 554 fc_lport_enter_reset(lport);
555 rc = 0; 555 rc = 0;
556 } 556 }
@@ -637,7 +637,7 @@ EXPORT_SYMBOL(fc_fabric_logoff);
637int fc_lport_destroy(struct fc_lport *lport) 637int fc_lport_destroy(struct fc_lport *lport)
638{ 638{
639 mutex_lock(&lport->lp_mutex); 639 mutex_lock(&lport->lp_mutex);
640 lport->state = LPORT_ST_NONE; 640 lport->state = LPORT_ST_DISABLED;
641 lport->link_up = 0; 641 lport->link_up = 0;
642 lport->tt.frame_send = fc_frame_drop; 642 lport->tt.frame_send = fc_frame_drop;
643 mutex_unlock(&lport->lp_mutex); 643 mutex_unlock(&lport->lp_mutex);
@@ -992,7 +992,7 @@ static void fc_lport_error(struct fc_lport *lport, struct fc_frame *fp)
992 schedule_delayed_work(&lport->retry_work, delay); 992 schedule_delayed_work(&lport->retry_work, delay);
993 } else { 993 } else {
994 switch (lport->state) { 994 switch (lport->state) {
995 case LPORT_ST_NONE: 995 case LPORT_ST_DISABLED:
996 case LPORT_ST_READY: 996 case LPORT_ST_READY:
997 case LPORT_ST_RESET: 997 case LPORT_ST_RESET:
998 case LPORT_ST_RPN_ID: 998 case LPORT_ST_RPN_ID:
@@ -1316,7 +1316,7 @@ static void fc_lport_timeout(struct work_struct *work)
1316 mutex_lock(&lport->lp_mutex); 1316 mutex_lock(&lport->lp_mutex);
1317 1317
1318 switch (lport->state) { 1318 switch (lport->state) {
1319 case LPORT_ST_NONE: 1319 case LPORT_ST_DISABLED:
1320 case LPORT_ST_READY: 1320 case LPORT_ST_READY:
1321 case LPORT_ST_RESET: 1321 case LPORT_ST_RESET:
1322 WARN_ON(1); 1322 WARN_ON(1);
@@ -1550,7 +1550,7 @@ int fc_lport_config(struct fc_lport *lport)
1550 INIT_DELAYED_WORK(&lport->retry_work, fc_lport_timeout); 1550 INIT_DELAYED_WORK(&lport->retry_work, fc_lport_timeout);
1551 mutex_init(&lport->lp_mutex); 1551 mutex_init(&lport->lp_mutex);
1552 1552
1553 fc_lport_state_enter(lport, LPORT_ST_NONE); 1553 fc_lport_state_enter(lport, LPORT_ST_DISABLED);
1554 1554
1555 fc_lport_add_fc4_type(lport, FC_TYPE_FCP); 1555 fc_lport_add_fc4_type(lport, FC_TYPE_FCP);
1556 fc_lport_add_fc4_type(lport, FC_TYPE_CT); 1556 fc_lport_add_fc4_type(lport, FC_TYPE_CT);