diff options
Diffstat (limited to 'drivers/scsi/bfa/bfa_fcs.c')
-rw-r--r-- | drivers/scsi/bfa/bfa_fcs.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/scsi/bfa/bfa_fcs.c b/drivers/scsi/bfa/bfa_fcs.c index 5bbb76b8e2ec..a9b22bc48bc3 100644 --- a/drivers/scsi/bfa/bfa_fcs.c +++ b/drivers/scsi/bfa/bfa_fcs.c | |||
@@ -192,11 +192,14 @@ bfa_fcs_exit(struct bfa_fcs_s *fcs) | |||
192 | #define BFA_FCS_FABRIC_CLEANUP_DELAY (10000) /* Milliseconds */ | 192 | #define BFA_FCS_FABRIC_CLEANUP_DELAY (10000) /* Milliseconds */ |
193 | 193 | ||
194 | #define bfa_fcs_fabric_set_opertype(__fabric) do { \ | 194 | #define bfa_fcs_fabric_set_opertype(__fabric) do { \ |
195 | if (bfa_fcport_get_topology((__fabric)->fcs->bfa) \ | 195 | if (bfa_fcport_get_topology((__fabric)->fcs->bfa) \ |
196 | == BFA_PORT_TOPOLOGY_P2P) \ | 196 | == BFA_PORT_TOPOLOGY_P2P) { \ |
197 | if (fabric->fab_type == BFA_FCS_FABRIC_SWITCHED) \ | ||
197 | (__fabric)->oper_type = BFA_PORT_TYPE_NPORT; \ | 198 | (__fabric)->oper_type = BFA_PORT_TYPE_NPORT; \ |
198 | else \ | 199 | else \ |
199 | (__fabric)->oper_type = BFA_PORT_TYPE_NLPORT; \ | 200 | (__fabric)->oper_type = BFA_PORT_TYPE_P2P; \ |
201 | } else \ | ||
202 | (__fabric)->oper_type = BFA_PORT_TYPE_NLPORT; \ | ||
200 | } while (0) | 203 | } while (0) |
201 | 204 | ||
202 | /* | 205 | /* |
@@ -551,6 +554,9 @@ bfa_fcs_fabric_sm_nofabric(struct bfa_fcs_fabric_s *fabric, | |||
551 | bfa_fcs_fabric_oper_bbscn(fabric)); | 554 | bfa_fcs_fabric_oper_bbscn(fabric)); |
552 | break; | 555 | break; |
553 | 556 | ||
557 | case BFA_FCS_FABRIC_SM_RETRY_OP: | ||
558 | break; | ||
559 | |||
554 | default: | 560 | default: |
555 | bfa_sm_fault(fabric->fcs, event); | 561 | bfa_sm_fault(fabric->fcs, event); |
556 | } | 562 | } |
@@ -827,6 +833,7 @@ bfa_cb_lps_flogi_comp(void *bfad, void *uarg, bfa_status_t status) | |||
827 | */ | 833 | */ |
828 | fabric->bport.port_topo.pn2n.rem_port_wwn = | 834 | fabric->bport.port_topo.pn2n.rem_port_wwn = |
829 | fabric->lps->pr_pwwn; | 835 | fabric->lps->pr_pwwn; |
836 | fabric->fab_type = BFA_FCS_FABRIC_N2N; | ||
830 | bfa_sm_send_event(fabric, BFA_FCS_FABRIC_SM_NO_FABRIC); | 837 | bfa_sm_send_event(fabric, BFA_FCS_FABRIC_SM_NO_FABRIC); |
831 | } | 838 | } |
832 | 839 | ||
@@ -917,8 +924,9 @@ static u8 | |||
917 | bfa_fcs_fabric_oper_bbscn(struct bfa_fcs_fabric_s *fabric) | 924 | bfa_fcs_fabric_oper_bbscn(struct bfa_fcs_fabric_s *fabric) |
918 | { | 925 | { |
919 | u8 pr_bbscn = fabric->lps->pr_bbscn; | 926 | u8 pr_bbscn = fabric->lps->pr_bbscn; |
927 | struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(fabric->fcs->bfa); | ||
920 | 928 | ||
921 | if (!(fabric->fcs->bbscn_enabled && pr_bbscn)) | 929 | if (!(fcport->cfg.bb_scn_state && pr_bbscn)) |
922 | return 0; | 930 | return 0; |
923 | 931 | ||
924 | /* return max of local/remote bb_scn values */ | 932 | /* return max of local/remote bb_scn values */ |
@@ -932,8 +940,10 @@ bfa_fcs_fabric_oper_bbscn(struct bfa_fcs_fabric_s *fabric) | |||
932 | static bfa_boolean_t | 940 | static bfa_boolean_t |
933 | bfa_fcs_fabric_is_bbscn_enabled(struct bfa_fcs_fabric_s *fabric) | 941 | bfa_fcs_fabric_is_bbscn_enabled(struct bfa_fcs_fabric_s *fabric) |
934 | { | 942 | { |
943 | struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(fabric->fcs->bfa); | ||
944 | |||
935 | if (bfa_ioc_get_fcmode(&fabric->fcs->bfa->ioc) && | 945 | if (bfa_ioc_get_fcmode(&fabric->fcs->bfa->ioc) && |
936 | fabric->fcs->bbscn_enabled && | 946 | fcport->cfg.bb_scn_state && |
937 | !bfa_fcport_is_qos_enabled(fabric->fcs->bfa) && | 947 | !bfa_fcport_is_qos_enabled(fabric->fcs->bfa) && |
938 | !bfa_fcport_is_trunk_enabled(fabric->fcs->bfa)) | 948 | !bfa_fcport_is_trunk_enabled(fabric->fcs->bfa)) |
939 | return BFA_TRUE; | 949 | return BFA_TRUE; |