Lines Matching refs:iocpf
250 bfa_fsm_set_state(&ioc->iocpf, bfa_iocpf_sm_reset); in bfa_ioc_sm_reset_entry()
391 if (ioc->iocpf.auto_recover) in bfa_ioc_sm_op()
581 bfa_iocpf_sm_reset_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_reset_entry() argument
583 iocpf->fw_mismatch_notified = false; in bfa_iocpf_sm_reset_entry()
584 iocpf->auto_recover = bfa_nw_auto_recover; in bfa_iocpf_sm_reset_entry()
589 bfa_iocpf_sm_reset(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_reset() argument
593 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fwcheck); in bfa_iocpf_sm_reset()
606 bfa_iocpf_sm_fwcheck_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_fwcheck_entry() argument
608 bfa_ioc_hw_sem_init(iocpf->ioc); in bfa_iocpf_sm_fwcheck_entry()
609 bfa_ioc_hw_sem_get(iocpf->ioc); in bfa_iocpf_sm_fwcheck_entry()
614 bfa_iocpf_sm_fwcheck(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_fwcheck() argument
616 struct bfa_ioc *ioc = iocpf->ioc; in bfa_iocpf_sm_fwcheck()
623 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_hwinit); in bfa_iocpf_sm_fwcheck()
632 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_mismatch); in bfa_iocpf_sm_fwcheck()
637 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail); in bfa_iocpf_sm_fwcheck()
643 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_fwcheck()
649 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_fwcheck()
659 bfa_iocpf_sm_mismatch_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_mismatch_entry() argument
662 if (!iocpf->fw_mismatch_notified) in bfa_iocpf_sm_mismatch_entry()
663 bfa_ioc_pf_fwmismatch(iocpf->ioc); in bfa_iocpf_sm_mismatch_entry()
665 iocpf->fw_mismatch_notified = true; in bfa_iocpf_sm_mismatch_entry()
666 mod_timer(&(iocpf->ioc)->iocpf_timer, jiffies + in bfa_iocpf_sm_mismatch_entry()
672 bfa_iocpf_sm_mismatch(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_mismatch() argument
674 struct bfa_ioc *ioc = iocpf->ioc; in bfa_iocpf_sm_mismatch()
678 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fwcheck); in bfa_iocpf_sm_mismatch()
683 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_mismatch()
689 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_mismatch()
699 bfa_iocpf_sm_semwait_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_semwait_entry() argument
701 bfa_ioc_hw_sem_get(iocpf->ioc); in bfa_iocpf_sm_semwait_entry()
706 bfa_iocpf_sm_semwait(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_semwait() argument
708 struct bfa_ioc *ioc = iocpf->ioc; in bfa_iocpf_sm_semwait()
714 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_hwinit); in bfa_iocpf_sm_semwait()
723 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail); in bfa_iocpf_sm_semwait()
729 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling_sync); in bfa_iocpf_sm_semwait()
738 bfa_iocpf_sm_hwinit_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_hwinit_entry() argument
740 iocpf->poll_time = 0; in bfa_iocpf_sm_hwinit_entry()
741 bfa_ioc_reset(iocpf->ioc, false); in bfa_iocpf_sm_hwinit_entry()
748 bfa_iocpf_sm_hwinit(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_hwinit() argument
750 struct bfa_ioc *ioc = iocpf->ioc; in bfa_iocpf_sm_hwinit()
754 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_enabling); in bfa_iocpf_sm_hwinit()
760 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_initfail_sync); in bfa_iocpf_sm_hwinit()
767 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabled); in bfa_iocpf_sm_hwinit()
776 bfa_iocpf_sm_enabling_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_enabling_entry() argument
778 mod_timer(&(iocpf->ioc)->iocpf_timer, jiffies + in bfa_iocpf_sm_enabling_entry()
783 iocpf->ioc->cbfn->reset_cbfn(iocpf->ioc->bfa); in bfa_iocpf_sm_enabling_entry()
784 bfa_ioc_send_enable(iocpf->ioc); in bfa_iocpf_sm_enabling_entry()
791 bfa_iocpf_sm_enabling(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_enabling() argument
793 struct bfa_ioc *ioc = iocpf->ioc; in bfa_iocpf_sm_enabling()
799 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_ready); in bfa_iocpf_sm_enabling()
811 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_initfail_sync); in bfa_iocpf_sm_enabling()
817 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling); in bfa_iocpf_sm_enabling()
826 bfa_iocpf_sm_ready_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_ready_entry() argument
828 bfa_ioc_pf_enabled(iocpf->ioc); in bfa_iocpf_sm_ready_entry()
832 bfa_iocpf_sm_ready(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_ready() argument
836 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling); in bfa_iocpf_sm_ready()
840 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_initfail_sync); in bfa_iocpf_sm_ready()
844 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail_sync); in bfa_iocpf_sm_ready()
853 bfa_iocpf_sm_disabling_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_disabling_entry() argument
855 mod_timer(&(iocpf->ioc)->iocpf_timer, jiffies + in bfa_iocpf_sm_disabling_entry()
857 bfa_ioc_send_disable(iocpf->ioc); in bfa_iocpf_sm_disabling_entry()
862 bfa_iocpf_sm_disabling(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_disabling() argument
864 struct bfa_ioc *ioc = iocpf->ioc; in bfa_iocpf_sm_disabling()
869 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling_sync); in bfa_iocpf_sm_disabling()
880 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling_sync); in bfa_iocpf_sm_disabling()
892 bfa_iocpf_sm_disabling_sync_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_disabling_sync_entry() argument
894 bfa_ioc_hw_sem_get(iocpf->ioc); in bfa_iocpf_sm_disabling_sync_entry()
899 bfa_iocpf_sm_disabling_sync(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_disabling_sync() argument
901 struct bfa_ioc *ioc = iocpf->ioc; in bfa_iocpf_sm_disabling_sync()
907 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabled); in bfa_iocpf_sm_disabling_sync()
911 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail); in bfa_iocpf_sm_disabling_sync()
925 bfa_iocpf_sm_disabled_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_disabled_entry() argument
927 bfa_ioc_mbox_flush(iocpf->ioc); in bfa_iocpf_sm_disabled_entry()
928 bfa_ioc_pf_disabled(iocpf->ioc); in bfa_iocpf_sm_disabled_entry()
932 bfa_iocpf_sm_disabled(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_disabled() argument
934 struct bfa_ioc *ioc = iocpf->ioc; in bfa_iocpf_sm_disabled()
938 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_semwait); in bfa_iocpf_sm_disabled()
943 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_disabled()
952 bfa_iocpf_sm_initfail_sync_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_initfail_sync_entry() argument
954 bfa_nw_ioc_debug_save_ftrc(iocpf->ioc); in bfa_iocpf_sm_initfail_sync_entry()
955 bfa_ioc_hw_sem_get(iocpf->ioc); in bfa_iocpf_sm_initfail_sync_entry()
960 bfa_iocpf_sm_initfail_sync(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_initfail_sync() argument
962 struct bfa_ioc *ioc = iocpf->ioc; in bfa_iocpf_sm_initfail_sync()
970 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_initfail); in bfa_iocpf_sm_initfail_sync()
974 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail); in bfa_iocpf_sm_initfail_sync()
980 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling_sync); in bfa_iocpf_sm_initfail_sync()
986 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_initfail_sync()
998 bfa_iocpf_sm_initfail_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_initfail_entry() argument
1004 bfa_iocpf_sm_initfail(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_initfail() argument
1006 struct bfa_ioc *ioc = iocpf->ioc; in bfa_iocpf_sm_initfail()
1010 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabled); in bfa_iocpf_sm_initfail()
1015 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_initfail()
1024 bfa_iocpf_sm_fail_sync_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_fail_sync_entry() argument
1029 bfa_ioc_lpu_stop(iocpf->ioc); in bfa_iocpf_sm_fail_sync_entry()
1034 bfa_ioc_mbox_flush(iocpf->ioc); in bfa_iocpf_sm_fail_sync_entry()
1035 bfa_ioc_hw_sem_get(iocpf->ioc); in bfa_iocpf_sm_fail_sync_entry()
1040 bfa_iocpf_sm_fail_sync(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_fail_sync() argument
1042 struct bfa_ioc *ioc = iocpf->ioc; in bfa_iocpf_sm_fail_sync()
1048 if (!iocpf->auto_recover) { in bfa_iocpf_sm_fail_sync()
1052 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail); in bfa_iocpf_sm_fail_sync()
1055 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_hwinit); in bfa_iocpf_sm_fail_sync()
1058 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_semwait); in bfa_iocpf_sm_fail_sync()
1064 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail); in bfa_iocpf_sm_fail_sync()
1070 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling_sync); in bfa_iocpf_sm_fail_sync()
1082 bfa_iocpf_sm_fail_entry(struct bfa_iocpf *iocpf) in bfa_iocpf_sm_fail_entry() argument
1088 bfa_iocpf_sm_fail(struct bfa_iocpf *iocpf, enum iocpf_event event) in bfa_iocpf_sm_fail() argument
1092 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabled); in bfa_iocpf_sm_fail()
1219 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_SEM_ERROR); in bfa_ioc_hw_sem_get()
1223 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_SEMLOCKED); in bfa_ioc_hw_sem_get()
1901 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_FWREADY); in bfa_ioc_hwinit()
2119 struct bfa_iocpf *iocpf = &ioc->iocpf; in bfa_ioc_enable_reply() local
2123 bfa_fsm_send_event(iocpf, IOCPF_E_FWRSP_ENABLE); in bfa_ioc_enable_reply()
2462 struct bfa_iocpf *iocpf = &ioc->iocpf; in bfa_ioc_isr() local
2479 bfa_fsm_send_event(iocpf, IOCPF_E_FWRSP_DISABLE); in bfa_ioc_isr()
2505 ioc->iocpf.ioc = ioc; in bfa_nw_ioc_attach()
2638 ioc->dbg_fwsave_len = ioc->iocpf.auto_recover ? BNA_DBG_FWTRC_LEN : 0; in bfa_nw_ioc_debug_memclaim()
2885 iocpf_st = bfa_sm_to_state(iocpf_sm_table, ioc->iocpf.fsm); in bfa_ioc_get_state()
2965 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_ENABLE); in bfa_iocpf_enable()
2971 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_DISABLE); in bfa_iocpf_disable()
2977 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_FAIL); in bfa_iocpf_fail()
2983 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_INITFAIL); in bfa_iocpf_initfail()
2989 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_GETATTRFAIL); in bfa_iocpf_getattrfail()
2995 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_STOP); in bfa_iocpf_stop()
3004 iocpf_st = bfa_sm_to_state(iocpf_sm_table, ioc->iocpf.fsm); in bfa_nw_iocpf_timeout()
3009 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_TIMEOUT); in bfa_nw_iocpf_timeout()
3026 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_FWREADY); in bfa_ioc_poll_fwinit()
3030 if (ioc->iocpf.poll_time >= BFA_IOC_TOV) { in bfa_ioc_poll_fwinit()
3033 ioc->iocpf.poll_time += BFA_IOC_POLL_TOV; in bfa_ioc_poll_fwinit()