linux/drivers/scsi/bfa/bfa_cs.h

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

/*
 *  bfa_cs.h BFA common services
 */

#ifndef __BFA_CS_H__
#define __BFA_CS_H__

#include "bfad_drv.h"

/*
 * BFA TRC
 */

#ifndef BFA_TRC_MAX
#define BFA_TRC_MAX
#endif

#define BFA_TRC_TS(_trcm)

#ifndef BFA_TRC_TS
#define BFA_TRC_TS
#endif

struct bfa_trc_s {};

struct bfa_trc_mod_s {};

enum {};
#define BFA_TRC_MOD_SH
#define BFA_TRC_MOD(__mod)

/*
 * Define a new tracing file (module). Module should match one defined above.
 */
#define BFA_TRC_FILE(__mod, __submod)


#define bfa_trc32(_trcp, _data)
#define bfa_trc(_trcp, _data)

static inline void
bfa_trc_init(struct bfa_trc_mod_s *trcm)
{}

static inline void
bfa_trc_stop(struct bfa_trc_mod_s *trcm)
{}

void
__bfa_trc(struct bfa_trc_mod_s *trcm, int fileno, int line, u64 data);

void
__bfa_trc32(struct bfa_trc_mod_s *trcm, int fileno, int line, u32 data);

#define bfa_sm_fault(__mod, __event)

/* BFA queue definitions */
#define bfa_q_first(_q)
#define bfa_q_next(_qe)
#define bfa_q_prev(_qe)

/*
 * bfa_q_qe_init - to initialize a queue element
 */
#define bfa_q_qe_init(_qe)

/*
 * bfa_q_deq - dequeue an element from head of the queue
 */
#define bfa_q_deq(_q, _qe)

/*
 * bfa_q_deq_tail - dequeue an element from tail of the queue
 */
#define bfa_q_deq_tail(_q, _qe)

static inline int
bfa_q_is_on_q_func(struct list_head *q, struct list_head *qe)
{}

#define bfa_q_is_on_q(_q, _qe)

/*
 * @ BFA state machine interfaces
 */

bfa_sm_t;

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

#define bfa_sm_set_state(_sm, _state)
#define bfa_sm_send_event(_sm, _event)
#define bfa_sm_get_state(_sm)
#define bfa_sm_cmp_state(_sm, _state)

/*
 * For converting from state machine function to state encoding.
 */
struct bfa_sm_table_s {};
#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_s
 * 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_get_state(_fsm)
#define bfa_fsm_cmp_state(_fsm, _state)

/*
 * @ Generic wait counter.
 */

bfa_wc_resume_t;

struct bfa_wc_s {};

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

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

/*
 * Initialize a waiting counter.
 */
static inline void
bfa_wc_init(struct bfa_wc_s *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_s *wc)
{}

static inline void
wwn2str(char *wwn_str, u64 wwn)
{}

static inline void
fcid2str(char *fcid_str, u32 fcid)
{}

#define bfa_swap_3b(_x)

#ifndef __BIG_ENDIAN
#define bfa_hton3b(_x)
#else
#define bfa_hton3b
#endif

#define bfa_ntoh3b(_x)

#endif /* __BFA_CS_H__ */