PLOGI_RECV was specifically for target mode. Since we're not
supporting target mode at this point, we don't want this state.
ERROR is unnecessary now that we're just failing and reporting
to the callback function to take action.
Signed-off-by: Robert Love <[EMAIL PROTECTED]>
---
drivers/scsi/libfc/fc_rport.c | 18 ++----------------
include/scsi/libfc/libfc.h | 2 --
2 files changed, 2 insertions(+), 18 deletions(-)
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index 7a355d1..4e5a3cd 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
@@ -57,11 +57,9 @@ static const char *fc_rport_state_names[] = {
[RPORT_ST_NONE] = "None",
[RPORT_ST_INIT] = "Init",
[RPORT_ST_PLOGI] = "PLOGI",
- [RPORT_ST_PLOGI_RECV] = "PLOGI recv",
[RPORT_ST_PRLI] = "PRLI",
[RPORT_ST_RTV] = "RTV",
[RPORT_ST_READY] = "Ready",
- [RPORT_ST_ERROR] = "Error",
[RPORT_ST_LOGO] = "LOGO",
};
@@ -375,8 +373,6 @@ static void fc_rport_reject(struct fc_rport *rport)
break;
case RPORT_ST_NONE:
case RPORT_ST_READY:
- case RPORT_ST_ERROR:
- case RPORT_ST_PLOGI_RECV:
case RPORT_ST_INIT:
BUG();
break;
@@ -415,11 +411,9 @@ static void fc_rport_timeout(struct work_struct *work)
fc_rport_enter_logo(rport);
break;
case RPORT_ST_READY:
- case RPORT_ST_ERROR:
case RPORT_ST_INIT:
break;
case RPORT_ST_NONE:
- case RPORT_ST_PLOGI_RECV:
BUG();
break;
}
@@ -668,8 +662,7 @@ static void fc_rport_prli_resp(struct fc_seq *sp, struct
fc_frame *fp,
fc_rport_enter_rtv(rport);
} else {
- FC_DBG("bad ELS response\n");
- fc_rport_state_enter(rport, RPORT_ST_ERROR);
+ FC_DBG("Bad ELS response\n");
if (rdata->event_callback)
rdata->event_callback(lport, rport,
LPORT_EV_RPORT_FAILED);
@@ -721,8 +714,7 @@ static void fc_rport_logo_resp(struct fc_seq *sp, struct
fc_frame *fp,
fc_rport_enter_rtv(rport);
} else {
- FC_DBG("bad ELS response\n");
- fc_rport_state_enter(rport, RPORT_ST_ERROR);
+ FC_DBG("Bad ELS response\n");
if (rdata->event_callback)
rdata->event_callback(lport, rport,
@@ -1061,7 +1053,6 @@ static void fc_rport_recv_plogi_req(struct fc_rport
*rport,
reject = ELS_RJT_INPROG;
break;
case RPORT_ST_PRLI:
- case RPORT_ST_ERROR:
case RPORT_ST_READY:
if (fc_rp_debug)
FC_DBG("incoming PLOGI from %x in logged-in state %d "
@@ -1113,9 +1104,6 @@ static void fc_rport_recv_plogi_req(struct fc_rport
*rport,
lport->tt.seq_send(lport, sp, fp, f_ctl);
if (rdata->rp_state == RPORT_ST_PLOGI)
fc_rport_enter_prli(rport);
- else
- fc_rport_state_enter(rport,
- RPORT_ST_PLOGI_RECV);
}
}
}
@@ -1162,7 +1150,6 @@ static void fc_rport_recv_prli_req(struct fc_rport *rport,
fc_rport_state(rport));
switch (rdata->rp_state) {
- case RPORT_ST_PLOGI_RECV:
case RPORT_ST_PRLI:
case RPORT_ST_READY:
reason = ELS_RJT_NONE;
@@ -1258,7 +1245,6 @@ static void fc_rport_recv_prli_req(struct fc_rport *rport,
* Get lock and re-check state.
*/
switch (rdata->rp_state) {
- case RPORT_ST_PLOGI_RECV:
case RPORT_ST_PRLI:
fc_rport_enter_ready(rport);
break;
diff --git a/include/scsi/libfc/libfc.h b/include/scsi/libfc/libfc.h
index c1154ef..18bb2cb 100644
--- a/include/scsi/libfc/libfc.h
+++ b/include/scsi/libfc/libfc.h
@@ -111,10 +111,8 @@ enum fc_rport_state {
RPORT_ST_NONE = 0,
RPORT_ST_INIT, /* initialized */
RPORT_ST_PLOGI, /* waiting for PLOGI completion */
- RPORT_ST_PLOGI_RECV, /* received PLOGI (as target) */
RPORT_ST_PRLI, /* waiting for PRLI completion */
RPORT_ST_RTV, /* waiting for RTV completion */
- RPORT_ST_ERROR, /* error */
RPORT_ST_READY, /* ready for use */
RPORT_ST_LOGO, /* port logout sent */
};
_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel