linux/drivers/net/ethernet/brocade/bna/bfa_cs.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Linux network driver for QLogic BR-series Converged Network Adapter.
 */
/*
 * Copyright (c) 2005-2014 Brocade Communications Systems, Inc.
 * Copyright (c) 2014-2015 QLogic Corporation
 * All rights reserved
 * www.qlogic.com
 */

/* BFA common services */

#ifndef __BFA_CS_H__
#define __BFA_CS_H__

#include "cna.h"

/* BFA state machine interfaces */

/* For converting from state machine function to state encoding. */
#define BFA_SM_TABLE

BFA_SM_TABLE(iocpf,	bfa_iocpf,	iocpf_event,	bfa_fsm_iocpf_t)
BFA_SM_TABLE(ioc,	bfa_ioc,	ioc_event,	bfa_fsm_ioc_t)
BFA_SM_TABLE(cmdq,	bfa_msgq_cmdq,	cmdq_event,	bfa_fsm_msgq_cmdq_t)
BFA_SM_TABLE(rspq,	bfa_msgq_rspq,	rspq_event,	bfa_fsm_msgq_rspq_t)

BFA_SM_TABLE(ioceth,	bna_ioceth,	bna_ioceth_event, bna_fsm_ioceth_t)
BFA_SM_TABLE(enet,	bna_enet,	bna_enet_event, bna_fsm_enet_t)
BFA_SM_TABLE(ethport,	bna_ethport,	bna_ethport_event, bna_fsm_ethport_t)
BFA_SM_TABLE(tx,	bna_tx,		bna_tx_event,	bna_fsm_tx_t)
BFA_SM_TABLE(rxf,	bna_rxf,	bna_rxf_event, bna_fsm_rxf_t)
BFA_SM_TABLE(rx,	bna_rx,		bna_rx_event,	bna_fsm_rx_t)

#undef BFA_SM_TABLE

#define BFA_SM(_sm)

/* State machine with entry actions. */
bfa_fsm_t;

/* oc - object class eg. bfa_ioc
 * st - state, eg. reset
 * otype - object type, eg. struct bfa_ioc
 * etype - object type, eg. enum ioc_event
 */
#define bfa_fsm_state_decl(oc, st, otype, etype)

#define bfa_fsm_set_state(_fsm, _state)

#define bfa_fsm_send_event(_fsm, _event)
#define bfa_fsm_cmp_state(_fsm, _state)
/* Generic wait counter. */

bfa_wc_resume_t;

struct bfa_wc {};

static inline void
bfa_wc_up(struct bfa_wc *wc)
{}

static inline void
bfa_wc_down(struct bfa_wc *wc)
{}

/* Initialize a waiting counter. */
static inline void
bfa_wc_init(struct bfa_wc *wc, bfa_wc_resume_t wc_resume, void *wc_cbarg)
{}

/* Wait for counter to reach zero */
static inline void
bfa_wc_wait(struct bfa_wc *wc)
{}

#endif /* __BFA_CS_H__ */