This state is unnecessary, remove it.

Signed-off-by: Robert Love <[EMAIL PROTECTED]>
---

 drivers/scsi/libfc/fc_rport.c |   33 ++-------------------------------
 include/scsi/libfc/libfc.h    |    1 -
 2 files changed, 2 insertions(+), 32 deletions(-)

diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index 6bac44f..92e0536 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
@@ -39,7 +39,6 @@ static int fc_rp_debug;
 /*
  * static functions.
  */
-static void fc_rport_enter_start(struct fc_rport *);
 static void fc_rport_enter_plogi(struct fc_rport *);
 static void fc_rport_enter_prli(struct fc_rport *);
 static void fc_rport_enter_rtv(struct fc_rport *);
@@ -206,7 +205,8 @@ int fc_rport_login(struct fc_rport *rport)
        fc_rport_lock(rport);
        if (rp->rp_state == RPORT_ST_INIT) {
                fc_rport_unlock(rport);
-               fc_rport_enter_start(rport);
+               if (rport == lp->dns_rp || fc_lport_test_ready(lp))
+                       fc_rport_enter_plogi(rport);
        } else if (rp->rp_state == RPORT_ST_ERROR) {
                fc_rport_state_enter(rport, RPORT_ST_INIT);
                fc_rport_unlock(rport);
@@ -329,21 +329,6 @@ void fc_rport_reset_list(struct fc_lport *lp)
        spin_unlock_irqrestore(shost->host_lock, flags);
 }
 
-static void fc_rport_enter_start(struct fc_rport *rport)
-{
-       struct fc_rport_libfc_priv *rp = rport->dd_data;
-       struct fc_lport *lp = rp->local_port;
-
-       /*
-        * If the local port is already logged on, advance to next state.
-        * Otherwise the local port will be logged on by fc_rport_unlock().
-        */
-       fc_rport_state_enter(rport, RPORT_ST_STARTED);
-
-       if (rport == lp->dns_rp || fc_lport_test_ready(lp))
-               fc_rport_enter_plogi(rport);
-}
-
 /*
  * Handle exchange reject or retry exhaustion in various states.
  */
@@ -398,7 +383,6 @@ static void fc_rport_reject(struct fc_rport *rport)
        case RPORT_ST_READY:
        case RPORT_ST_ERROR:
        case RPORT_ST_PLOGI_RECV:
-       case RPORT_ST_STARTED:
        case RPORT_ST_INIT:
                BUG();
                break;
@@ -434,7 +418,6 @@ static void fc_rport_timeout(struct work_struct *work)
                break;
        case RPORT_ST_NONE:
        case RPORT_ST_PLOGI_RECV:
-       case RPORT_ST_STARTED:
                BUG();
                break;
        }
@@ -962,18 +945,6 @@ static void fc_rport_recv_plogi_req(struct fc_rport *rport,
                               "- reject\n", sid, wwpn);
                reject = ELS_RJT_UNSUP;
                break;
-       case RPORT_ST_STARTED:
-               /*
-                * we'll only accept a login if the port name
-                * matches or was unknown.
-                */
-               if (rport->port_name != -1 &&
-                   rport->port_name != wwpn) {
-                       FC_DBG("incoming PLOGI from name %llx expected %llx\n",
-                              wwpn, rport->port_name);
-                       reject = ELS_RJT_UNAB;
-               }
-               break;
        case RPORT_ST_PLOGI:
                if (fc_rp_debug)
                        FC_DBG("incoming PLOGI from %x in PLOGI state %d",
diff --git a/include/scsi/libfc/libfc.h b/include/scsi/libfc/libfc.h
index 04aba9b..07b98c6 100644
--- a/include/scsi/libfc/libfc.h
+++ b/include/scsi/libfc/libfc.h
@@ -109,7 +109,6 @@ enum fc_lport_event {
 enum fc_rport_state {
        RPORT_ST_NONE = 0,
        RPORT_ST_INIT,          /* initialized */
-       RPORT_ST_STARTED,       /* started */
        RPORT_ST_PLOGI,         /* waiting for PLOGI completion */
        RPORT_ST_PLOGI_RECV,    /* received PLOGI (as target) */
        RPORT_ST_PRLI,          /* waiting for PRLI completion */

_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel

Reply via email to