Lines Matching refs:iocpf
291 bfa_fsm_set_state(&ioc->iocpf, bfa_iocpf_sm_reset); in bfa_ioc_sm_reset_entry()
324 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_ENABLE); in bfa_ioc_sm_enabling_entry()
347 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_INITFAIL); in bfa_ioc_sm_enabling()
361 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_STOP); in bfa_ioc_sm_enabling()
402 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_GETATTRFAIL); in bfa_ioc_sm_getattr()
449 if (ioc->iocpf.auto_recover) in bfa_ioc_sm_op()
457 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_FAIL); in bfa_ioc_sm_op()
470 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_DISABLE); in bfa_ioc_sm_disabling_entry()
494 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_FAIL); in bfa_ioc_sm_disabling()
532 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_STOP); in bfa_ioc_sm_disabled()
568 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_INITFAIL); in bfa_ioc_sm_fail_retry()
585 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_STOP); in bfa_ioc_sm_fail_retry()
620 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_STOP); in bfa_ioc_sm_fail()
675 bfa_iocpf_sm_reset_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_reset_entry() argument
677 iocpf->fw_mismatch_notified = BFA_FALSE; in bfa_iocpf_sm_reset_entry()
678 iocpf->auto_recover = bfa_auto_recover; in bfa_iocpf_sm_reset_entry()
685 bfa_iocpf_sm_reset(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_reset() argument
687 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_reset()
693 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fwcheck); in bfa_iocpf_sm_reset()
708 bfa_iocpf_sm_fwcheck_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_fwcheck_entry() argument
717 r32 = readl(iocpf->ioc->ioc_regs.ioc_init_sem_reg); in bfa_iocpf_sm_fwcheck_entry()
720 r32 = readl(iocpf->ioc->ioc_regs.ioc_init_sem_reg); in bfa_iocpf_sm_fwcheck_entry()
724 fwstate = bfa_ioc_get_cur_ioc_fwstate(iocpf->ioc); in bfa_iocpf_sm_fwcheck_entry()
726 writel(1, iocpf->ioc->ioc_regs.ioc_init_sem_reg); in bfa_iocpf_sm_fwcheck_entry()
730 bfa_ioc_fwver_get(iocpf->ioc, &fwhdr); in bfa_iocpf_sm_fwcheck_entry()
733 writel(1, iocpf->ioc->ioc_regs.ioc_init_sem_reg); in bfa_iocpf_sm_fwcheck_entry()
740 pgnum = PSS_SMEM_PGNUM(iocpf->ioc->ioc_regs.smem_pg0, loff); in bfa_iocpf_sm_fwcheck_entry()
742 writel(pgnum, iocpf->ioc->ioc_regs.host_page_num_fn); in bfa_iocpf_sm_fwcheck_entry()
745 bfa_mem_write(iocpf->ioc->ioc_regs.smem_page_start, loff, 0); in bfa_iocpf_sm_fwcheck_entry()
749 bfa_trc(iocpf->ioc, fwstate); in bfa_iocpf_sm_fwcheck_entry()
750 bfa_trc(iocpf->ioc, swab32(fwhdr.exec)); in bfa_iocpf_sm_fwcheck_entry()
751 bfa_ioc_set_cur_ioc_fwstate(iocpf->ioc, BFI_IOC_UNINIT); in bfa_iocpf_sm_fwcheck_entry()
752 bfa_ioc_set_alt_ioc_fwstate(iocpf->ioc, BFI_IOC_UNINIT); in bfa_iocpf_sm_fwcheck_entry()
757 bfa_ioc_ownership_reset(iocpf->ioc); in bfa_iocpf_sm_fwcheck_entry()
762 writel(1, iocpf->ioc->ioc_regs.ioc_init_sem_reg); in bfa_iocpf_sm_fwcheck_entry()
765 bfa_ioc_hw_sem_get(iocpf->ioc); in bfa_iocpf_sm_fwcheck_entry()
772 bfa_iocpf_sm_fwcheck(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_fwcheck() argument
774 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_fwcheck()
783 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_hwinit); in bfa_iocpf_sm_fwcheck()
791 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_mismatch); in bfa_iocpf_sm_fwcheck()
796 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail); in bfa_iocpf_sm_fwcheck()
802 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_fwcheck()
808 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_fwcheck()
820 bfa_iocpf_sm_mismatch_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_mismatch_entry() argument
825 if (iocpf->fw_mismatch_notified == BFA_FALSE) in bfa_iocpf_sm_mismatch_entry()
826 bfa_ioc_pf_fwmismatch(iocpf->ioc); in bfa_iocpf_sm_mismatch_entry()
828 iocpf->fw_mismatch_notified = BFA_TRUE; in bfa_iocpf_sm_mismatch_entry()
829 bfa_iocpf_timer_start(iocpf->ioc); in bfa_iocpf_sm_mismatch_entry()
836 bfa_iocpf_sm_mismatch(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_mismatch() argument
838 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_mismatch()
844 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fwcheck); in bfa_iocpf_sm_mismatch()
849 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_mismatch()
855 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_mismatch()
867 bfa_iocpf_sm_semwait_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_semwait_entry() argument
869 bfa_ioc_hw_sem_get(iocpf->ioc); in bfa_iocpf_sm_semwait_entry()
876 bfa_iocpf_sm_semwait(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_semwait() argument
878 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_semwait()
886 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_hwinit); in bfa_iocpf_sm_semwait()
894 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail); in bfa_iocpf_sm_semwait()
900 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling_sync); in bfa_iocpf_sm_semwait()
909 bfa_iocpf_sm_hwinit_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_hwinit_entry() argument
911 iocpf->poll_time = 0; in bfa_iocpf_sm_hwinit_entry()
912 bfa_ioc_hwinit(iocpf->ioc, BFA_FALSE); in bfa_iocpf_sm_hwinit_entry()
920 bfa_iocpf_sm_hwinit(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_hwinit() argument
922 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_hwinit()
928 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_enabling); in bfa_iocpf_sm_hwinit()
934 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_initfail_sync); in bfa_iocpf_sm_hwinit()
941 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabled); in bfa_iocpf_sm_hwinit()
950 bfa_iocpf_sm_enabling_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_enabling_entry() argument
952 bfa_iocpf_timer_start(iocpf->ioc); in bfa_iocpf_sm_enabling_entry()
956 iocpf->ioc->cbfn->reset_cbfn(iocpf->ioc->bfa); in bfa_iocpf_sm_enabling_entry()
957 bfa_ioc_send_enable(iocpf->ioc); in bfa_iocpf_sm_enabling_entry()
965 bfa_iocpf_sm_enabling(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_enabling() argument
967 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_enabling()
975 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_ready); in bfa_iocpf_sm_enabling()
988 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_initfail_sync); in bfa_iocpf_sm_enabling()
994 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling); in bfa_iocpf_sm_enabling()
1003 bfa_iocpf_sm_ready_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_ready_entry() argument
1005 bfa_fsm_send_event(iocpf->ioc, IOC_E_ENABLED); in bfa_iocpf_sm_ready_entry()
1009 bfa_iocpf_sm_ready(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_ready() argument
1011 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_ready()
1017 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling); in bfa_iocpf_sm_ready()
1021 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_initfail_sync); in bfa_iocpf_sm_ready()
1025 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail_sync); in bfa_iocpf_sm_ready()
1034 bfa_iocpf_sm_disabling_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_disabling_entry() argument
1036 bfa_iocpf_timer_start(iocpf->ioc); in bfa_iocpf_sm_disabling_entry()
1037 bfa_ioc_send_disable(iocpf->ioc); in bfa_iocpf_sm_disabling_entry()
1044 bfa_iocpf_sm_disabling(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_disabling() argument
1046 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_disabling()
1053 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling_sync); in bfa_iocpf_sm_disabling()
1064 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling_sync); in bfa_iocpf_sm_disabling()
1076 bfa_iocpf_sm_disabling_sync_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_disabling_sync_entry() argument
1078 bfa_ioc_hw_sem_get(iocpf->ioc); in bfa_iocpf_sm_disabling_sync_entry()
1085 bfa_iocpf_sm_disabling_sync(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_disabling_sync() argument
1087 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_disabling_sync()
1095 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabled); in bfa_iocpf_sm_disabling_sync()
1099 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail); in bfa_iocpf_sm_disabling_sync()
1115 bfa_iocpf_sm_disabled_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_disabled_entry() argument
1117 bfa_ioc_mbox_flush(iocpf->ioc); in bfa_iocpf_sm_disabled_entry()
1118 bfa_fsm_send_event(iocpf->ioc, IOC_E_DISABLED); in bfa_iocpf_sm_disabled_entry()
1122 bfa_iocpf_sm_disabled(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_disabled() argument
1124 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_disabled()
1130 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_semwait); in bfa_iocpf_sm_disabled()
1135 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_disabled()
1144 bfa_iocpf_sm_initfail_sync_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_initfail_sync_entry() argument
1146 bfa_ioc_debug_save_ftrc(iocpf->ioc); in bfa_iocpf_sm_initfail_sync_entry()
1147 bfa_ioc_hw_sem_get(iocpf->ioc); in bfa_iocpf_sm_initfail_sync_entry()
1154 bfa_iocpf_sm_initfail_sync(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_initfail_sync() argument
1156 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_initfail_sync()
1166 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_initfail); in bfa_iocpf_sm_initfail_sync()
1170 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail); in bfa_iocpf_sm_initfail_sync()
1176 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling_sync); in bfa_iocpf_sm_initfail_sync()
1182 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_initfail_sync()
1194 bfa_iocpf_sm_initfail_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_initfail_entry() argument
1196 bfa_trc(iocpf->ioc, 0); in bfa_iocpf_sm_initfail_entry()
1203 bfa_iocpf_sm_initfail(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_initfail() argument
1205 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_initfail()
1211 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabled); in bfa_iocpf_sm_initfail()
1216 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_reset); in bfa_iocpf_sm_initfail()
1225 bfa_iocpf_sm_fail_sync_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_fail_sync_entry() argument
1230 bfa_ioc_lpu_stop(iocpf->ioc); in bfa_iocpf_sm_fail_sync_entry()
1235 bfa_ioc_mbox_flush(iocpf->ioc); in bfa_iocpf_sm_fail_sync_entry()
1237 bfa_ioc_hw_sem_get(iocpf->ioc); in bfa_iocpf_sm_fail_sync_entry()
1241 bfa_iocpf_sm_fail_sync(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_fail_sync() argument
1243 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_fail_sync()
1251 if (!iocpf->auto_recover) { in bfa_iocpf_sm_fail_sync()
1255 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail); in bfa_iocpf_sm_fail_sync()
1258 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_hwinit); in bfa_iocpf_sm_fail_sync()
1261 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_semwait); in bfa_iocpf_sm_fail_sync()
1267 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_fail); in bfa_iocpf_sm_fail_sync()
1273 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling_sync); in bfa_iocpf_sm_fail_sync()
1285 bfa_iocpf_sm_fail_entry(struct bfa_iocpf_s *iocpf) in bfa_iocpf_sm_fail_entry() argument
1287 bfa_trc(iocpf->ioc, 0); in bfa_iocpf_sm_fail_entry()
1294 bfa_iocpf_sm_fail(struct bfa_iocpf_s *iocpf, enum iocpf_event event) in bfa_iocpf_sm_fail() argument
1296 struct bfa_ioc_s *ioc = iocpf->ioc; in bfa_iocpf_sm_fail()
1302 bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabled); in bfa_iocpf_sm_fail()
1369 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_SEM_ERROR); in bfa_ioc_hw_sem_get()
1373 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_SEMLOCKED); in bfa_ioc_hw_sem_get()
1759 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_FWREADY); in bfa_ioc_hwinit()
2333 struct bfa_iocpf_s *iocpf = &ioc->iocpf; in bfa_ioc_isr() local
2347 bfa_fsm_send_event(iocpf, IOCPF_E_FWRSP_ENABLE); in bfa_ioc_isr()
2351 bfa_fsm_send_event(iocpf, IOCPF_E_FWRSP_DISABLE); in bfa_ioc_isr()
2380 ioc->iocpf.ioc = ioc; in bfa_ioc_attach()
2661 bfa_fsm_cmp_state(&ioc->iocpf, bfa_iocpf_sm_fwcheck) || in bfa_ioc_fw_mismatch()
2662 bfa_fsm_cmp_state(&ioc->iocpf, bfa_iocpf_sm_mismatch); in bfa_ioc_fw_mismatch()
2837 iocpf_st = bfa_sm_to_state(iocpf_sm_table, ioc->iocpf.fsm); in bfa_ioc_get_state()
3158 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_TIMEOUT); in bfa_iocpf_timeout()
3177 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_FWREADY); in bfa_ioc_poll_fwinit()
3181 if (ioc->iocpf.poll_time >= (3 * BFA_IOC_TOV)) in bfa_ioc_poll_fwinit()
3184 ioc->iocpf.poll_time += BFA_IOC_POLL_TOV; in bfa_ioc_poll_fwinit()