aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa/rport_ftrs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/bfa/rport_ftrs.c')
-rw-r--r--drivers/scsi/bfa/rport_ftrs.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/scsi/bfa/rport_ftrs.c b/drivers/scsi/bfa/rport_ftrs.c
index ae7bba67ae2a..f2a9361ce9a4 100644
--- a/drivers/scsi/bfa/rport_ftrs.c
+++ b/drivers/scsi/bfa/rport_ftrs.c
@@ -73,6 +73,7 @@ static void
73bfa_fcs_rpf_sm_uninit(struct bfa_fcs_rpf_s *rpf, enum rpf_event event) 73bfa_fcs_rpf_sm_uninit(struct bfa_fcs_rpf_s *rpf, enum rpf_event event)
74{ 74{
75 struct bfa_fcs_rport_s *rport = rpf->rport; 75 struct bfa_fcs_rport_s *rport = rpf->rport;
76 struct bfa_fcs_fabric_s *fabric = &rport->fcs->fabric;
76 77
77 bfa_trc(rport->fcs, rport->pwwn); 78 bfa_trc(rport->fcs, rport->pwwn);
78 bfa_trc(rport->fcs, rport->pid); 79 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)
80 81
81 switch (event) { 82 switch (event) {
82 case RPFSM_EVENT_RPORT_ONLINE: 83 case RPFSM_EVENT_RPORT_ONLINE:
83 if (!BFA_FCS_PID_IS_WKA(rport->pid)) { 84 /* Send RPSC2 to a Brocade fabric only. */
85 if ((!BFA_FCS_PID_IS_WKA(rport->pid)) &&
86 ((bfa_lps_is_brcd_fabric(rport->port->fabric->lps)) ||
87 (bfa_fcs_fabric_get_switch_oui(fabric) ==
88 BFA_FCS_BRCD_SWITCH_OUI))) {
84 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_rpsc_sending); 89 bfa_sm_set_state(rpf, bfa_fcs_rpf_sm_rpsc_sending);
85 rpf->rpsc_retries = 0; 90 rpf->rpsc_retries = 0;
86 bfa_fcs_rpf_send_rpsc2(rpf, NULL); 91 bfa_fcs_rpf_send_rpsc2(rpf, NULL);
87 break; 92 }
88 }; 93 break;
89 94
90 case RPFSM_EVENT_RPORT_OFFLINE: 95 case RPFSM_EVENT_RPORT_OFFLINE:
91 break; 96 break;
@@ -269,6 +274,7 @@ void bfa_fcs_rpf_rport_offline(struct bfa_fcs_rport_s *rport)
269 if (__fcs_min_cfg(rport->port->fcs)) 274 if (__fcs_min_cfg(rport->port->fcs))
270 return; 275 return;
271 276
277 rport->rpf.rpsc_speed = 0;
272 bfa_sm_send_event(&rport->rpf, RPFSM_EVENT_RPORT_OFFLINE); 278 bfa_sm_send_event(&rport->rpf, RPFSM_EVENT_RPORT_OFFLINE);
273} 279}
274 280
@@ -307,7 +313,7 @@ bfa_fcs_rpf_send_rpsc2(void *rpf_cbarg, struct bfa_fcxp_s *fcxp_alloced)
307 313
308 bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, 314 bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE,
309 FC_CLASS_3, len, &fchs, bfa_fcs_rpf_rpsc2_response, 315 FC_CLASS_3, len, &fchs, bfa_fcs_rpf_rpsc2_response,
310 rpf, FC_MAX_PDUSZ, FC_RA_TOV); 316 rpf, FC_MAX_PDUSZ, FC_ELS_TOV);
311 rport->stats.rpsc_sent++; 317 rport->stats.rpsc_sent++;
312 bfa_sm_send_event(rpf, RPFSM_EVENT_FCXP_SENT); 318 bfa_sm_send_event(rpf, RPFSM_EVENT_FCXP_SENT);
313 319