Commit a0fd2e49 authored by Abhijeet Joglekar's avatar Abhijeet Joglekar Committed by James Bottomley

[SCSI] libfc: During fabric logoff, flush the rport Q after logging off dns port

We want to generate the rport queue event (from the logoff)
before flushing the queue otherwise the event may still be
in the queue when we logoff.
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 b4c6f546
...@@ -618,6 +618,11 @@ int fc_fabric_logoff(struct fc_lport *lport) ...@@ -618,6 +618,11 @@ int fc_fabric_logoff(struct fc_lport *lport)
{ {
lport->tt.disc_stop_final(lport); lport->tt.disc_stop_final(lport);
mutex_lock(&lport->lp_mutex); mutex_lock(&lport->lp_mutex);
if (lport->dns_rp)
lport->tt.rport_logoff(lport->dns_rp);
mutex_unlock(&lport->lp_mutex);
lport->tt.rport_flush_queue();
mutex_lock(&lport->lp_mutex);
fc_lport_enter_logo(lport); fc_lport_enter_logo(lport);
mutex_unlock(&lport->lp_mutex); mutex_unlock(&lport->lp_mutex);
cancel_delayed_work_sync(&lport->retry_work); cancel_delayed_work_sync(&lport->retry_work);
...@@ -1408,10 +1413,6 @@ static void fc_lport_enter_logo(struct fc_lport *lport) ...@@ -1408,10 +1413,6 @@ static void fc_lport_enter_logo(struct fc_lport *lport)
fc_lport_state_enter(lport, LPORT_ST_LOGO); fc_lport_state_enter(lport, LPORT_ST_LOGO);
/* DNS session should be closed so we can release it here */
if (lport->dns_rp)
lport->tt.rport_logoff(lport->dns_rp);
fp = fc_frame_alloc(lport, sizeof(*logo)); fp = fc_frame_alloc(lport, sizeof(*logo));
if (!fp) { if (!fp) {
fc_lport_error(lport, fp); fc_lport_error(lport, fp);
......
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