linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Bhanu Prakash Gollapudi" <bprakash@broadcom.com>
To: JBottomley@Parallels.com, linux-scsi@vger.kernel.org
Cc: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Subject: [v2 PATCH 1/4] bnx2fc: Allow FLOGI to be retried when receiving bad responses.
Date: Tue, 24 Apr 2012 15:26:01 -0700	[thread overview]
Message-ID: <1335306364-31449-2-git-send-email-bprakash@broadcom.com> (raw)
In-Reply-To: <1335306364-31449-1-git-send-email-bprakash@broadcom.com>

Commit 907c07d45199f954ddcf66c2c9763c87d012cb15 added more cases to do FLOGI
retry on receiving bad response. Remove the code that drops the packet and
allow the stack to handle bad FLOGI response.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
---
 drivers/scsi/bnx2fc/bnx2fc_els.c |   16 +++-------------
 1 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/drivers/scsi/bnx2fc/bnx2fc_els.c b/drivers/scsi/bnx2fc/bnx2fc_els.c
index ce0ce3e..cf3bdcd 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_els.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_els.c
@@ -854,7 +854,6 @@ static void bnx2fc_flogi_resp(struct fc_seq *seq, struct fc_frame *fp,
 	struct fc_exch *exch = fc_seq_exch(seq);
 	struct fc_lport *lport = exch->lp;
 	u8 *mac;
-	struct fc_frame_header *fh;
 	u8 op;
 
 	if (IS_ERR(fp))
@@ -862,13 +861,6 @@ static void bnx2fc_flogi_resp(struct fc_seq *seq, struct fc_frame *fp,
 
 	mac = fr_cb(fp)->granted_mac;
 	if (is_zero_ether_addr(mac)) {
-		fh = fc_frame_header_get(fp);
-		if (fh->fh_type != FC_TYPE_ELS) {
-			printk(KERN_ERR PFX "bnx2fc_flogi_resp:"
-				"fh_type != FC_TYPE_ELS\n");
-			fc_frame_free(fp);
-			return;
-		}
 		op = fc_frame_payload_op(fp);
 		if (lport->vport) {
 			if (op == ELS_LS_RJT) {
@@ -878,12 +870,10 @@ static void bnx2fc_flogi_resp(struct fc_seq *seq, struct fc_frame *fp,
 				return;
 			}
 		}
-		if (fcoe_ctlr_recv_flogi(fip, lport, fp)) {
-			fc_frame_free(fp);
-			return;
-		}
+		fcoe_ctlr_recv_flogi(fip, lport, fp);
 	}
-	fip->update_mac(lport, mac);
+	if (!is_zero_ether_addr(mac))
+		fip->update_mac(lport, mac);
 done:
 	fc_lport_flogi_resp(seq, fp, lport);
 }
-- 
1.7.0.6



  reply	other threads:[~2012-04-24 22:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-24 22:26 [v2 PATCH 0/4] bnx2fc version 1.0.11 Bhanu Prakash Gollapudi
2012-04-24 22:26 ` Bhanu Prakash Gollapudi [this message]
2012-04-24 22:26 ` [v2 PATCH 2/4] bnx2fc: Decrememnt io ref count when abort times out Bhanu Prakash Gollapudi
2012-04-24 22:26 ` [v2 PATCH 3/4] bnx2fc: cleanup task management IO when it " Bhanu Prakash Gollapudi
2012-05-04  8:49   ` Mike Christie
2012-04-24 22:26 ` [v2 PATCH 4/4] Bumped version to 1.0.11 Bhanu Prakash Gollapudi
2012-05-21 16:18 ` [v2 PATCH 0/4] bnx2fc version 1.0.11 Bhanu Prakash Gollapudi
2012-05-21 18:06   ` James Bottomley
2012-05-21 18:35     ` Bhanu Prakash Gollapudi
2012-05-22  8:45       ` James Bottomley
2012-05-22 17:06         ` Bhanu Prakash Gollapudi

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=1335306364-31449-2-git-send-email-bprakash@broadcom.com \
    --to=bprakash@broadcom.com \
    --cc=JBottomley@Parallels.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;
as well as URLs for NNTP newsgroup(s).