diff options
Diffstat (limited to 'drivers/scsi/bfa/fabric.c')
-rw-r--r-- | drivers/scsi/bfa/fabric.c | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/drivers/scsi/bfa/fabric.c b/drivers/scsi/bfa/fabric.c index 8166e9745ec0..ddd4ba9317e6 100644 --- a/drivers/scsi/bfa/fabric.c +++ b/drivers/scsi/bfa/fabric.c | |||
@@ -789,7 +789,7 @@ bfa_fcs_fabric_delete(struct bfa_fcs_fabric_s *fabric) | |||
789 | 789 | ||
790 | list_for_each_safe(qe, qen, &fabric->vport_q) { | 790 | list_for_each_safe(qe, qen, &fabric->vport_q) { |
791 | vport = (struct bfa_fcs_vport_s *)qe; | 791 | vport = (struct bfa_fcs_vport_s *)qe; |
792 | bfa_fcs_vport_delete(vport); | 792 | bfa_fcs_vport_fcs_delete(vport); |
793 | } | 793 | } |
794 | 794 | ||
795 | bfa_fcs_port_delete(&fabric->bport); | 795 | bfa_fcs_port_delete(&fabric->bport); |
@@ -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 | */ |
@@ -1271,6 +1297,22 @@ bfa_fcs_fabric_set_fabric_name(struct bfa_fcs_fabric_s *fabric, | |||
1271 | } | 1297 | } |
1272 | 1298 | ||
1273 | /** | 1299 | /** |
1300 | * | ||
1301 | * @param[in] fabric - fabric | ||
1302 | * @param[in] node_symname - | ||
1303 | * Caller allocated buffer to receive the symbolic name | ||
1304 | * | ||
1305 | * @return - none | ||
1306 | */ | ||
1307 | void | ||
1308 | bfa_fcs_get_sym_name(const struct bfa_fcs_s *fcs, char *node_symname) | ||
1309 | { | ||
1310 | bfa_os_memcpy(node_symname, | ||
1311 | fcs->fabric.bport.port_cfg.sym_name.symname, | ||
1312 | BFA_SYMNAME_MAXLEN); | ||
1313 | } | ||
1314 | |||
1315 | /** | ||
1274 | * Not used by FCS. | 1316 | * Not used by FCS. |
1275 | */ | 1317 | */ |
1276 | void | 1318 | void |