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
Subject: [PATCH 05/15] libfc: Change state to NONE in fc_lport_destroy
Date: Fri, 03 Apr 2009 14:58:24 -0700	[thread overview]
Message-ID: <20090403215824.10856.66466.stgit@fritz> (raw)
In-Reply-To: <20090403215758.10856.6946.stgit@fritz>

From: Abhijeet Joglekar <abjoglek@cisco.com>

After lport_destroy, the local port should not be used again. Transition
to state NONE, any incoming frames or link up should not transition out
of this state since we are deleting exchange table and cleaning up the
local port. Also, mark link as down.

Signed-off-by: Abhijeet Joglekar <abjoglek@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
---

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

diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index 4cd9533..e0c2477 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -644,7 +644,12 @@ EXPORT_SYMBOL(fc_fabric_logoff);
  */
 int fc_lport_destroy(struct fc_lport *lport)
 {
+	mutex_lock(&lport->lp_mutex);
+	lport->state = LPORT_ST_NONE;
+	lport->link_up = 0;
 	lport->tt.frame_send = fc_frame_drop;
+	mutex_unlock(&lport->lp_mutex);
+
 	lport->tt.fcp_abort_io(lport);
 	lport->tt.exch_mgr_reset(lport, 0, 0);
 	return 0;


  parent reply	other threads:[~2009-04-03 21:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-03 21:57 [PATCH 00/15] Open-FCoE updates (fixes and a feature) for 2.6.30 merge window Robert Love
2009-04-03 21:58 ` [PATCH 01/15] libfc: Hold disc mutex while processing gpn ft resp Robert Love
2009-04-03 21:58 ` [PATCH 02/15] libfc: Do not retry if the new state is not the same as old state Robert Love
2009-04-03 21:58 ` [PATCH 03/15] libfc: Track rogue remote ports Robert Love
2009-04-03 21:58 ` [PATCH 04/15] libfc: During fabric logoff, flush the rport Q after logging off dns port Robert Love
2009-04-03 21:58 ` Robert Love [this message]
2009-04-03 21:58 ` [PATCH 06/15] libfc: whenever queueing delete ev for rport, set state to NONE Robert Love
2009-04-03 21:58 ` [PATCH 07/15] fcoe: Add runtime debug logging with module parameter debug_logging Robert Love
2009-04-03 21:58 ` [PATCH 08/15] libfcoe: Add runtime debugging with module param debug_logging Robert Love
2009-04-03 21:58 ` [PATCH 09/15] libfc: Add runtime debugging with debug_logging module parameter Robert Love
2009-04-03 21:58 ` [PATCH 10/15] libfc: Convert debug statements in fc_lport.c to use new libfc debug macros Robert Love
2009-04-03 21:58 ` [PATCH 11/15] libfc: Convert debug statements in fc_disc.c " Robert Love
2009-04-03 21:59 ` [PATCH 12/15] libfc: Convert debug statements in fc_rport.c " Robert Love
2009-04-03 21:59 ` [PATCH 13/15] libfc: Convert debug statements in fc_fcp.c " Robert Love
2009-04-03 21:59 ` [PATCH 14/15] libfc: Convert debug statements in fc_exch.c " Robert Love
2009-04-03 21:59 ` [PATCH 15/15] libfc: Remove unused FC_DBG macro Robert Love
2009-04-03 22:14 ` [PATCH 00/15] Open-FCoE updates (fixes and a feature) for 2.6.30 merge window James Bottomley
2009-04-03 22:28   ` Love, Robert W

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=20090403215824.10856.66466.stgit@fritz \
    --to=robert.w.love@intel.com \
    --cc=James.Bottomley@HansenPartnership.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