diff options
author | Jing Huang <huangj@brocade.com> | 2010-07-09 06:50:15 +0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-27 21:04:08 +0400 |
commit | 4f1806bc3c409395de4dab5984f7a235dc4a0eda (patch) | |
tree | 9a631392451ba3c28d62944380685d49f6ca7eb5 /drivers/scsi/bfa/rport_ftrs.c | |
parent | b85d045ee866011df535565bf12d684e8e5b7a9d (diff) | |
download | linux-4f1806bc3c409395de4dab5984f7a235dc4a0eda.tar.xz |
[SCSI] bfa: use standards defined timeout for ELS/CT
Use standards defined 2 * RA_TOV as a timeout for ELS Request retries.
And standards defined 3 * RA_TOV as a timeout for FC-CT Request retries.
Also, added a check to send RPSC2 to a Brocade Fabric only.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa/rport_ftrs.c')
-rw-r--r-- | drivers/scsi/bfa/rport_ftrs.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/scsi/bfa/rport_ftrs.c b/drivers/scsi/bfa/rport_ftrs.c index ae7bba67ae2a..acecab83f82f 100644 --- a/drivers/scsi/bfa/rport_ftrs.c +++ b/drivers/scsi/bfa/rport_ftrs.c @@ -73,6 +73,7 @@ static void bfa_fcs_rpf_sm_uninit(struct bfa_fcs_rpf_s *rpf, enum rpf_event event) { struct bfa_fcs_rport_s *rport = rpf->rport; + struct bfa_fcs_fabric_s *fabric = &rport->fcs->fabric; bfa_trc(rport->fcs, rport->pwwn); bfa_trc(rport->fcs, rport->pid); @@ -80,12 +81,16 @@ bfa_fcs_rpf_sm_uninit(struct bfa_fcs_rpf_s *rpf, enum rpf_event event) switch (event) { case RPFSM_EVENT_RPORT_ONLINE: - if (!BFA_FCS_PID_IS_WKA(rport->pid)) { + /* Send RPSC2 to a Brocade fabric only. */ + if ((!BFA_FCS_PID_IS_WKA(rport->pid)) && + ((bfa_lps_is_brcd_fabric(rport->port->fabric->lps)) || + (bfa_fcs_fabric_get_switch_oui(fabric) == + BFA_FCS_BRCD_SWITCH_OUI))) { bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_rpsc_sending); rpf->rpsc_retries = 0; bfa_fcs_rpf_send_rpsc2(rpf, NULL); - break; - }; + } + break; case RPFSM_EVENT_RPORT_OFFLINE: break; @@ -307,7 +312,7 @@ bfa_fcs_rpf_send_rpsc2(void *rpf_cbarg, struct bfa_fcxp_s *fcxp_alloced) bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, FC_CLASS_3, len, &fchs, bfa_fcs_rpf_rpsc2_response, - rpf, FC_MAX_PDUSZ, FC_RA_TOV); + rpf, FC_MAX_PDUSZ, FC_ELS_TOV); rport->stats.rpsc_sent++; bfa_sm_send_event(rpf, RPFSM_EVENT_FCXP_SENT); |