summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc/fc_lport.c
diff options
context:
space:
mode:
authorAbhijeet Joglekar <abjoglek@cisco.com>2009-04-22 01:27:09 +0200
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-04-27 17:19:00 +0200
commita0fd2e49ec75bf74d3d202df51dfe65ad4c32605 (patch)
tree5bab1f0d7dc606da8c51722219a8d841bafe42f3 /drivers/scsi/libfc/fc_lport.c
parent[SCSI] libfc: Track rogue remote ports (diff)
downloadlinux-a0fd2e49ec75bf74d3d202df51dfe65ad4c32605.tar.xz
linux-a0fd2e49ec75bf74d3d202df51dfe65ad4c32605.zip
[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: Abhijeet Joglekar <abjoglek@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/libfc/fc_lport.c')
-rw-r--r--drivers/scsi/libfc/fc_lport.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index 52c4f2dfcfd3..4cd953378c57 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -618,6 +618,11 @@ int fc_fabric_logoff(struct fc_lport *lport)
{
lport->tt.disc_stop_final(lport);
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);
mutex_unlock(&lport->lp_mutex);
cancel_delayed_work_sync(&lport->retry_work);
@@ -1408,10 +1413,6 @@ static void fc_lport_enter_logo(struct fc_lport *lport)
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));
if (!fp) {
fc_lport_error(lport, fp);