diff options
author | Vasu Dev <vasu.dev@intel.com> | 2010-10-08 17:12:20 -0700 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-10-25 15:11:32 -0500 |
commit | 60a3c4dfb7830845a97a20e73b7d938dc2fde6c1 (patch) | |
tree | 589a230cf3fad5a3aae823f7087db35bb9f6297d /drivers/scsi | |
parent | 75eee7252466342e0dfa6675106bcd3955090f67 (diff) | |
download | op-kernel-dev-60a3c4dfb7830845a97a20e73b7d938dc2fde6c1.zip op-kernel-dev-60a3c4dfb7830845a97a20e73b7d938dc2fde6c1.tar.gz |
[SCSI] libfc: adds flogi retry in case DID is zero in RJT
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>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | 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); |