/* fi An instance of a channel statemachine. event The event, just happened. arg Generic pointer, casted from channel * upon call.  */
static void ctcm_chx_iofatal(fsm_instance *fi, int event, void *arg)
/* fi An instance of a channel statemachine. event The event, just happened. arg Generic pointer, casted from channel * upon call.  */
static void ctcm_chx_iofatal(fsm_instance *fi, int event, void *arg)
{
	struct channel *ch = arg;
	struct net_device *dev = ch->netdev;
	struct ctcm_priv *priv = dev->ml_priv;
	int rd = CHANNEL_DIRECTION(ch->flags);
	fsm_deltimer(&ch->timer);
	CTCM_DBF_TEXT_(ERROR, CTC_DBF_ERROR,
		"%s: %s: %s unrecoverable channel error",
			CTCM_FUNTAIL, ch->id, rd == READ ? "RX" : "TX");
	if (IS_MPC(ch)) {
		priv->stats.tx_dropped++;
		priv->stats.tx_errors++;
	}
	if (rd == READ) {
		fsm_newstate(fi, CTC_STATE_RXERR);
		fsm_event(priv->fsm, DEV_EVENT_RXDOWN, dev);
	} else {
		fsm_newstate(fi, CTC_STATE_TXERR);
		fsm_event(priv->fsm, DEV_EVENT_TXDOWN, dev);
	}
}