Lines Matching full:fsm
112 static void mpc_action_nop(fsm_instance *fsm, int event, void *arg);
113 static void mpc_action_go_ready(fsm_instance *fsm, int event, void *arg);
117 static void mpc_action_yside_xid(fsm_instance *fsm, int event, void *arg);
118 static void mpc_action_doxid0(fsm_instance *fsm, int event, void *arg);
119 static void mpc_action_doxid7(fsm_instance *fsm, int event, void *arg);
120 static void mpc_action_xside_xid(fsm_instance *fsm, int event, void *arg);
121 static void mpc_action_rcvd_xid0(fsm_instance *fsm, int event, void *arg);
122 static void mpc_action_rcvd_xid7(fsm_instance *fsm, int event, void *arg);
347 CTCM_FUNTAIL, dev->name, fsm_getstate_str(grp->fsm)); in ctc_mpc_alloc_channel()
349 switch (fsm_getstate(grp->fsm)) { in ctc_mpc_alloc_channel()
359 /*fsm_newstate(grp->fsm, MPCG_STATE_XID2INITW);*/ in ctc_mpc_alloc_channel()
371 fsm_event(priv->fsm, DEV_EVENT_START, dev); in ctc_mpc_alloc_channel()
385 fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); in ctc_mpc_alloc_channel()
417 CTCM_FUNTAIL, dev->name, fsm_getstate_str(grp->fsm)); in ctc_mpc_establish_connectivity()
422 switch (fsm_getstate(grp->fsm)) { in ctc_mpc_establish_connectivity()
437 fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); in ctc_mpc_establish_connectivity()
459 if ((fsm_getstate(rch->fsm) > CH_XID0_PENDING) || in ctc_mpc_establish_connectivity()
460 (fsm_getstate(wch->fsm) > CH_XID0_PENDING)) { in ctc_mpc_establish_connectivity()
467 fsm_newstate(grp->fsm, MPCG_STATE_XID0IOWAIT); in ctc_mpc_establish_connectivity()
475 (fsm_getstate(rch->fsm) == CH_XID0_PENDING)) in ctc_mpc_establish_connectivity()
476 fsm_event(grp->fsm, MPCG_EVENT_XID0DO, rch); in ctc_mpc_establish_connectivity()
489 (fsm_getstate(wch->fsm) == CH_XID0_PENDING)) in ctc_mpc_establish_connectivity()
490 fsm_event(grp->fsm, MPCG_EVENT_XID0DO, wch); in ctc_mpc_establish_connectivity()
542 fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); in ctc_mpc_dealloc_ch()
573 mpcg_state = fsm_getstate(grp->fsm); in ctc_mpc_flow_control()
582 fsm_newstate(grp->fsm, MPCG_STATE_FLOWC); in ctc_mpc_flow_control()
588 fsm_newstate(grp->fsm, MPCG_STATE_READY); in ctc_mpc_flow_control()
672 fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); in ctcmpc_send_sweep_resp()
708 * MPC Group Station FSM definitions
738 * The MPC Group Station FSM
812 * MPC Group Station FSM action
815 static void mpc_action_go_ready(fsm_instance *fsm, int event, void *arg) in mpc_action_go_ready() argument
839 fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); in mpc_action_go_ready()
877 fsm_newstate(grp->fsm, MPCG_STATE_READY); in mpc_group_ready()
885 ctcmpc_chx_rxidle(ch->fsm, CTC_EVENT_START, ch); in mpc_group_ready()
894 ctcm_chx_txidle(ch->fsm, CTC_EVENT_START, ch); in mpc_group_ready()
914 * helper of dev_action (called from channel fsm)
934 fsm_getstate_str(grp->fsm), grp->num_channel_paths, in mpc_channel_action()
953 fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); in mpc_channel_action()
980 fsm_newstate(ch->fsm, CH_XID0_PENDING); in mpc_channel_action()
984 (fsm_getstate(grp->fsm) < MPCG_STATE_XID2INITW)) { in mpc_channel_action()
985 fsm_newstate(grp->fsm, MPCG_STATE_XID2INITW); in mpc_channel_action()
1007 fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); in mpc_channel_action()
1013 fsm_getstate_str(grp->fsm), grp->num_channel_paths, in mpc_channel_action()
1063 if ((fsm_getstate(grp->fsm) == MPCG_STATE_FLOWC) || in ctcmpc_unpack_skb()
1064 ((fsm_getstate(grp->fsm) == MPCG_STATE_READY) && in ctcmpc_unpack_skb()
1088 if (unlikely(fsm_getstate(grp->fsm) != MPCG_STATE_READY)) in ctcmpc_unpack_skb()
1137 fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); in ctcmpc_unpack_skb()
1187 fsm_event(grp->fsm, MPCG_EVENT_XID2, mpcginfo); in ctcmpc_unpack_skb()
1189 fsm_event(grp->fsm, MPCG_EVENT_DISCONC, mpcginfo); in ctcmpc_unpack_skb()
1208 fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); in ctcmpc_unpack_skb()
1234 while ((fsm_getstate(grp->fsm) != MPCG_STATE_FLOWC) && in ctcmpc_bh()
1242 fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); in ctcmpc_bh()
1267 grp->fsm = init_fsm("mpcg", mpcg_state_names, mpcg_event_names, in ctcmpc_init_mpc_group()
1270 if (grp->fsm == NULL) { in ctcmpc_init_mpc_group()
1275 fsm_newstate(grp->fsm, MPCG_STATE_RESET); in ctcmpc_init_mpc_group()
1276 fsm_settimer(grp->fsm, &grp->timer); in ctcmpc_init_mpc_group()
1281 kfree_fsm(grp->fsm); in ctcmpc_init_mpc_group()
1301 kfree_fsm(grp->fsm); in ctcmpc_init_mpc_group()
1316 * The MPC Group Station FSM
1320 * MPC Group Station FSM actions
1354 grp->saved_state = fsm_getstate(grp->fsm); in mpc_action_go_inop()
1355 fsm_newstate(grp->fsm, MPCG_STATE_INOP); in mpc_action_go_inop()
1415 fsm_newstate(grp->fsm, MPCG_STATE_RESET); in mpc_action_go_inop()
1423 fsm_newstate(grp->fsm, MPCG_STATE_RESET); in mpc_action_go_inop()
1432 * MPC Group Station FSM action
1435 * fi An instance of an mpc_group fsm.
1452 switch (fsm_getstate(grp->fsm)) { in mpc_action_timeout()
1457 if ((fsm_getstate(rch->fsm) == CH_XID0_PENDING) && in mpc_action_timeout()
1458 (fsm_getstate(wch->fsm) == CH_XID0_PENDING)) in mpc_action_timeout()
1462 fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); in mpc_action_timeout()
1472 * MPC Group Station FSM action
1493 fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); in mpc_action_discontact()
1502 * MPC Group Station - not part of FSM
1525 * helper function of mpc FSM
1647 * MPC Group Station FSM action
1650 static void mpc_action_side_xid(fsm_instance *fsm, void *arg, int side) in mpc_action_side_xid() argument
1804 * MPC Group Station FSM action
1807 static void mpc_action_xside_xid(fsm_instance *fsm, int event, void *arg) in mpc_action_xside_xid() argument
1809 mpc_action_side_xid(fsm, arg, XSIDE); in mpc_action_xside_xid()
1813 * MPC Group Station FSM action
1816 static void mpc_action_yside_xid(fsm_instance *fsm, int event, void *arg) in mpc_action_yside_xid() argument
1818 mpc_action_side_xid(fsm, arg, YSIDE); in mpc_action_yside_xid()
1822 * MPC Group Station FSM action
1825 static void mpc_action_doxid0(fsm_instance *fsm, int event, void *arg) in mpc_action_doxid0() argument
1842 fsm_newstate(ch->fsm, CH_XID0_INPROGRESS); in mpc_action_doxid0()
1846 switch (fsm_getstate(grp->fsm)) { in mpc_action_doxid0()
1857 fsm_event(grp->fsm, MPCG_EVENT_DOIO, ch); in mpc_action_doxid0()
1863 * MPC Group Station FSM action
1866 static void mpc_action_doxid7(fsm_instance *fsm, int event, void *arg) in mpc_action_doxid7() argument
1891 if (fsm_getstate(ch->fsm) == CH_XID7_PENDING1) { in mpc_action_doxid7()
1892 fsm_newstate(ch->fsm, CH_XID7_PENDING2); in mpc_action_doxid7()
1898 } else if (fsm_getstate(ch->fsm) < CH_XID7_PENDING2) { in mpc_action_doxid7()
1899 fsm_newstate(ch->fsm, CH_XID7_PENDING2); in mpc_action_doxid7()
1908 if (fsm_getstate(ch->fsm) < CH_XID7_PENDING4) { in mpc_action_doxid7()
1909 fsm_newstate(ch->fsm, CH_XID7_PENDING4); in mpc_action_doxid7()
1915 } else if (fsm_getstate(ch->fsm) == CH_XID7_PENDING3) { in mpc_action_doxid7()
1916 fsm_newstate(ch->fsm, CH_XID7_PENDING4); in mpc_action_doxid7()
1925 fsm_event(grp->fsm, MPCG_EVENT_DOIO, ch); in mpc_action_doxid7()
1932 * MPC Group Station FSM action
1935 static void mpc_action_rcvd_xid0(fsm_instance *fsm, int event, void *arg) in mpc_action_rcvd_xid0() argument
1948 if (fsm_getstate(ch->fsm) < CH_XID7_PENDING) in mpc_action_rcvd_xid0()
1949 fsm_newstate(ch->fsm, CH_XID7_PENDING); in mpc_action_rcvd_xid0()
1957 switch (fsm_getstate(grp->fsm)) { in mpc_action_rcvd_xid0()
1959 fsm_newstate(grp->fsm, MPCG_STATE_XID2INITX); in mpc_action_rcvd_xid0()
1963 fsm_newstate(grp->fsm, MPCG_STATE_XID0IOWAIX); in mpc_action_rcvd_xid0()
1968 fsm_newstate(grp->fsm, MPCG_STATE_XID7INITW); in mpc_action_rcvd_xid0()
1970 fsm_event(grp->fsm, MPCG_EVENT_XID2DONE, dev); in mpc_action_rcvd_xid0()
1975 fsm_newstate(grp->fsm, MPCG_STATE_XID7INITI); in mpc_action_rcvd_xid0()
1977 fsm_event(grp->fsm, MPCG_EVENT_XID2DONE, dev); in mpc_action_rcvd_xid0()
1987 fsm_getstate_str(grp->fsm), fsm_getstate_str(ch->fsm)); in mpc_action_rcvd_xid0()
1994 * MPC Group Station FSM action
1997 static void mpc_action_rcvd_xid7(fsm_instance *fsm, int event, void *arg) in mpc_action_rcvd_xid7() argument
2015 switch (fsm_getstate(grp->fsm)) { in mpc_action_rcvd_xid7()
2017 fsm_newstate(grp->fsm, MPCG_STATE_XID7INITZ); in mpc_action_rcvd_xid7()
2021 fsm_newstate(grp->fsm, MPCG_STATE_XID7INITX); in mpc_action_rcvd_xid7()
2032 fsm_newstate(grp->fsm, MPCG_STATE_XID7INITF); in mpc_action_rcvd_xid7()
2035 fsm_event(grp->fsm, MPCG_EVENT_XID7DONE, dev); in mpc_action_rcvd_xid7()
2045 * mpc_action helper of an MPC Group Station FSM action