static void bfa_fcs_vport_fdisc_rejected(struct bfa_fcs_vport_s *vport) { u8 lsrjt_rsn = bfa_lps_get_lsrjt_rsn(vport->lps); u8 lsrjt_expl = bfa_lps_get_lsrjt_expl(vport->lps); bfa_trc(__vport_fcs(vport), lsrjt_rsn); bfa_trc(__vport_fcs(vport), lsrjt_expl); /* * For certain reason codes, we don't want to retry. */ switch (bfa_lps_get_lsrjt_expl(vport->lps)) { case FC_LS_RJT_EXP_INV_PORT_NAME: /* by brocade */ case FC_LS_RJT_EXP_INVALID_NPORT_ID: /* by Cisco */ if (vport->fdisc_retries < BFA_FCS_VPORT_MAX_RETRIES) bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_RSP_ERROR); else { bfa_fcs_vport_aen_post(&vport->lport, BFA_LPORT_AEN_NPIV_DUP_WWN); bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_RSP_DUP_WWN); } break; case FC_LS_RJT_EXP_INSUFF_RES: /* * This means max logins per port/switch setting on the * switch was exceeded. */ if (vport->fdisc_retries < BFA_FCS_VPORT_MAX_RETRIES) bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_RSP_ERROR); else { bfa_fcs_vport_aen_post(&vport->lport, BFA_LPORT_AEN_NPIV_FABRIC_MAX); bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_RSP_FAILED); } break; default: if (vport->fdisc_retries == 0) /* Print only once */ bfa_fcs_vport_aen_post(&vport->lport, BFA_LPORT_AEN_NPIV_UNKNOWN); bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_RSP_ERROR); } }
static void bfa_fcs_vport_fdisc_rejected(struct bfa_fcs_vport_s *vport) { u8 lsrjt_rsn = bfa_lps_get_lsrjt_rsn(vport->lps); u8 lsrjt_expl = bfa_lps_get_lsrjt_expl(vport->lps); bfa_trc(__vport_fcs(vport), lsrjt_rsn); bfa_trc(__vport_fcs(vport), lsrjt_expl); switch (bfa_lps_get_lsrjt_expl(vport->lps)) { case FC_LS_RJT_EXP_INV_PORT_NAME: case FC_LS_RJT_EXP_INVALID_NPORT_ID: if (vport->fdisc_retries < BFA_FCS_VPORT_MAX_RETRIES) bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_RSP_ERROR); else { bfa_fcs_vport_aen_post(&vport->lport, BFA_LPORT_AEN_NPIV_DUP_WWN); bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_RSP_DUP_WWN); } break; case FC_LS_RJT_EXP_INSUFF_RES: if (vport->fdisc_retries < BFA_FCS_VPORT_MAX_RETRIES) bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_RSP_ERROR); else { bfa_fcs_vport_aen_post(&vport->lport, BFA_LPORT_AEN_NPIV_FABRIC_MAX); bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_RSP_FAILED); } break; default: if (vport->fdisc_retries == 0) bfa_fcs_vport_aen_post(&vport->lport, BFA_LPORT_AEN_NPIV_UNKNOWN); bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_RSP_ERROR); } }