From: Robert Love <robert.w.love@intel.com>
To: James.Bottomley@suse.de, linux-scsi@vger.kernel.org
Cc: Vasu Dev <vasu.dev@intel.com>
Subject: [PATCH 3/8] libfc: adds flogi retry in case DID is zero in RJT
Date: Fri, 08 Oct 2010 17:12:20 -0700 [thread overview]
Message-ID: <20101009001220.7744.39944.stgit@localhost.localdomain> (raw)
In-Reply-To: <20101009001204.7744.21642.stgit@localhost.localdomain>
From: Vasu Dev <vasu.dev@intel.com>
Sometimes switch in NPV mode rejects flogi request with DID
zero and in that case flogi is not tried again and port
remains offline, so this patch validates DID for non zero
along with only ACC response to allow flogi retry
for RJT with DID=0 also succeed FLOGI in next try.
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
---
drivers/scsi/libfc/fc_lport.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index d9b6e11..9be63ed 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -1447,13 +1447,7 @@ void fc_lport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp,
}
did = fc_frame_did(fp);
-
- if (!did) {
- FC_LPORT_DBG(lport, "Bad FLOGI response\n");
- goto out;
- }
-
- if (fc_frame_payload_op(fp) == ELS_LS_ACC) {
+ if (fc_frame_payload_op(fp) == ELS_LS_ACC && did) {
flp = fc_frame_payload_get(fp, sizeof(*flp));
if (flp) {
mfs = ntohs(flp->fl_csp.sp_bb_data) &
@@ -1492,8 +1486,10 @@ void fc_lport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp,
fc_lport_enter_dns(lport);
}
}
- } else
+ } else {
+ FC_LPORT_DBG(lport, "FLOGI RJT or bad response\n");
fc_lport_error(lport, fp);
+ }
out:
fc_frame_free(fp);
next prev parent reply other threads:[~2010-10-09 0:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-09 0:12 [PATCH 0/8] libfc, libfcoe and fcoe updates for scsi-misc Robert Love
2010-10-09 0:12 ` [PATCH 1/8] libfc: fix setting of rport dev loss Robert Love
2010-10-09 0:12 ` [PATCH 2/8] libfc: use DID_TRANSPORT_DISRUPTED while lport not ready Robert Love
2010-10-09 0:12 ` Robert Love [this message]
2010-10-09 0:12 ` [PATCH 4/8] fcoe: set default FIP mode as FIP_MODE_FABRIC Robert Love
2010-10-09 0:12 ` [PATCH 5/8] libfc: possible race could panic system due to NULL fsp->cmd Robert Love
2010-10-09 0:12 ` [PATCH 6/8] libfc: Do not let disc work cancel itself Robert Love
2010-10-09 0:12 ` [PATCH 7/8] libfcoe: VN2VN connection setup causing stack memory corruption Robert Love
2010-10-09 0:12 ` [PATCH 8/8] fcoe: Fix broken NPIV with correction to MAC validation 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=20101009001220.7744.39944.stgit@localhost.localdomain \
--to=robert.w.love@intel.com \
--cc=James.Bottomley@suse.de \
--cc=linux-scsi@vger.kernel.org \
--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