Commit 55c7a60c authored by Abhijeet Joglekar's avatar Abhijeet Joglekar Committed by James Bottomley

[SCSI] libfc: whenever queueing delete ev for rport, set state to NONE

When a delete event is queued for an rport, set state to NONE so that no
other processing is done on the rport as it is being removed.
Signed-off-by: default avatarAbhijeet Joglekar <abjoglek@cisco.com>
Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent bbf15669
...@@ -444,6 +444,7 @@ static void fc_rport_error(struct fc_rport *rport, struct fc_frame *fp) ...@@ -444,6 +444,7 @@ static void fc_rport_error(struct fc_rport *rport, struct fc_frame *fp)
case RPORT_ST_PRLI: case RPORT_ST_PRLI:
case RPORT_ST_LOGO: case RPORT_ST_LOGO:
rdata->event = RPORT_EV_FAILED; rdata->event = RPORT_EV_FAILED;
fc_rport_state_enter(rport, RPORT_ST_NONE);
queue_work(rport_event_queue, queue_work(rport_event_queue,
&rdata->event_work); &rdata->event_work);
break; break;
...@@ -664,6 +665,7 @@ static void fc_rport_prli_resp(struct fc_seq *sp, struct fc_frame *fp, ...@@ -664,6 +665,7 @@ static void fc_rport_prli_resp(struct fc_seq *sp, struct fc_frame *fp,
} else { } else {
FC_DBG("Bad ELS response\n"); FC_DBG("Bad ELS response\n");
rdata->event = RPORT_EV_FAILED; rdata->event = RPORT_EV_FAILED;
fc_rport_state_enter(rport, RPORT_ST_NONE);
queue_work(rport_event_queue, &rdata->event_work); queue_work(rport_event_queue, &rdata->event_work);
} }
...@@ -715,6 +717,7 @@ static void fc_rport_logo_resp(struct fc_seq *sp, struct fc_frame *fp, ...@@ -715,6 +717,7 @@ static void fc_rport_logo_resp(struct fc_seq *sp, struct fc_frame *fp,
} else { } else {
FC_DBG("Bad ELS response\n"); FC_DBG("Bad ELS response\n");
rdata->event = RPORT_EV_LOGO; rdata->event = RPORT_EV_LOGO;
fc_rport_state_enter(rport, RPORT_ST_NONE);
queue_work(rport_event_queue, &rdata->event_work); queue_work(rport_event_queue, &rdata->event_work);
} }
...@@ -1293,6 +1296,7 @@ static void fc_rport_recv_logo_req(struct fc_rport *rport, struct fc_seq *sp, ...@@ -1293,6 +1296,7 @@ static void fc_rport_recv_logo_req(struct fc_rport *rport, struct fc_seq *sp,
} }
rdata->event = RPORT_EV_LOGO; rdata->event = RPORT_EV_LOGO;
fc_rport_state_enter(rport, RPORT_ST_NONE);
queue_work(rport_event_queue, &rdata->event_work); queue_work(rport_event_queue, &rdata->event_work);
lport->tt.seq_els_rsp_send(sp, ELS_LS_ACC, NULL); lport->tt.seq_els_rsp_send(sp, ELS_LS_ACC, NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment