public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Love <robert.w.love@intel.com>
To: James.Bottomley@HansenPartnership.com, linux-scsi@vger.kernel.org
Cc: Abhijeet Joglekar <abjoglek@cisco.com>,
	Robert Love <robert.w.love@intel.com>
Subject: [PATCH 04/11] libfc: During fabric logoff, flush the rport Q after logging off dns port
Date: Tue, 21 Apr 2009 16:27:09 -0700	[thread overview]
Message-ID: <20090421232709.8165.97257.stgit@fritz> (raw)
In-Reply-To: <20090421232647.8165.46673.stgit@fritz>

From: Abhijeet Joglekar <abjoglek@cisco.com>

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>
---

 drivers/scsi/libfc/fc_lport.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index 52c4f2d..4cd9533 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);


  parent reply	other threads:[~2009-04-21 23:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-21 23:26 [PATCH 00/11] Open-FCoE fixes for 2.6.30-rc Robert Love
2009-04-21 23:26 ` [PATCH 01/11] libfc: Hold disc mutex while processing gpn ft resp Robert Love
2009-04-21 23:26 ` [PATCH 02/11] libfc: Do not retry if the new state is not the same as old state Robert Love
2009-04-21 23:27 ` [PATCH 03/11] libfc: Track rogue remote ports Robert Love
2009-04-21 23:27 ` Robert Love [this message]
2009-04-21 23:27 ` [PATCH 05/11] libfc: Change state to NONE in fc_lport_destroy Robert Love
2009-04-21 23:27 ` [PATCH 06/11] libfc: whenever queueing delete ev for rport, set state to NONE Robert Love
2009-04-21 23:27 ` [PATCH 07/11] fcoe: kfree() -> kfree_skb() Robert Love
2009-04-21 23:27 ` [PATCH 08/11] fcoe: don't export functions that are internal to fcoe Robert Love
2009-04-21 23:27 ` [PATCH 09/11] fcoe: fix spelling typos and bad comments Robert Love
2009-04-21 23:27 ` [PATCH 10/11] libfc: Fix compilation warnings with allmodconfig Robert Love
2009-04-21 23:27 ` [PATCH 11/11] fcoe: fip: add multicast filter to receive FIP advertisements Robert Love

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090421232709.8165.97257.stgit@fritz \
    --to=robert.w.love@intel.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=abjoglek@cisco.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox