Lines Matching refs:iocpf
229 bfa_fsm_set_state(&ioc->iocpf, bfa_iocpf_sm_reset); in bfa_ioc_sm_reset_entry()
371 if (ioc->iocpf.auto_recover) in bfa_ioc_sm_op()
561 bfa_iocpf_sm_reset_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_reset_entry() argument
563 iocpf->fw_mismatch_notified = false; in bfa_iocpf_sm_reset_entry()
564 iocpf->auto_recover = bfa_nw_auto_recover; in bfa_iocpf_sm_reset_entry()
569 bfa_iocpf_sm_reset(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_reset() argument
573 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fwcheck); in bfa_iocpf_sm_reset()
586 bfa_iocpf_sm_fwcheck_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_fwcheck_entry() argument
588 bfa_ioc_hw_sem_init(iocpf->ioc); in bfa_iocpf_sm_fwcheck_entry()
589 bfa_ioc_hw_sem_get(iocpf->ioc); in bfa_iocpf_sm_fwcheck_entry()
594 bfa_iocpf_sm_fwcheck(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_fwcheck() argument
596 struct bfa_ioc *ioc = iocpf->ioc; in bfa_iocpf_sm_fwcheck()
603 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_hwinit); in bfa_iocpf_sm_fwcheck()
612 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_mismatch); in bfa_iocpf_sm_fwcheck()
617 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail); in bfa_iocpf_sm_fwcheck()
623 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_fwcheck()
629 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_fwcheck()
639 bfa_iocpf_sm_mismatch_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_mismatch_entry() argument
642 if (!iocpf->fw_mismatch_notified) in bfa_iocpf_sm_mismatch_entry()
643 bfa_ioc_pf_fwmismatch(iocpf->ioc); in bfa_iocpf_sm_mismatch_entry()
645 iocpf->fw_mismatch_notified = true; in bfa_iocpf_sm_mismatch_entry()
646 mod_timer(&(iocpf->ioc)->iocpf_timer, jiffies + in bfa_iocpf_sm_mismatch_entry()
652 bfa_iocpf_sm_mismatch(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_mismatch() argument
654 struct bfa_ioc *ioc = iocpf->ioc; in bfa_iocpf_sm_mismatch()
658 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fwcheck); in bfa_iocpf_sm_mismatch()
663 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_mismatch()
669 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_mismatch()
679 bfa_iocpf_sm_semwait_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_semwait_entry() argument
681 bfa_ioc_hw_sem_get(iocpf->ioc); in bfa_iocpf_sm_semwait_entry()
686 bfa_iocpf_sm_semwait(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_semwait() argument
688 struct bfa_ioc *ioc = iocpf->ioc; in bfa_iocpf_sm_semwait()
694 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_hwinit); in bfa_iocpf_sm_semwait()
703 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail); in bfa_iocpf_sm_semwait()
709 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling_sync); in bfa_iocpf_sm_semwait()
718 bfa_iocpf_sm_hwinit_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_hwinit_entry() argument
720 iocpf->poll_time = 0; in bfa_iocpf_sm_hwinit_entry()
721 bfa_ioc_reset(iocpf->ioc, false); in bfa_iocpf_sm_hwinit_entry()
728 bfa_iocpf_sm_hwinit(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_hwinit() argument
730 struct bfa_ioc *ioc = iocpf->ioc; in bfa_iocpf_sm_hwinit()
734 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_enabling); in bfa_iocpf_sm_hwinit()
740 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_initfail_sync); in bfa_iocpf_sm_hwinit()
747 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabled); in bfa_iocpf_sm_hwinit()
756 bfa_iocpf_sm_enabling_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_enabling_entry() argument
758 mod_timer(&(iocpf->ioc)->iocpf_timer, jiffies + in bfa_iocpf_sm_enabling_entry()
763 iocpf->ioc->cbfn->reset_cbfn(iocpf->ioc->bfa); in bfa_iocpf_sm_enabling_entry()
764 bfa_ioc_send_enable(iocpf->ioc); in bfa_iocpf_sm_enabling_entry()
771 bfa_iocpf_sm_enabling(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_enabling() argument
773 struct bfa_ioc *ioc = iocpf->ioc; in bfa_iocpf_sm_enabling()
779 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_ready); in bfa_iocpf_sm_enabling()
790 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_initfail_sync); in bfa_iocpf_sm_enabling()
796 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling); in bfa_iocpf_sm_enabling()
805 bfa_iocpf_sm_ready_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_ready_entry() argument
807 bfa_ioc_pf_enabled(iocpf->ioc); in bfa_iocpf_sm_ready_entry()
811 bfa_iocpf_sm_ready(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_ready() argument
815 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling); in bfa_iocpf_sm_ready()
819 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_initfail_sync); in bfa_iocpf_sm_ready()
823 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail_sync); in bfa_iocpf_sm_ready()
832 bfa_iocpf_sm_disabling_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_disabling_entry() argument
834 mod_timer(&(iocpf->ioc)->iocpf_timer, jiffies + in bfa_iocpf_sm_disabling_entry()
836 bfa_ioc_send_disable(iocpf->ioc); in bfa_iocpf_sm_disabling_entry()
841 bfa_iocpf_sm_disabling(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_disabling() argument
843 struct bfa_ioc *ioc = iocpf->ioc; in bfa_iocpf_sm_disabling()
848 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling_sync); in bfa_iocpf_sm_disabling()
857 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling_sync); in bfa_iocpf_sm_disabling()
869 bfa_iocpf_sm_disabling_sync_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_disabling_sync_entry() argument
871 bfa_ioc_hw_sem_get(iocpf->ioc); in bfa_iocpf_sm_disabling_sync_entry()
876 bfa_iocpf_sm_disabling_sync(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_disabling_sync() argument
878 struct bfa_ioc *ioc = iocpf->ioc; in bfa_iocpf_sm_disabling_sync()
884 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabled); in bfa_iocpf_sm_disabling_sync()
888 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail); in bfa_iocpf_sm_disabling_sync()
902 bfa_iocpf_sm_disabled_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_disabled_entry() argument
904 bfa_ioc_mbox_flush(iocpf->ioc); in bfa_iocpf_sm_disabled_entry()
905 bfa_ioc_pf_disabled(iocpf->ioc); in bfa_iocpf_sm_disabled_entry()
909 bfa_iocpf_sm_disabled(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_disabled() argument
911 struct bfa_ioc *ioc = iocpf->ioc; in bfa_iocpf_sm_disabled()
915 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_semwait); in bfa_iocpf_sm_disabled()
920 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_disabled()
929 bfa_iocpf_sm_initfail_sync_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_initfail_sync_entry() argument
931 bfa_nw_ioc_debug_save_ftrc(iocpf->ioc); in bfa_iocpf_sm_initfail_sync_entry()
932 bfa_ioc_hw_sem_get(iocpf->ioc); in bfa_iocpf_sm_initfail_sync_entry()
937 bfa_iocpf_sm_initfail_sync(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_initfail_sync() argument
939 struct bfa_ioc *ioc = iocpf->ioc; in bfa_iocpf_sm_initfail_sync()
947 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_initfail); in bfa_iocpf_sm_initfail_sync()
951 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail); in bfa_iocpf_sm_initfail_sync()
957 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling_sync); in bfa_iocpf_sm_initfail_sync()
963 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_initfail_sync()
975 bfa_iocpf_sm_initfail_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_initfail_entry() argument
981 bfa_iocpf_sm_initfail(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_initfail() argument
983 struct bfa_ioc *ioc = iocpf->ioc; in bfa_iocpf_sm_initfail()
987 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabled); in bfa_iocpf_sm_initfail()
992 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_initfail()
1001 bfa_iocpf_sm_fail_sync_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_fail_sync_entry() argument
1006 bfa_ioc_lpu_stop(iocpf->ioc); in bfa_iocpf_sm_fail_sync_entry()
1011 bfa_ioc_mbox_flush(iocpf->ioc); in bfa_iocpf_sm_fail_sync_entry()
1012 bfa_ioc_hw_sem_get(iocpf->ioc); in bfa_iocpf_sm_fail_sync_entry()
1017 bfa_iocpf_sm_fail_sync(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_fail_sync() argument
1019 struct bfa_ioc *ioc = iocpf->ioc; in bfa_iocpf_sm_fail_sync()
1025 if (!iocpf->auto_recover) { in bfa_iocpf_sm_fail_sync()
1029 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail); in bfa_iocpf_sm_fail_sync()
1032 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_hwinit); in bfa_iocpf_sm_fail_sync()
1035 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_semwait); in bfa_iocpf_sm_fail_sync()
1041 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail); in bfa_iocpf_sm_fail_sync()
1047 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling_sync); in bfa_iocpf_sm_fail_sync()
1059 bfa_iocpf_sm_fail_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_fail_entry() argument
1065 bfa_iocpf_sm_fail(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_fail() argument
1069 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabled); in bfa_iocpf_sm_fail()
1192 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_SEM_ERROR); in bfa_ioc_hw_sem_get()
1196 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_SEMLOCKED); in bfa_ioc_hw_sem_get()
1874 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_FWREADY); in bfa_ioc_hwinit()
2093 struct bfa_iocpf *iocpf = &ioc->iocpf; in bfa_ioc_enable_reply() local
2097 bfa_fsm_send_event(iocpf, IOCPF_E_FWRSP_ENABLE); in bfa_ioc_enable_reply()
2393 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_TIMEOUT); in bfa_ioc_boot()
2439 struct bfa_iocpf *iocpf = &ioc->iocpf; in bfa_ioc_isr() local
2456 bfa_fsm_send_event(iocpf, IOCPF_E_FWRSP_DISABLE); in bfa_ioc_isr()
2483 ioc->iocpf.ioc = ioc; in bfa_nw_ioc_attach()
2619 ioc->dbg_fwsave_len = ioc->iocpf.auto_recover ? BNA_DBG_FWTRC_LEN : 0; in bfa_nw_ioc_debug_memclaim()
2868 iocpf_st = bfa_sm_to_state(iocpf_sm_table, ioc->iocpf.fsm); in bfa_ioc_get_state()
2948 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_ENABLE); in bfa_iocpf_enable()
2954 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_DISABLE); in bfa_iocpf_disable()
2960 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_FAIL); in bfa_iocpf_fail()
2966 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_INITFAIL); in bfa_iocpf_initfail()
2972 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_GETATTRFAIL); in bfa_iocpf_getattrfail()
2978 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_STOP); in bfa_iocpf_stop()
2986 iocpf_st = bfa_sm_to_state(iocpf_sm_table, ioc->iocpf.fsm); in bfa_nw_iocpf_timeout()
2991 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_TIMEOUT); in bfa_nw_iocpf_timeout()
3006 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_FWREADY); in bfa_ioc_poll_fwinit()
3010 if (ioc->iocpf.poll_time >= BFA_IOC_TOV) { in bfa_ioc_poll_fwinit()
3011 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_TIMEOUT); in bfa_ioc_poll_fwinit()
3013 ioc->iocpf.poll_time += BFA_IOC_POLL_TOV; in bfa_ioc_poll_fwinit()