Lines Matching full:fsm
45 #include "fsm.h"
180 static void ctcmpc_chx_attn(fsm_instance *fsm, int event, void *arg);
183 static void ctcmpc_chx_send_sweep(fsm_instance *fsm, int event, void *arg);
200 fsm_event(ch->fsm, CTC_EVENT_IO_EBUSY, ch); in ctcm_ccw_check_rc()
205 fsm_event(ch->fsm, CTC_EVENT_IO_ENODEV, ch); in ctcm_ccw_check_rc()
210 fsm_event(ch->fsm, CTC_EVENT_IO_UNKNOWN, ch); in ctcm_ccw_check_rc()
344 fsm_event(priv->fsm, DEV_EVENT_TXUP, ch->netdev); in ctcm_chx_txidle()
461 fsm_event(priv->fsm, DEV_EVENT_TXUP, dev); in chx_firstio()
496 fsm_event(priv->fsm, DEV_EVENT_RXUP, dev); in chx_firstio()
532 fsm_event(priv->fsm, DEV_EVENT_RXUP, dev); in chx_rxidle()
718 fsm_event(priv->fsm, DEV_EVENT_RXDOWN, dev); in ctcm_chx_cleanup()
727 fsm_event(priv->fsm, DEV_EVENT_TXDOWN, dev); in ctcm_chx_cleanup()
813 fsm_event(priv->fsm, DEV_EVENT_RXDOWN, dev); in ctcm_chx_setuperr()
816 fsm_event(priv->fsm, DEV_EVENT_TXDOWN, dev); in ctcm_chx_setuperr()
883 fsm_event(priv->fsm, DEV_EVENT_RXDOWN, dev); in ctcm_chx_rxiniterr()
914 fsm_event(priv->fsm, DEV_EVENT_RXDOWN, dev); in ctcm_chx_rxinitfail()
938 fsm_event(priv->fsm, DEV_EVENT_RXDOWN, dev); in ctcm_chx_rxdisc()
939 fsm_event(priv->fsm, DEV_EVENT_TXDOWN, dev); in ctcm_chx_rxdisc()
943 fsm_newstate(ch2->fsm, CTC_STATE_DTERM); in ctcm_chx_rxdisc()
968 fsm_event(priv->fsm, DEV_EVENT_TXDOWN, dev); in ctcm_chx_txiniterr()
1004 fsm_event(priv->fsm, DEV_EVENT_TXDOWN, dev); in ctcm_chx_txretry()
1005 /* call restart if not MPC or if MPC and mpcg fsm is ready. in ctcm_chx_txretry()
1007 if (!(gptr && (fsm_getstate(gptr->fsm) != MPCG_STATE_READY))) in ctcm_chx_txretry()
1025 fsm_event(priv->fsm, DEV_EVENT_TXDOWN, dev); in ctcm_chx_txretry()
1078 fsm_event(priv->fsm, DEV_EVENT_RXDOWN, dev); in ctcm_chx_iofatal()
1081 fsm_event(priv->fsm, DEV_EVENT_TXDOWN, dev); in ctcm_chx_iofatal()
1338 fsm_event(priv->mpcg->fsm, MPCG_EVENT_INOP, dev); in ctcmpc_chx_txdone()
1411 fsm_event(priv->mpcg->fsm, MPCG_EVENT_INOP, dev); in ctcmpc_chx_rx()
1414 switch (fsm_getstate(grp->fsm)) { in ctcmpc_chx_rx()
1434 switch (fsm_getstate(grp->fsm)) { in ctcmpc_chx_rx()
1487 fsm_getstate(gptr->fsm), ch->protocol); in ctcmpc_chx_firstio()
1503 fsm_event(priv->fsm, DEV_EVENT_TXUP, dev); in ctcmpc_chx_firstio()
1540 fsm_getstate(fi), fsm_getstate(grp->fsm)); in ctcmpc_chx_rxidle()
1545 switch (fsm_getstate(grp->fsm)) { in ctcmpc_chx_rxidle()
1572 fsm_event(priv->fsm, DEV_EVENT_RXUP, dev); in ctcmpc_chx_rxidle()
1578 * ctcmpc channel FSM action
1582 static void ctcmpc_chx_attn(fsm_instance *fsm, int event, void *arg) in ctcmpc_chx_attn() argument
1591 fsm_getstate_str(ch->fsm), fsm_getstate_str(grp->fsm)); in ctcmpc_chx_attn()
1593 switch (fsm_getstate(grp->fsm)) { in ctcmpc_chx_attn()
1598 if (fsm_getstate(ch->fsm) == CH_XID0_PENDING) { in ctcmpc_chx_attn()
1603 fsm_event(grp->fsm, MPCG_EVENT_XID0DO, ch); in ctcmpc_chx_attn()
1605 } else if (fsm_getstate(ch->fsm) < CH_XID7_PENDING1) in ctcmpc_chx_attn()
1607 fsm_newstate(ch->fsm, CH_XID7_PENDING1); in ctcmpc_chx_attn()
1614 if (fsm_getstate(ch->fsm) < CH_XID7_PENDING1) in ctcmpc_chx_attn()
1615 fsm_newstate(ch->fsm, CH_XID7_PENDING1); in ctcmpc_chx_attn()
1621 switch (fsm_getstate(ch->fsm)) { in ctcmpc_chx_attn()
1623 fsm_newstate(ch->fsm, CH_XID7_PENDING1); in ctcmpc_chx_attn()
1626 fsm_newstate(ch->fsm, CH_XID7_PENDING3); in ctcmpc_chx_attn()
1629 fsm_event(grp->fsm, MPCG_EVENT_XID7DONE, dev); in ctcmpc_chx_attn()
1637 * ctcmpc channel FSM action
1641 static void ctcmpc_chx_attnbusy(fsm_instance *fsm, int event, void *arg) in ctcmpc_chx_attnbusy() argument
1650 fsm_getstate_str(ch->fsm), fsm_getstate_str(grp->fsm)); in ctcmpc_chx_attnbusy()
1654 switch (fsm_getstate(grp->fsm)) { in ctcmpc_chx_attnbusy()
1660 fsm_newstate(grp->fsm, MPCG_STATE_XID2INITW); in ctcmpc_chx_attnbusy()
1677 if (fsm_getstate(ch->fsm) == CH_XID0_INPROGRESS) { in ctcmpc_chx_attnbusy()
1678 fsm_newstate(ch->fsm, CH_XID0_PENDING) ; in ctcmpc_chx_attnbusy()
1682 fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); in ctcmpc_chx_attnbusy()
1702 fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); in ctcmpc_chx_attnbusy()
1712 fsm_event(grp->fsm, MPCG_EVENT_XID0DO, ch); in ctcmpc_chx_attnbusy()
1723 * ctcmpc channel FSM action
1727 static void ctcmpc_chx_resend(fsm_instance *fsm, int event, void *arg) in ctcmpc_chx_resend() argument
1734 fsm_event(grp->fsm, MPCG_EVENT_XID0DO, ch); in ctcmpc_chx_resend()
1739 * ctcmpc channel FSM action
1743 static void ctcmpc_chx_send_sweep(fsm_instance *fsm, int event, void *arg) in ctcmpc_chx_send_sweep() argument
1767 if (fsm_getstate(wch->fsm) != CTC_STATE_TXIDLE) { in ctcmpc_chx_send_sweep()
1782 fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); in ctcmpc_chx_send_sweep()
1809 fsm_newstate(wch->fsm, CTC_STATE_TX); in ctcmpc_chx_send_sweep()
2067 fsm_event(ch->fsm, CTC_EVENT_START, ch); in dev_action_start()
2089 fsm_event(ch->fsm, CTC_EVENT_STOP, ch); in dev_action_stop()
2095 fsm_newstate(priv->mpcg->fsm, MPCG_STATE_RESET); in dev_action_stop()
2114 fsm_event(priv->fsm, DEV_EVENT_STOP, dev); in dev_action_restart()
2116 fsm_newstate(priv->mpcg->fsm, MPCG_STATE_RESET); in dev_action_restart()