Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 161021
b: refs/heads/master
c: 1419405
h: refs/heads/master
i:
  161019: 3f51f50
v: v3
  • Loading branch information
Joe Eykholt authored and James Bottomley committed Aug 22, 2009
1 parent c43f43c commit b7b2776
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 84b05445b9f0b1ac2192f32260c916426d902d79
refs/heads/master: 141940548c6919c22bf0573c68fd59d961e22475
28 changes: 14 additions & 14 deletions trunk/drivers/scsi/libfc/fc_rport.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ static void fc_rport_error_retry(struct fc_rport *, struct fc_frame *);
static void fc_rport_work(struct work_struct *);

static const char *fc_rport_state_names[] = {
[RPORT_ST_NONE] = "None",
[RPORT_ST_INIT] = "Init",
[RPORT_ST_PLOGI] = "PLOGI",
[RPORT_ST_PRLI] = "PRLI",
[RPORT_ST_RTV] = "RTV",
[RPORT_ST_READY] = "Ready",
[RPORT_ST_LOGO] = "LOGO",
[RPORT_ST_DELETE] = "Delete",
};

static void fc_rport_rogue_destroy(struct device *dev)
Expand Down Expand Up @@ -326,19 +326,19 @@ int fc_rport_logoff(struct fc_rport *rport)

FC_RPORT_DBG(rport, "Remove port\n");

if (rdata->rp_state == RPORT_ST_NONE) {
FC_RPORT_DBG(rport, "Port in NONE state, not removing\n");
if (rdata->rp_state == RPORT_ST_DELETE) {
FC_RPORT_DBG(rport, "Port in Delete state, not removing\n");
mutex_unlock(&rdata->rp_mutex);
goto out;
}

fc_rport_enter_logo(rport);

/*
* Change the state to NONE so that we discard
* Change the state to Delete so that we discard
* the response.
*/
fc_rport_state_enter(rport, RPORT_ST_NONE);
fc_rport_state_enter(rport, RPORT_ST_DELETE);

mutex_unlock(&rdata->rp_mutex);

Expand Down Expand Up @@ -405,7 +405,7 @@ static void fc_rport_timeout(struct work_struct *work)
break;
case RPORT_ST_READY:
case RPORT_ST_INIT:
case RPORT_ST_NONE:
case RPORT_ST_DELETE:
break;
}

Expand Down Expand Up @@ -433,14 +433,14 @@ static void fc_rport_error(struct fc_rport *rport, struct fc_frame *fp)
case RPORT_ST_PRLI:
case RPORT_ST_LOGO:
rdata->event = RPORT_EV_FAILED;
fc_rport_state_enter(rport, RPORT_ST_NONE);
fc_rport_state_enter(rport, RPORT_ST_DELETE);
queue_work(rport_event_queue,
&rdata->event_work);
break;
case RPORT_ST_RTV:
fc_rport_enter_ready(rport);
break;
case RPORT_ST_NONE:
case RPORT_ST_DELETE:
case RPORT_ST_READY:
case RPORT_ST_INIT:
break;
Expand Down Expand Up @@ -652,7 +652,7 @@ static void fc_rport_prli_resp(struct fc_seq *sp, struct fc_frame *fp,
} else {
FC_RPORT_DBG(rport, "Bad ELS response for PRLI command\n");
rdata->event = RPORT_EV_FAILED;
fc_rport_state_enter(rport, RPORT_ST_NONE);
fc_rport_state_enter(rport, RPORT_ST_DELETE);
queue_work(rport_event_queue, &rdata->event_work);
}

Expand Down Expand Up @@ -703,7 +703,7 @@ static void fc_rport_logo_resp(struct fc_seq *sp, struct fc_frame *fp,
} else {
FC_RPORT_DBG(rport, "Bad ELS response for LOGO command\n");
rdata->event = RPORT_EV_LOGO;
fc_rport_state_enter(rport, RPORT_ST_NONE);
fc_rport_state_enter(rport, RPORT_ST_DELETE);
queue_work(rport_event_queue, &rdata->event_work);
}

Expand Down Expand Up @@ -1012,7 +1012,7 @@ static void fc_rport_recv_plogi_req(struct fc_rport *rport,
"- ignored for now\n", rdata->rp_state);
/* XXX TBD - should reset */
break;
case RPORT_ST_NONE:
case RPORT_ST_DELETE:
default:
FC_RPORT_DBG(rport, "Received PLOGI in unexpected "
"state %d\n", rdata->rp_state);
Expand Down Expand Up @@ -1238,7 +1238,7 @@ static void fc_rport_recv_prlo_req(struct fc_rport *rport, struct fc_seq *sp,
FC_RPORT_DBG(rport, "Received PRLO request while in state %s\n",
fc_rport_state(rport));

if (rdata->rp_state == RPORT_ST_NONE) {
if (rdata->rp_state == RPORT_ST_DELETE) {
fc_frame_free(fp);
return;
}
Expand Down Expand Up @@ -1271,13 +1271,13 @@ static void fc_rport_recv_logo_req(struct fc_rport *rport, struct fc_seq *sp,
FC_RPORT_DBG(rport, "Received LOGO request while in state %s\n",
fc_rport_state(rport));

if (rdata->rp_state == RPORT_ST_NONE) {
if (rdata->rp_state == RPORT_ST_DELETE) {
fc_frame_free(fp);
return;
}

rdata->event = RPORT_EV_LOGO;
fc_rport_state_enter(rport, RPORT_ST_NONE);
fc_rport_state_enter(rport, RPORT_ST_DELETE);
queue_work(rport_event_queue, &rdata->event_work);

lport->tt.seq_els_rsp_send(sp, ELS_LS_ACC, NULL);
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/scsi/libfc.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,13 @@ enum fc_disc_event {
};

enum fc_rport_state {
RPORT_ST_NONE = 0,
RPORT_ST_INIT, /* initialized */
RPORT_ST_PLOGI, /* waiting for PLOGI completion */
RPORT_ST_PRLI, /* waiting for PRLI completion */
RPORT_ST_RTV, /* waiting for RTV completion */
RPORT_ST_READY, /* ready for use */
RPORT_ST_LOGO, /* port logout sent */
RPORT_ST_DELETE, /* port being deleted */
};

enum fc_rport_trans_state {
Expand Down

0 comments on commit b7b2776

Please sign in to comment.