diff options
author | Jing Huang <huangj@brocade.com> | 2010-07-08 22:50:15 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-27 13:04:08 -0400 |
commit | 4f1806bc3c409395de4dab5984f7a235dc4a0eda (patch) | |
tree | 9a631392451ba3c28d62944380685d49f6ca7eb5 /drivers | |
parent | b85d045ee866011df535565bf12d684e8e5b7a9d (diff) |
[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')
-rw-r--r-- | drivers/scsi/bfa/fabric.c | 26 | ||||
-rw-r--r-- | drivers/scsi/bfa/fcpim.c | 2 | ||||
-rw-r--r-- | drivers/scsi/bfa/fcs_fabric.h | 3 | ||||
-rw-r--r-- | drivers/scsi/bfa/fdmi.c | 6 | ||||
-rw-r--r-- | drivers/scsi/bfa/include/protocol/fc.h | 1 | ||||
-rw-r--r-- | drivers/scsi/bfa/ms.c | 6 | ||||
-rw-r--r-- | drivers/scsi/bfa/ns.c | 10 | ||||
-rw-r--r-- | drivers/scsi/bfa/rport.c | 8 | ||||
-rw-r--r-- | drivers/scsi/bfa/rport_ftrs.c | 13 | ||||
-rw-r--r-- | drivers/scsi/bfa/scn.c | 2 |
10 files changed, 56 insertions, 21 deletions
diff --git a/drivers/scsi/bfa/fabric.c b/drivers/scsi/bfa/fabric.c index c646d6dd789b..ddd4ba9317e6 100644 --- a/drivers/scsi/bfa/fabric.c +++ b/drivers/scsi/bfa/fabric.c | |||
@@ -1027,6 +1027,32 @@ bfa_fcs_fabric_vport_count(struct bfa_fcs_fabric_s *fabric) | |||
1027 | return fabric->num_vports; | 1027 | return fabric->num_vports; |
1028 | } | 1028 | } |
1029 | 1029 | ||
1030 | /* | ||
1031 | * Get OUI of the attached switch. | ||
1032 | * | ||
1033 | * Note : Use of this function should be avoided as much as possible. | ||
1034 | * This function should be used only if there is any requirement | ||
1035 | * to check for FOS version below 6.3. | ||
1036 | * To check if the attached fabric is a brocade fabric, use | ||
1037 | * bfa_lps_is_brcd_fabric() which works for FOS versions 6.3 | ||
1038 | * or above only. | ||
1039 | */ | ||
1040 | |||
1041 | u16 | ||
1042 | bfa_fcs_fabric_get_switch_oui(struct bfa_fcs_fabric_s *fabric) | ||
1043 | { | ||
1044 | wwn_t fab_nwwn; | ||
1045 | u8 *tmp; | ||
1046 | u16 oui; | ||
1047 | |||
1048 | fab_nwwn = bfa_lps_get_peer_nwwn(fabric->lps); | ||
1049 | |||
1050 | tmp = (uint8_t *)&fab_nwwn; | ||
1051 | oui = (tmp[3] << 8) | tmp[4]; | ||
1052 | |||
1053 | return oui; | ||
1054 | } | ||
1055 | |||
1030 | /** | 1056 | /** |
1031 | * Unsolicited frame receive handling. | 1057 | * Unsolicited frame receive handling. |
1032 | */ | 1058 | */ |
diff --git a/drivers/scsi/bfa/fcpim.c b/drivers/scsi/bfa/fcpim.c index 412018196bd2..7a0207e56693 100644 --- a/drivers/scsi/bfa/fcpim.c +++ b/drivers/scsi/bfa/fcpim.c | |||
@@ -422,7 +422,7 @@ bfa_fcs_itnim_send_prli(void *itnim_cbarg, struct bfa_fcxp_s *fcxp_alloced) | |||
422 | bfa_fcxp_send(fcxp, rport->bfa_rport, port->fabric->vf_id, port->lp_tag, | 422 | bfa_fcxp_send(fcxp, rport->bfa_rport, port->fabric->vf_id, port->lp_tag, |
423 | BFA_FALSE, FC_CLASS_3, len, &fchs, | 423 | BFA_FALSE, FC_CLASS_3, len, &fchs, |
424 | bfa_fcs_itnim_prli_response, (void *)itnim, FC_MAX_PDUSZ, | 424 | bfa_fcs_itnim_prli_response, (void *)itnim, FC_MAX_PDUSZ, |
425 | FC_RA_TOV); | 425 | FC_ELS_TOV); |
426 | 426 | ||
427 | itnim->stats.prli_sent++; | 427 | itnim->stats.prli_sent++; |
428 | bfa_sm_send_event(itnim, BFA_FCS_ITNIM_SM_FRMSENT); | 428 | bfa_sm_send_event(itnim, BFA_FCS_ITNIM_SM_FRMSENT); |
diff --git a/drivers/scsi/bfa/fcs_fabric.h b/drivers/scsi/bfa/fcs_fabric.h index ed532db14e86..432ab8ab8c3c 100644 --- a/drivers/scsi/bfa/fcs_fabric.h +++ b/drivers/scsi/bfa/fcs_fabric.h | |||
@@ -26,6 +26,8 @@ | |||
26 | #include <fcs/bfa_fcs_vport.h> | 26 | #include <fcs/bfa_fcs_vport.h> |
27 | #include <fcs/bfa_fcs_lport.h> | 27 | #include <fcs/bfa_fcs_lport.h> |
28 | 28 | ||
29 | #define BFA_FCS_BRCD_SWITCH_OUI 0x051e | ||
30 | |||
29 | /* | 31 | /* |
30 | * fcs friend functions: only between fcs modules | 32 | * fcs friend functions: only between fcs modules |
31 | */ | 33 | */ |
@@ -60,6 +62,7 @@ void bfa_fcs_auth_finished(struct bfa_fcs_fabric_s *fabric, | |||
60 | 62 | ||
61 | void bfa_fcs_fabric_set_fabric_name(struct bfa_fcs_fabric_s *fabric, | 63 | void bfa_fcs_fabric_set_fabric_name(struct bfa_fcs_fabric_s *fabric, |
62 | wwn_t fabric_name); | 64 | wwn_t fabric_name); |
65 | u16 bfa_fcs_fabric_get_switch_oui(struct bfa_fcs_fabric_s *fabric); | ||
63 | void bfa_fcs_get_sym_name(const struct bfa_fcs_s *fcs, char *node_symname); | 66 | void bfa_fcs_get_sym_name(const struct bfa_fcs_s *fcs, char *node_symname); |
64 | 67 | ||
65 | #endif /* __FCS_FABRIC_H__ */ | 68 | #endif /* __FCS_FABRIC_H__ */ |
diff --git a/drivers/scsi/bfa/fdmi.c b/drivers/scsi/bfa/fdmi.c index 8f17076d1a87..2b50eabf4b1e 100644 --- a/drivers/scsi/bfa/fdmi.c +++ b/drivers/scsi/bfa/fdmi.c | |||
@@ -532,7 +532,7 @@ bfa_fcs_port_fdmi_send_rhba(void *fdmi_cbarg, struct bfa_fcxp_s *fcxp_alloced) | |||
532 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, | 532 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, |
533 | FC_CLASS_3, (len + attr_len), &fchs, | 533 | FC_CLASS_3, (len + attr_len), &fchs, |
534 | bfa_fcs_port_fdmi_rhba_response, (void *)fdmi, | 534 | bfa_fcs_port_fdmi_rhba_response, (void *)fdmi, |
535 | FC_MAX_PDUSZ, FC_RA_TOV); | 535 | FC_MAX_PDUSZ, FC_FCCT_TOV); |
536 | 536 | ||
537 | bfa_sm_send_event(fdmi, FDMISM_EVENT_RHBA_SENT); | 537 | bfa_sm_send_event(fdmi, FDMISM_EVENT_RHBA_SENT); |
538 | } | 538 | } |
@@ -823,7 +823,7 @@ bfa_fcs_port_fdmi_send_rprt(void *fdmi_cbarg, struct bfa_fcxp_s *fcxp_alloced) | |||
823 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, | 823 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, |
824 | FC_CLASS_3, len + attr_len, &fchs, | 824 | FC_CLASS_3, len + attr_len, &fchs, |
825 | bfa_fcs_port_fdmi_rprt_response, (void *)fdmi, | 825 | bfa_fcs_port_fdmi_rprt_response, (void *)fdmi, |
826 | FC_MAX_PDUSZ, FC_RA_TOV); | 826 | FC_MAX_PDUSZ, FC_FCCT_TOV); |
827 | 827 | ||
828 | bfa_sm_send_event(fdmi, FDMISM_EVENT_RPRT_SENT); | 828 | bfa_sm_send_event(fdmi, FDMISM_EVENT_RPRT_SENT); |
829 | } | 829 | } |
@@ -1043,7 +1043,7 @@ bfa_fcs_port_fdmi_send_rpa(void *fdmi_cbarg, struct bfa_fcxp_s *fcxp_alloced) | |||
1043 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, | 1043 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, |
1044 | FC_CLASS_3, len + attr_len, &fchs, | 1044 | FC_CLASS_3, len + attr_len, &fchs, |
1045 | bfa_fcs_port_fdmi_rpa_response, (void *)fdmi, | 1045 | bfa_fcs_port_fdmi_rpa_response, (void *)fdmi, |
1046 | FC_MAX_PDUSZ, FC_RA_TOV); | 1046 | FC_MAX_PDUSZ, FC_FCCT_TOV); |
1047 | 1047 | ||
1048 | bfa_sm_send_event(fdmi, FDMISM_EVENT_RPA_SENT); | 1048 | bfa_sm_send_event(fdmi, FDMISM_EVENT_RPA_SENT); |
1049 | } | 1049 | } |
diff --git a/drivers/scsi/bfa/include/protocol/fc.h b/drivers/scsi/bfa/include/protocol/fc.h index 8d1038035a76..436dd7c5643a 100644 --- a/drivers/scsi/bfa/include/protocol/fc.h +++ b/drivers/scsi/bfa/include/protocol/fc.h | |||
@@ -1080,6 +1080,7 @@ struct fc_alpabm_s{ | |||
1080 | #define FC_REC_TOV (FC_ED_TOV + 1) | 1080 | #define FC_REC_TOV (FC_ED_TOV + 1) |
1081 | #define FC_RA_TOV 10 | 1081 | #define FC_RA_TOV 10 |
1082 | #define FC_ELS_TOV (2 * FC_RA_TOV) | 1082 | #define FC_ELS_TOV (2 * FC_RA_TOV) |
1083 | #define FC_FCCT_TOV (3 * FC_RA_TOV) | ||
1083 | 1084 | ||
1084 | /* | 1085 | /* |
1085 | * virtual fabric related defines | 1086 | * virtual fabric related defines |
diff --git a/drivers/scsi/bfa/ms.c b/drivers/scsi/bfa/ms.c index e776bcb49604..1d579ef26122 100644 --- a/drivers/scsi/bfa/ms.c +++ b/drivers/scsi/bfa/ms.c | |||
@@ -361,7 +361,7 @@ bfa_fcs_port_ms_send_gmal(void *ms_cbarg, struct bfa_fcxp_s *fcxp_alloced) | |||
361 | 361 | ||
362 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, | 362 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, |
363 | FC_CLASS_3, len, &fchs, bfa_fcs_port_ms_gmal_response, | 363 | FC_CLASS_3, len, &fchs, bfa_fcs_port_ms_gmal_response, |
364 | (void *)ms, FC_MAX_PDUSZ, FC_RA_TOV); | 364 | (void *)ms, FC_MAX_PDUSZ, FC_FCCT_TOV); |
365 | 365 | ||
366 | bfa_sm_send_event(ms, MSSM_EVENT_FCXP_SENT); | 366 | bfa_sm_send_event(ms, MSSM_EVENT_FCXP_SENT); |
367 | } | 367 | } |
@@ -560,7 +560,7 @@ bfa_fcs_port_ms_send_gfn(void *ms_cbarg, struct bfa_fcxp_s *fcxp_alloced) | |||
560 | 560 | ||
561 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, | 561 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, |
562 | FC_CLASS_3, len, &fchs, bfa_fcs_port_ms_gfn_response, | 562 | FC_CLASS_3, len, &fchs, bfa_fcs_port_ms_gfn_response, |
563 | (void *)ms, FC_MAX_PDUSZ, FC_RA_TOV); | 563 | (void *)ms, FC_MAX_PDUSZ, FC_FCCT_TOV); |
564 | 564 | ||
565 | bfa_sm_send_event(ms, MSSM_EVENT_FCXP_SENT); | 565 | bfa_sm_send_event(ms, MSSM_EVENT_FCXP_SENT); |
566 | } | 566 | } |
@@ -640,7 +640,7 @@ bfa_fcs_port_ms_send_plogi(void *ms_cbarg, struct bfa_fcxp_s *fcxp_alloced) | |||
640 | 640 | ||
641 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, | 641 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, |
642 | FC_CLASS_3, len, &fchs, bfa_fcs_port_ms_plogi_response, | 642 | FC_CLASS_3, len, &fchs, bfa_fcs_port_ms_plogi_response, |
643 | (void *)ms, FC_MAX_PDUSZ, FC_RA_TOV); | 643 | (void *)ms, FC_MAX_PDUSZ, FC_ELS_TOV); |
644 | 644 | ||
645 | port->stats.ms_plogi_sent++; | 645 | port->stats.ms_plogi_sent++; |
646 | bfa_sm_send_event(ms, MSSM_EVENT_FCXP_SENT); | 646 | bfa_sm_send_event(ms, MSSM_EVENT_FCXP_SENT); |
diff --git a/drivers/scsi/bfa/ns.c b/drivers/scsi/bfa/ns.c index 2d6d2d6ff8dc..ae0edcc86ed5 100644 --- a/drivers/scsi/bfa/ns.c +++ b/drivers/scsi/bfa/ns.c | |||
@@ -664,7 +664,7 @@ bfa_fcs_port_ns_send_plogi(void *ns_cbarg, struct bfa_fcxp_s *fcxp_alloced) | |||
664 | 664 | ||
665 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, | 665 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, |
666 | FC_CLASS_3, len, &fchs, bfa_fcs_port_ns_plogi_response, | 666 | FC_CLASS_3, len, &fchs, bfa_fcs_port_ns_plogi_response, |
667 | (void *)ns, FC_MAX_PDUSZ, FC_RA_TOV); | 667 | (void *)ns, FC_MAX_PDUSZ, FC_ELS_TOV); |
668 | port->stats.ns_plogi_sent++; | 668 | port->stats.ns_plogi_sent++; |
669 | 669 | ||
670 | bfa_sm_send_event(ns, NSSM_EVENT_PLOGI_SENT); | 670 | bfa_sm_send_event(ns, NSSM_EVENT_PLOGI_SENT); |
@@ -791,7 +791,7 @@ bfa_fcs_port_ns_send_rspn_id(void *ns_cbarg, struct bfa_fcxp_s *fcxp_alloced) | |||
791 | 791 | ||
792 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, | 792 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, |
793 | FC_CLASS_3, len, &fchs, bfa_fcs_port_ns_rspn_id_response, | 793 | FC_CLASS_3, len, &fchs, bfa_fcs_port_ns_rspn_id_response, |
794 | (void *)ns, FC_MAX_PDUSZ, FC_RA_TOV); | 794 | (void *)ns, FC_MAX_PDUSZ, FC_FCCT_TOV); |
795 | 795 | ||
796 | port->stats.ns_rspnid_sent++; | 796 | port->stats.ns_rspnid_sent++; |
797 | 797 | ||
@@ -865,7 +865,7 @@ bfa_fcs_port_ns_send_rft_id(void *ns_cbarg, struct bfa_fcxp_s *fcxp_alloced) | |||
865 | 865 | ||
866 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, | 866 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, |
867 | FC_CLASS_3, len, &fchs, bfa_fcs_port_ns_rft_id_response, | 867 | FC_CLASS_3, len, &fchs, bfa_fcs_port_ns_rft_id_response, |
868 | (void *)ns, FC_MAX_PDUSZ, FC_RA_TOV); | 868 | (void *)ns, FC_MAX_PDUSZ, FC_FCCT_TOV); |
869 | 869 | ||
870 | port->stats.ns_rftid_sent++; | 870 | port->stats.ns_rftid_sent++; |
871 | bfa_sm_send_event(ns, NSSM_EVENT_RFTID_SENT); | 871 | bfa_sm_send_event(ns, NSSM_EVENT_RFTID_SENT); |
@@ -943,7 +943,7 @@ bfa_fcs_port_ns_send_rff_id(void *ns_cbarg, struct bfa_fcxp_s *fcxp_alloced) | |||
943 | 943 | ||
944 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, | 944 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, |
945 | FC_CLASS_3, len, &fchs, bfa_fcs_port_ns_rff_id_response, | 945 | FC_CLASS_3, len, &fchs, bfa_fcs_port_ns_rff_id_response, |
946 | (void *)ns, FC_MAX_PDUSZ, FC_RA_TOV); | 946 | (void *)ns, FC_MAX_PDUSZ, FC_FCCT_TOV); |
947 | 947 | ||
948 | port->stats.ns_rffid_sent++; | 948 | port->stats.ns_rffid_sent++; |
949 | bfa_sm_send_event(ns, NSSM_EVENT_RFFID_SENT); | 949 | bfa_sm_send_event(ns, NSSM_EVENT_RFFID_SENT); |
@@ -1029,7 +1029,7 @@ bfa_fcs_port_ns_send_gid_ft(void *ns_cbarg, struct bfa_fcxp_s *fcxp_alloced) | |||
1029 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, | 1029 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, |
1030 | FC_CLASS_3, len, &fchs, bfa_fcs_port_ns_gid_ft_response, | 1030 | FC_CLASS_3, len, &fchs, bfa_fcs_port_ns_gid_ft_response, |
1031 | (void *)ns, bfa_fcxp_get_maxrsp(port->fcs->bfa), | 1031 | (void *)ns, bfa_fcxp_get_maxrsp(port->fcs->bfa), |
1032 | FC_RA_TOV); | 1032 | FC_FCCT_TOV); |
1033 | 1033 | ||
1034 | port->stats.ns_gidft_sent++; | 1034 | port->stats.ns_gidft_sent++; |
1035 | 1035 | ||
diff --git a/drivers/scsi/bfa/rport.c b/drivers/scsi/bfa/rport.c index 7b096f2e3836..2796403222e1 100644 --- a/drivers/scsi/bfa/rport.c +++ b/drivers/scsi/bfa/rport.c | |||
@@ -1378,7 +1378,7 @@ bfa_fcs_rport_send_plogi(void *rport_cbarg, struct bfa_fcxp_s *fcxp_alloced) | |||
1378 | 1378 | ||
1379 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, | 1379 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, |
1380 | FC_CLASS_3, len, &fchs, bfa_fcs_rport_plogi_response, | 1380 | FC_CLASS_3, len, &fchs, bfa_fcs_rport_plogi_response, |
1381 | (void *)rport, FC_MAX_PDUSZ, FC_RA_TOV); | 1381 | (void *)rport, FC_MAX_PDUSZ, FC_ELS_TOV); |
1382 | 1382 | ||
1383 | rport->stats.plogis++; | 1383 | rport->stats.plogis++; |
1384 | bfa_sm_send_event(rport, RPSM_EVENT_FCXP_SENT); | 1384 | bfa_sm_send_event(rport, RPSM_EVENT_FCXP_SENT); |
@@ -1519,7 +1519,7 @@ bfa_fcs_rport_send_adisc(void *rport_cbarg, struct bfa_fcxp_s *fcxp_alloced) | |||
1519 | 1519 | ||
1520 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, | 1520 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, |
1521 | FC_CLASS_3, len, &fchs, bfa_fcs_rport_adisc_response, | 1521 | FC_CLASS_3, len, &fchs, bfa_fcs_rport_adisc_response, |
1522 | rport, FC_MAX_PDUSZ, FC_RA_TOV); | 1522 | rport, FC_MAX_PDUSZ, FC_ELS_TOV); |
1523 | 1523 | ||
1524 | rport->stats.adisc_sent++; | 1524 | rport->stats.adisc_sent++; |
1525 | bfa_sm_send_event(rport, RPSM_EVENT_FCXP_SENT); | 1525 | bfa_sm_send_event(rport, RPSM_EVENT_FCXP_SENT); |
@@ -1580,7 +1580,7 @@ bfa_fcs_rport_send_gidpn(void *rport_cbarg, struct bfa_fcxp_s *fcxp_alloced) | |||
1580 | 1580 | ||
1581 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, | 1581 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, |
1582 | FC_CLASS_3, len, &fchs, bfa_fcs_rport_gidpn_response, | 1582 | FC_CLASS_3, len, &fchs, bfa_fcs_rport_gidpn_response, |
1583 | (void *)rport, FC_MAX_PDUSZ, FC_RA_TOV); | 1583 | (void *)rport, FC_MAX_PDUSZ, FC_FCCT_TOV); |
1584 | 1584 | ||
1585 | bfa_sm_send_event(rport, RPSM_EVENT_FCXP_SENT); | 1585 | bfa_sm_send_event(rport, RPSM_EVENT_FCXP_SENT); |
1586 | } | 1586 | } |
@@ -1692,7 +1692,7 @@ bfa_fcs_rport_send_logo(void *rport_cbarg, struct bfa_fcxp_s *fcxp_alloced) | |||
1692 | 1692 | ||
1693 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, | 1693 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, |
1694 | FC_CLASS_3, len, &fchs, NULL, rport, FC_MAX_PDUSZ, | 1694 | FC_CLASS_3, len, &fchs, NULL, rport, FC_MAX_PDUSZ, |
1695 | FC_ED_TOV); | 1695 | FC_ELS_TOV); |
1696 | 1696 | ||
1697 | rport->stats.logos++; | 1697 | rport->stats.logos++; |
1698 | bfa_fcxp_discard(rport->fcxp); | 1698 | bfa_fcxp_discard(rport->fcxp); |
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 | |||
73 | bfa_fcs_rpf_sm_uninit(struct bfa_fcs_rpf_s *rpf, enum rpf_event event) | 73 | bfa_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; |
@@ -307,7 +312,7 @@ bfa_fcs_rpf_send_rpsc2(void *rpf_cbarg, struct bfa_fcxp_s *fcxp_alloced) | |||
307 | 312 | ||
308 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, | 313 | 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, | 314 | FC_CLASS_3, len, &fchs, bfa_fcs_rpf_rpsc2_response, |
310 | rpf, FC_MAX_PDUSZ, FC_RA_TOV); | 315 | rpf, FC_MAX_PDUSZ, FC_ELS_TOV); |
311 | rport->stats.rpsc_sent++; | 316 | rport->stats.rpsc_sent++; |
312 | bfa_sm_send_event(rpf, RPFSM_EVENT_FCXP_SENT); | 317 | bfa_sm_send_event(rpf, RPFSM_EVENT_FCXP_SENT); |
313 | 318 | ||
diff --git a/drivers/scsi/bfa/scn.c b/drivers/scsi/bfa/scn.c index 8fe09ba88a91..8a60129e6307 100644 --- a/drivers/scsi/bfa/scn.c +++ b/drivers/scsi/bfa/scn.c | |||
@@ -218,7 +218,7 @@ bfa_fcs_port_scn_send_scr(void *scn_cbarg, struct bfa_fcxp_s *fcxp_alloced) | |||
218 | 218 | ||
219 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, | 219 | bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, |
220 | FC_CLASS_3, len, &fchs, bfa_fcs_port_scn_scr_response, | 220 | FC_CLASS_3, len, &fchs, bfa_fcs_port_scn_scr_response, |
221 | (void *)scn, FC_MAX_PDUSZ, FC_RA_TOV); | 221 | (void *)scn, FC_MAX_PDUSZ, FC_ELS_TOV); |
222 | 222 | ||
223 | bfa_sm_send_event(scn, SCNSM_EVENT_SCR_SENT); | 223 | bfa_sm_send_event(scn, SCNSM_EVENT_SCR_SENT); |
224 | } | 224 | } |