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: Joe Eykholt <jeykholt@cisco.com>
Subject: [PATCH 1/8] libfcoe: fip: fix non-FIP-mode FLOGI state after reset.
Date: Wed, 06 May 2009 10:52:12 -0700	[thread overview]
Message-ID: <20090506175212.26695.71266.stgit@fritz> (raw)
In-Reply-To: <20090506175206.26695.19457.stgit@fritz>

From: Joe Eykholt <jeykholt@cisco.com>

When a reset is sent using fcoeadm on a non-FIP mode NIC,
there's no link flap, so the fcoe_ctlr stays in non-FIP mode.

In that case, FIP wasn't setting the flogi_oxid or map_dest flag,
causing the FLOGI to be sent with the both wrong source MAC and
the wrong destination MAC address, causing it to fail.

This leads to a non-functioning HBA until a link flap or
instance delete/create.

Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
---

 drivers/scsi/fcoe/libfcoe.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c
index 62ba0f3..a7ecafb 100644
--- a/drivers/scsi/fcoe/libfcoe.c
+++ b/drivers/scsi/fcoe/libfcoe.c
@@ -447,14 +447,10 @@ int fcoe_ctlr_els_send(struct fcoe_ctlr *fip, struct sk_buff *skb)
 	u16 old_xid;
 	u8 op;
 
-	if (fip->state == FIP_ST_NON_FIP)
-		return 0;
-
 	fh = (struct fc_frame_header *)skb->data;
 	op = *(u8 *)(fh + 1);
 
-	switch (op) {
-	case ELS_FLOGI:
+	if (op == ELS_FLOGI) {
 		old_xid = fip->flogi_oxid;
 		fip->flogi_oxid = ntohs(fh->fh_ox_id);
 		if (fip->state == FIP_ST_AUTO) {
@@ -466,6 +462,15 @@ int fcoe_ctlr_els_send(struct fcoe_ctlr *fip, struct sk_buff *skb)
 			fip->map_dest = 1;
 			return 0;
 		}
+		if (fip->state == FIP_ST_NON_FIP)
+			fip->map_dest = 1;
+	}
+
+	if (fip->state == FIP_ST_NON_FIP)
+		return 0;
+
+	switch (op) {
+	case ELS_FLOGI:
 		op = FIP_DT_FLOGI;
 		break;
 	case ELS_FDISC:


  reply	other threads:[~2009-05-06 17:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-06 17:52 [PATCH 0/8] Open-FCoE fixes for 2.6.30 RC Robert Love
2009-05-06 17:52 ` Robert Love [this message]
2009-05-06 17:52 ` [PATCH 2/8] fcoe: use ETH_P_FIP for skb->protocol of FIP frames Robert Love
2009-05-06 17:52 ` [PATCH 3/8] libfc: use DID_ERROR when we have internall aborted command Robert Love
2009-05-06 17:52 ` [PATCH 4/8] libfc: Check if exchange is completed when receiving a sequence Robert Love
2009-05-06 17:52 ` [PATCH 5/8] fcoe: reduces lock cost when adding a new skb to fcoe_pending_queue Robert Love
2009-05-06 18:09   ` James Bottomley
2009-05-06 20:28     ` Love, Robert W
2009-05-06 20:43       ` James Bottomley
2009-05-06 17:52 ` [PATCH 6/8] fcoe: removes fcoe_watchdog Robert Love
2009-05-06 17:52 ` [PATCH 7/8] fcoe: removes reserving memory for vlan_ethdr on tx path Robert Love
2009-05-28 22:22 ` [PATCH 0/8] Open-FCoE fixes for 2.6.30 RC Love, Robert W
2009-05-29 20:59   ` James Bottomley
2009-05-29 22:46     ` 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=20090506175212.26695.71266.stgit@fritz \
    --to=robert.w.love@intel.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=jeykholt@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