Lines Matching refs:iocpf

284 	bfa_fsm_set_state(&ioc->iocpf, bfa_iocpf_sm_reset);  in bfa_ioc_sm_reset_entry()
317 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_ENABLE); in bfa_ioc_sm_enabling_entry()
340 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_INITFAIL); in bfa_ioc_sm_enabling()
354 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_STOP); in bfa_ioc_sm_enabling()
395 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_GETATTRFAIL); in bfa_ioc_sm_getattr()
442 if (ioc->iocpf.auto_recover) in bfa_ioc_sm_op()
450 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_FAIL); in bfa_ioc_sm_op()
463 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_DISABLE); in bfa_ioc_sm_disabling_entry()
487 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_FAIL); in bfa_ioc_sm_disabling()
525 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_STOP); in bfa_ioc_sm_disabled()
561 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_INITFAIL); in bfa_ioc_sm_fail_retry()
578 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_STOP); in bfa_ioc_sm_fail_retry()
613 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_STOP); in bfa_ioc_sm_fail()
668 bfa_iocpf_sm_reset_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_reset_entry() argument
670 iocpf->fw_mismatch_notified = BFA_FALSE; in bfa_iocpf_sm_reset_entry()
671 iocpf->auto_recover = bfa_auto_recover; in bfa_iocpf_sm_reset_entry()
678 bfa_iocpf_sm_reset(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_reset() argument
680 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_reset()
686 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fwcheck); in bfa_iocpf_sm_reset()
701 bfa_iocpf_sm_fwcheck_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_fwcheck_entry() argument
710 r32 = readl(iocpf->ioc->ioc_regs.ioc_init_sem_reg); in bfa_iocpf_sm_fwcheck_entry()
713 r32 = readl(iocpf->ioc->ioc_regs.ioc_init_sem_reg); in bfa_iocpf_sm_fwcheck_entry()
717 fwstate = bfa_ioc_get_cur_ioc_fwstate(iocpf->ioc); in bfa_iocpf_sm_fwcheck_entry()
719 writel(1, iocpf->ioc->ioc_regs.ioc_init_sem_reg); in bfa_iocpf_sm_fwcheck_entry()
723 bfa_ioc_fwver_get(iocpf->ioc, &fwhdr); in bfa_iocpf_sm_fwcheck_entry()
726 writel(1, iocpf->ioc->ioc_regs.ioc_init_sem_reg); in bfa_iocpf_sm_fwcheck_entry()
733 pgnum = PSS_SMEM_PGNUM(iocpf->ioc->ioc_regs.smem_pg0, loff); in bfa_iocpf_sm_fwcheck_entry()
734 writel(pgnum, iocpf->ioc->ioc_regs.host_page_num_fn); in bfa_iocpf_sm_fwcheck_entry()
737 bfa_mem_write(iocpf->ioc->ioc_regs.smem_page_start, loff, 0); in bfa_iocpf_sm_fwcheck_entry()
741 bfa_trc(iocpf->ioc, fwstate); in bfa_iocpf_sm_fwcheck_entry()
742 bfa_trc(iocpf->ioc, swab32(fwhdr.exec)); in bfa_iocpf_sm_fwcheck_entry()
743 bfa_ioc_set_cur_ioc_fwstate(iocpf->ioc, BFI_IOC_UNINIT); in bfa_iocpf_sm_fwcheck_entry()
744 bfa_ioc_set_alt_ioc_fwstate(iocpf->ioc, BFI_IOC_UNINIT); in bfa_iocpf_sm_fwcheck_entry()
749 bfa_ioc_ownership_reset(iocpf->ioc); in bfa_iocpf_sm_fwcheck_entry()
754 writel(1, iocpf->ioc->ioc_regs.ioc_init_sem_reg); in bfa_iocpf_sm_fwcheck_entry()
757 bfa_ioc_hw_sem_get(iocpf->ioc); in bfa_iocpf_sm_fwcheck_entry()
764 bfa_iocpf_sm_fwcheck(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_fwcheck() argument
766 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_fwcheck()
775 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_hwinit); in bfa_iocpf_sm_fwcheck()
783 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_mismatch); in bfa_iocpf_sm_fwcheck()
788 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail); in bfa_iocpf_sm_fwcheck()
794 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_fwcheck()
800 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_fwcheck()
812 bfa_iocpf_sm_mismatch_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_mismatch_entry() argument
817 if (iocpf->fw_mismatch_notified == BFA_FALSE) in bfa_iocpf_sm_mismatch_entry()
818 bfa_ioc_pf_fwmismatch(iocpf->ioc); in bfa_iocpf_sm_mismatch_entry()
820 iocpf->fw_mismatch_notified = BFA_TRUE; in bfa_iocpf_sm_mismatch_entry()
821 bfa_iocpf_timer_start(iocpf->ioc); in bfa_iocpf_sm_mismatch_entry()
828 bfa_iocpf_sm_mismatch(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_mismatch() argument
830 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_mismatch()
836 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fwcheck); in bfa_iocpf_sm_mismatch()
841 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_mismatch()
847 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_mismatch()
859 bfa_iocpf_sm_semwait_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_semwait_entry() argument
861 bfa_ioc_hw_sem_get(iocpf->ioc); in bfa_iocpf_sm_semwait_entry()
868 bfa_iocpf_sm_semwait(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_semwait() argument
870 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_semwait()
878 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_hwinit); in bfa_iocpf_sm_semwait()
886 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail); in bfa_iocpf_sm_semwait()
892 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling_sync); in bfa_iocpf_sm_semwait()
901 bfa_iocpf_sm_hwinit_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_hwinit_entry() argument
903 iocpf->poll_time = 0; in bfa_iocpf_sm_hwinit_entry()
904 bfa_ioc_hwinit(iocpf->ioc, BFA_FALSE); in bfa_iocpf_sm_hwinit_entry()
912 bfa_iocpf_sm_hwinit(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_hwinit() argument
914 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_hwinit()
920 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_enabling); in bfa_iocpf_sm_hwinit()
926 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_initfail_sync); in bfa_iocpf_sm_hwinit()
933 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabled); in bfa_iocpf_sm_hwinit()
942 bfa_iocpf_sm_enabling_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_enabling_entry() argument
944 bfa_iocpf_timer_start(iocpf->ioc); in bfa_iocpf_sm_enabling_entry()
948 iocpf->ioc->cbfn->reset_cbfn(iocpf->ioc->bfa); in bfa_iocpf_sm_enabling_entry()
949 bfa_ioc_send_enable(iocpf->ioc); in bfa_iocpf_sm_enabling_entry()
957 bfa_iocpf_sm_enabling(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_enabling() argument
959 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_enabling()
967 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_ready); in bfa_iocpf_sm_enabling()
978 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_initfail_sync); in bfa_iocpf_sm_enabling()
984 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling); in bfa_iocpf_sm_enabling()
993 bfa_iocpf_sm_ready_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_ready_entry() argument
995 bfa_fsm_send_event(iocpf->ioc, IOC_E_ENABLED); in bfa_iocpf_sm_ready_entry()
999 bfa_iocpf_sm_ready(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_ready() argument
1001 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_ready()
1007 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling); in bfa_iocpf_sm_ready()
1011 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_initfail_sync); in bfa_iocpf_sm_ready()
1015 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail_sync); in bfa_iocpf_sm_ready()
1024 bfa_iocpf_sm_disabling_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_disabling_entry() argument
1026 bfa_iocpf_timer_start(iocpf->ioc); in bfa_iocpf_sm_disabling_entry()
1027 bfa_ioc_send_disable(iocpf->ioc); in bfa_iocpf_sm_disabling_entry()
1034 bfa_iocpf_sm_disabling(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_disabling() argument
1036 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_disabling()
1043 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling_sync); in bfa_iocpf_sm_disabling()
1052 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling_sync); in bfa_iocpf_sm_disabling()
1064 bfa_iocpf_sm_disabling_sync_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_disabling_sync_entry() argument
1066 bfa_ioc_hw_sem_get(iocpf->ioc); in bfa_iocpf_sm_disabling_sync_entry()
1073 bfa_iocpf_sm_disabling_sync(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_disabling_sync() argument
1075 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_disabling_sync()
1083 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabled); in bfa_iocpf_sm_disabling_sync()
1087 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail); in bfa_iocpf_sm_disabling_sync()
1103 bfa_iocpf_sm_disabled_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_disabled_entry() argument
1105 bfa_ioc_mbox_flush(iocpf->ioc); in bfa_iocpf_sm_disabled_entry()
1106 bfa_fsm_send_event(iocpf->ioc, IOC_E_DISABLED); in bfa_iocpf_sm_disabled_entry()
1110 bfa_iocpf_sm_disabled(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_disabled() argument
1112 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_disabled()
1118 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_semwait); in bfa_iocpf_sm_disabled()
1123 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_disabled()
1132 bfa_iocpf_sm_initfail_sync_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_initfail_sync_entry() argument
1134 bfa_ioc_debug_save_ftrc(iocpf->ioc); in bfa_iocpf_sm_initfail_sync_entry()
1135 bfa_ioc_hw_sem_get(iocpf->ioc); in bfa_iocpf_sm_initfail_sync_entry()
1142 bfa_iocpf_sm_initfail_sync(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_initfail_sync() argument
1144 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_initfail_sync()
1154 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_initfail); in bfa_iocpf_sm_initfail_sync()
1158 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail); in bfa_iocpf_sm_initfail_sync()
1164 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling_sync); in bfa_iocpf_sm_initfail_sync()
1170 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_initfail_sync()
1182 bfa_iocpf_sm_initfail_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_initfail_entry() argument
1184 bfa_trc(iocpf->ioc, 0); in bfa_iocpf_sm_initfail_entry()
1191 bfa_iocpf_sm_initfail(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_initfail() argument
1193 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_initfail()
1199 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabled); in bfa_iocpf_sm_initfail()
1204 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_initfail()
1213 bfa_iocpf_sm_fail_sync_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_fail_sync_entry() argument
1218 bfa_ioc_lpu_stop(iocpf->ioc); in bfa_iocpf_sm_fail_sync_entry()
1223 bfa_ioc_mbox_flush(iocpf->ioc); in bfa_iocpf_sm_fail_sync_entry()
1225 bfa_ioc_hw_sem_get(iocpf->ioc); in bfa_iocpf_sm_fail_sync_entry()
1229 bfa_iocpf_sm_fail_sync(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_fail_sync() argument
1231 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_fail_sync()
1239 if (!iocpf->auto_recover) { in bfa_iocpf_sm_fail_sync()
1243 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail); in bfa_iocpf_sm_fail_sync()
1246 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_hwinit); in bfa_iocpf_sm_fail_sync()
1249 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_semwait); in bfa_iocpf_sm_fail_sync()
1255 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail); in bfa_iocpf_sm_fail_sync()
1261 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling_sync); in bfa_iocpf_sm_fail_sync()
1273 bfa_iocpf_sm_fail_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_fail_entry() argument
1275 bfa_trc(iocpf->ioc, 0); in bfa_iocpf_sm_fail_entry()
1282 bfa_iocpf_sm_fail(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_fail() argument
1284 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_fail()
1290 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabled); in bfa_iocpf_sm_fail()
1357 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_SEM_ERROR); in bfa_ioc_hw_sem_get()
1361 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_SEMLOCKED); in bfa_ioc_hw_sem_get()
1745 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_FWREADY); in bfa_ioc_hwinit()
2319 struct bfa_iocpf_s *iocpf = &ioc->iocpf; in bfa_ioc_isr() local
2333 bfa_fsm_send_event(iocpf, IOCPF_E_FWRSP_ENABLE); in bfa_ioc_isr()
2337 bfa_fsm_send_event(iocpf, IOCPF_E_FWRSP_DISABLE); in bfa_ioc_isr()
2366 ioc->iocpf.ioc = ioc; in bfa_ioc_attach()
2647 bfa_fsm_cmp_state(&ioc->iocpf, bfa_iocpf_sm_fwcheck) || in bfa_ioc_fw_mismatch()
2648 bfa_fsm_cmp_state(&ioc->iocpf, bfa_iocpf_sm_mismatch); in bfa_ioc_fw_mismatch()
2823 iocpf_st = bfa_sm_to_state(iocpf_sm_table, ioc->iocpf.fsm); in bfa_ioc_get_state()
3144 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_TIMEOUT); in bfa_iocpf_timeout()
3163 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_FWREADY); in bfa_ioc_poll_fwinit()
3167 if (ioc->iocpf.poll_time >= (3 * BFA_IOC_TOV)) in bfa_ioc_poll_fwinit()
3170 ioc->iocpf.poll_time += BFA_IOC_POLL_TOV; in bfa_ioc_poll_fwinit()