linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Love <robert.w.love@intel.com>
To: James.Bottomley@suse.de, linux-scsi@vger.kernel.org
Cc: Ross Brattain <ross.b.brattain@intel.com>, Vasu Dev <vasu.dev@intel.com>
Subject: [PATCH 8/8] fcoe: fix broken fcoe interface reset
Date: Fri, 25 Feb 2011 15:03:28 -0800	[thread overview]
Message-ID: <20110225230328.9310.86069.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20110225230245.9310.81462.stgit@localhost6.localdomain6>

From: Vasu Dev <vasu.dev@intel.com>

Reset using "fcoeadm -r" also needs to restart FIP before
doing libfc lport reset, this is needed for new switch firmware
requiring FIP solicitation before doing FLOGI again during reset.
So this patch does this by doing fcoe_ctlr_link_down and then
fcoe_ctlr_link_up to reset the interface.

The fcoe_ctlr_link_down call path also does lport reset
and then fcoe_ctlr_link_up re-starts the fabric login after
doing FIP solicitation first to get reset feature working
again.

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
---
 drivers/scsi/fcoe/fcoe.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index 0b44d05..94fb480 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -2130,7 +2130,13 @@ void fcoe_percpu_clean(struct fc_lport *lport)
 int fcoe_reset(struct Scsi_Host *shost)
 {
 	struct fc_lport *lport = shost_priv(shost);
-	fc_lport_reset(lport);
+	struct fcoe_port *port = lport_priv(lport);
+	struct fcoe_interface *fcoe = port->priv;
+
+	fcoe_ctlr_link_down(&fcoe->ctlr);
+	fcoe_clean_pending_queue(fcoe->ctlr.lp);
+	if (!fcoe_link_ok(fcoe->ctlr.lp))
+		fcoe_ctlr_link_up(&fcoe->ctlr);
 	return 0;
 }
 


      parent reply	other threads:[~2011-02-25 23:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-25 23:02 [PATCH 0/8] libfc, libfcoe and fcoe updates for scsi-misc Robert Love
2011-02-25 23:02 ` [PATCH 1/8] libfc: Fixing a memory leak when destroying an interface Robert Love
2011-02-25 23:02 ` [PATCH 2/8] Revert "[SCSI] libfc: fix exchange being deleted when the abort itself is timed out" Robert Love
2011-02-25 23:03 ` [PATCH 3/8] fcoe, libfc: initialize EM anchors list and then update npiv EMs Robert Love
2011-02-25 23:03 ` [PATCH 4/8] libfc: introduce __fc_fill_fc_hdr that accepts fc_hdr as an argument Robert Love
2011-02-25 23:03 ` [PATCH 5/8] libfcoe: Move FCOE_MTU definition from fcoe.h to libfcoe.h Robert Love
2011-02-25 23:03 ` [PATCH 6/8] libfcoe: Remove stale fcoe-netdev entries Robert Love
2011-02-25 23:03 ` [PATCH 7/8] fcoe: precedence bug in fcoe_filter_frames() Robert Love
2011-02-25 23:03 ` Robert Love [this message]

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=20110225230328.9310.86069.stgit@localhost6.localdomain6 \
    --to=robert.w.love@intel.com \
    --cc=James.Bottomley@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=ross.b.brattain@intel.com \
    --cc=vasu.dev@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).