linux/drivers/scsi/bfa/bfa_svc.c

// 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.
 */

#include "bfad_drv.h"
#include "bfad_im.h"
#include "bfa_plog.h"
#include "bfa_cs.h"
#include "bfa_modules.h"

BFA_TRC_FILE();

/*
 * LPS related definitions
 */
#define BFA_LPS_MIN_LPORTS
#define BFA_LPS_MAX_LPORTS

/*
 * Maximum Vports supported per physical port or vf.
 */
#define BFA_LPS_MAX_VPORTS_SUPP_CB
#define BFA_LPS_MAX_VPORTS_SUPP_CT


/*
 * FC PORT related definitions
 */
/*
 * The port is considered disabled if corresponding physical port or IOC are
 * disabled explicitly
 */
#define BFA_PORT_IS_DISABLED(bfa)

/*
 * RPORT related definitions
 */
#define bfa_rport_offline_cb(__rp)

#define bfa_rport_online_cb(__rp)

/*
 * forward declarations FCXP related functions
 */
static void	__bfa_fcxp_send_cbfn(void *cbarg, bfa_boolean_t complete);
static void	hal_fcxp_rx_plog(struct bfa_s *bfa, struct bfa_fcxp_s *fcxp,
				struct bfi_fcxp_send_rsp_s *fcxp_rsp);
static void	hal_fcxp_tx_plog(struct bfa_s *bfa, u32 reqlen,
				struct bfa_fcxp_s *fcxp, struct fchs_s *fchs);
static void	bfa_fcxp_qresume(void *cbarg);
static void	bfa_fcxp_queue(struct bfa_fcxp_s *fcxp,
				struct bfi_fcxp_send_req_s *send_req);

/*
 * forward declarations for LPS functions
 */
static void bfa_lps_login_rsp(struct bfa_s *bfa,
				struct bfi_lps_login_rsp_s *rsp);
static void bfa_lps_no_res(struct bfa_lps_s *first_lps, u8 count);
static void bfa_lps_logout_rsp(struct bfa_s *bfa,
				struct bfi_lps_logout_rsp_s *rsp);
static void bfa_lps_reqq_resume(void *lps_arg);
static void bfa_lps_free(struct bfa_lps_s *lps);
static void bfa_lps_send_login(struct bfa_lps_s *lps);
static void bfa_lps_send_logout(struct bfa_lps_s *lps);
static void bfa_lps_send_set_n2n_pid(struct bfa_lps_s *lps);
static void bfa_lps_login_comp(struct bfa_lps_s *lps);
static void bfa_lps_logout_comp(struct bfa_lps_s *lps);
static void bfa_lps_cvl_event(struct bfa_lps_s *lps);

/*
 * forward declaration for LPS state machine
 */
static void bfa_lps_sm_init(struct bfa_lps_s *lps, enum bfa_lps_event event);
static void bfa_lps_sm_login(struct bfa_lps_s *lps, enum bfa_lps_event event);
static void bfa_lps_sm_loginwait(struct bfa_lps_s *lps, enum bfa_lps_event
					event);
static void bfa_lps_sm_online(struct bfa_lps_s *lps, enum bfa_lps_event event);
static void bfa_lps_sm_online_n2n_pid_wait(struct bfa_lps_s *lps,
					enum bfa_lps_event event);
static void bfa_lps_sm_logout(struct bfa_lps_s *lps, enum bfa_lps_event event);
static void bfa_lps_sm_logowait(struct bfa_lps_s *lps, enum bfa_lps_event
					event);

/*
 * forward declaration for FC Port functions
 */
static bfa_boolean_t bfa_fcport_send_enable(struct bfa_fcport_s *fcport);
static bfa_boolean_t bfa_fcport_send_disable(struct bfa_fcport_s *fcport);
static void bfa_fcport_update_linkinfo(struct bfa_fcport_s *fcport);
static void bfa_fcport_reset_linkinfo(struct bfa_fcport_s *fcport);
static void bfa_fcport_set_wwns(struct bfa_fcport_s *fcport);
static void __bfa_cb_fcport_event(void *cbarg, bfa_boolean_t complete);
static void bfa_fcport_scn(struct bfa_fcport_s *fcport,
			enum bfa_port_linkstate event, bfa_boolean_t trunk);
static void bfa_fcport_queue_cb(struct bfa_fcport_ln_s *ln,
				enum bfa_port_linkstate event);
static void __bfa_cb_fcport_stats_clr(void *cbarg, bfa_boolean_t complete);
static void bfa_fcport_stats_get_timeout(void *cbarg);
static void bfa_fcport_stats_clr_timeout(void *cbarg);
static void bfa_trunk_iocdisable(struct bfa_s *bfa);

/*
 * forward declaration for FC PORT state machine
 */
static void     bfa_fcport_sm_uninit(struct bfa_fcport_s *fcport,
					enum bfa_fcport_sm_event event);
static void     bfa_fcport_sm_enabling_qwait(struct bfa_fcport_s *fcport,
					enum bfa_fcport_sm_event event);
static void     bfa_fcport_sm_enabling(struct bfa_fcport_s *fcport,
					enum bfa_fcport_sm_event event);
static void     bfa_fcport_sm_linkdown(struct bfa_fcport_s *fcport,
					enum bfa_fcport_sm_event event);
static void     bfa_fcport_sm_linkup(struct bfa_fcport_s *fcport,
					enum bfa_fcport_sm_event event);
static void     bfa_fcport_sm_disabling(struct bfa_fcport_s *fcport,
					enum bfa_fcport_sm_event event);
static void     bfa_fcport_sm_disabling_qwait(struct bfa_fcport_s *fcport,
					enum bfa_fcport_sm_event event);
static void     bfa_fcport_sm_toggling_qwait(struct bfa_fcport_s *fcport,
					enum bfa_fcport_sm_event event);
static void     bfa_fcport_sm_disabled(struct bfa_fcport_s *fcport,
					enum bfa_fcport_sm_event event);
static void     bfa_fcport_sm_stopped(struct bfa_fcport_s *fcport,
					enum bfa_fcport_sm_event event);
static void     bfa_fcport_sm_iocdown(struct bfa_fcport_s *fcport,
					enum bfa_fcport_sm_event event);
static void     bfa_fcport_sm_iocfail(struct bfa_fcport_s *fcport,
					enum bfa_fcport_sm_event event);
static void	bfa_fcport_sm_dport(struct bfa_fcport_s *fcport,
					enum bfa_fcport_sm_event event);
static void     bfa_fcport_sm_ddport(struct bfa_fcport_s *fcport,
					enum bfa_fcport_sm_event event);
static void	bfa_fcport_sm_faa_misconfig(struct bfa_fcport_s *fcport,
					enum bfa_fcport_sm_event event);

static void     bfa_fcport_ln_sm_dn(struct bfa_fcport_ln_s *ln,
					enum bfa_fcport_ln_sm_event event);
static void     bfa_fcport_ln_sm_dn_nf(struct bfa_fcport_ln_s *ln,
					enum bfa_fcport_ln_sm_event event);
static void     bfa_fcport_ln_sm_dn_up_nf(struct bfa_fcport_ln_s *ln,
					enum bfa_fcport_ln_sm_event event);
static void     bfa_fcport_ln_sm_up(struct bfa_fcport_ln_s *ln,
					enum bfa_fcport_ln_sm_event event);
static void     bfa_fcport_ln_sm_up_nf(struct bfa_fcport_ln_s *ln,
					enum bfa_fcport_ln_sm_event event);
static void     bfa_fcport_ln_sm_up_dn_nf(struct bfa_fcport_ln_s *ln,
					enum bfa_fcport_ln_sm_event event);
static void     bfa_fcport_ln_sm_up_dn_up_nf(struct bfa_fcport_ln_s *ln,
					enum bfa_fcport_ln_sm_event event);

struct bfa_fcport_sm_table_s {};

static inline enum bfa_port_states
bfa_fcport_sm_to_state(struct bfa_fcport_sm_table_s *smt, bfa_fcport_sm_t sm)
{}

static struct bfa_fcport_sm_table_s hal_port_sm_table[] =;


/*
 * forward declaration for RPORT related functions
 */
static struct bfa_rport_s *bfa_rport_alloc(struct bfa_rport_mod_s *rp_mod);
static void		bfa_rport_free(struct bfa_rport_s *rport);
static bfa_boolean_t	bfa_rport_send_fwcreate(struct bfa_rport_s *rp);
static bfa_boolean_t	bfa_rport_send_fwdelete(struct bfa_rport_s *rp);
static bfa_boolean_t	bfa_rport_send_fwspeed(struct bfa_rport_s *rp);
static void		__bfa_cb_rport_online(void *cbarg,
						bfa_boolean_t complete);
static void		__bfa_cb_rport_offline(void *cbarg,
						bfa_boolean_t complete);

/*
 * forward declaration for RPORT state machine
 */
static void     bfa_rport_sm_uninit(struct bfa_rport_s *rp,
					enum bfa_rport_event event);
static void     bfa_rport_sm_created(struct bfa_rport_s *rp,
					enum bfa_rport_event event);
static void     bfa_rport_sm_fwcreate(struct bfa_rport_s *rp,
					enum bfa_rport_event event);
static void     bfa_rport_sm_online(struct bfa_rport_s *rp,
					enum bfa_rport_event event);
static void     bfa_rport_sm_fwdelete(struct bfa_rport_s *rp,
					enum bfa_rport_event event);
static void     bfa_rport_sm_offline(struct bfa_rport_s *rp,
					enum bfa_rport_event event);
static void     bfa_rport_sm_deleting(struct bfa_rport_s *rp,
					enum bfa_rport_event event);
static void     bfa_rport_sm_offline_pending(struct bfa_rport_s *rp,
					enum bfa_rport_event event);
static void     bfa_rport_sm_delete_pending(struct bfa_rport_s *rp,
					enum bfa_rport_event event);
static void     bfa_rport_sm_iocdisable(struct bfa_rport_s *rp,
					enum bfa_rport_event event);
static void     bfa_rport_sm_fwcreate_qfull(struct bfa_rport_s *rp,
					enum bfa_rport_event event);
static void     bfa_rport_sm_fwdelete_qfull(struct bfa_rport_s *rp,
					enum bfa_rport_event event);
static void     bfa_rport_sm_deleting_qfull(struct bfa_rport_s *rp,
					enum bfa_rport_event event);

/*
 * PLOG related definitions
 */
static int
plkd_validate_logrec(struct bfa_plog_rec_s *pl_rec)
{}

static void
bfa_plog_add(struct bfa_plog_s *plog, struct bfa_plog_rec_s *pl_rec)
{}

void
bfa_plog_init(struct bfa_plog_s *plog)
{}

void
bfa_plog_str(struct bfa_plog_s *plog, enum bfa_plog_mid mid,
		enum bfa_plog_eid event,
		u16 misc, char *log_str)
{}

void
bfa_plog_intarr(struct bfa_plog_s *plog, enum bfa_plog_mid mid,
		enum bfa_plog_eid event,
		u16 misc, u32 *intarr, u32 num_ints)
{}

void
bfa_plog_fchdr(struct bfa_plog_s *plog, enum bfa_plog_mid mid,
			enum bfa_plog_eid event,
			u16 misc, struct fchs_s *fchdr)
{}

void
bfa_plog_fchdr_and_pl(struct bfa_plog_s *plog, enum bfa_plog_mid mid,
		      enum bfa_plog_eid event, u16 misc, struct fchs_s *fchdr,
		      u32 pld_w0)
{}


/*
 *  fcxp_pvt BFA FCXP private functions
 */

static void
claim_fcxps_mem(struct bfa_fcxp_mod_s *mod)
{}

void
bfa_fcxp_meminfo(struct bfa_iocfc_cfg_s *cfg, struct bfa_meminfo_s *minfo,
		struct bfa_s *bfa)
{}

void
bfa_fcxp_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg,
		struct bfa_pcidev_s *pcidev)
{}

void
bfa_fcxp_iocdisable(struct bfa_s *bfa)
{}

static struct bfa_fcxp_s *
bfa_fcxp_get(struct bfa_fcxp_mod_s *fm, bfa_boolean_t req)
{}

static void
bfa_fcxp_init_reqrsp(struct bfa_fcxp_s *fcxp,
	       struct bfa_s *bfa,
	       u8 *use_ibuf,
	       u32 *nr_sgles,
	       bfa_fcxp_get_sgaddr_t *r_sga_cbfn,
	       bfa_fcxp_get_sglen_t *r_sglen_cbfn,
	       struct list_head *r_sgpg_q,
	       int n_sgles,
	       bfa_fcxp_get_sgaddr_t sga_cbfn,
	       bfa_fcxp_get_sglen_t sglen_cbfn)
{}

static void
bfa_fcxp_init(struct bfa_fcxp_s *fcxp,
	       void *caller, struct bfa_s *bfa, int nreq_sgles,
	       int nrsp_sgles, bfa_fcxp_get_sgaddr_t req_sga_cbfn,
	       bfa_fcxp_get_sglen_t req_sglen_cbfn,
	       bfa_fcxp_get_sgaddr_t rsp_sga_cbfn,
	       bfa_fcxp_get_sglen_t rsp_sglen_cbfn)
{}

static void
bfa_fcxp_put(struct bfa_fcxp_s *fcxp)
{}

static void
bfa_fcxp_null_comp(void *bfad_fcxp, struct bfa_fcxp_s *fcxp, void *cbarg,
		   bfa_status_t req_status, u32 rsp_len,
		   u32 resid_len, struct fchs_s *rsp_fchs)
{}

static void
__bfa_fcxp_send_cbfn(void *cbarg, bfa_boolean_t complete)
{}

static void
hal_fcxp_send_comp(struct bfa_s *bfa, struct bfi_fcxp_send_rsp_s *fcxp_rsp)
{}

static void
hal_fcxp_tx_plog(struct bfa_s *bfa, u32 reqlen, struct bfa_fcxp_s *fcxp,
		 struct fchs_s *fchs)
{}

static void
hal_fcxp_rx_plog(struct bfa_s *bfa, struct bfa_fcxp_s *fcxp,
		 struct bfi_fcxp_send_rsp_s *fcxp_rsp)
{}

/*
 * Handler to resume sending fcxp when space in available in cpe queue.
 */
static void
bfa_fcxp_qresume(void *cbarg)
{}

/*
 * Queue fcxp send request to foimrware.
 */
static void
bfa_fcxp_queue(struct bfa_fcxp_s *fcxp, struct bfi_fcxp_send_req_s *send_req)
{}

/*
 * Allocate an FCXP instance to send a response or to send a request
 * that has a response. Request/response buffers are allocated by caller.
 *
 * @param[in]	bfa		BFA bfa instance
 * @param[in]	nreq_sgles	Number of SG elements required for request
 *				buffer. 0, if fcxp internal buffers are	used.
 *				Use bfa_fcxp_get_reqbuf() to get the
 *				internal req buffer.
 * @param[in]	req_sgles	SG elements describing request buffer. Will be
 *				copied in by BFA and hence can be freed on
 *				return from this function.
 * @param[in]	get_req_sga	function ptr to be called to get a request SG
 *				Address (given the sge index).
 * @param[in]	get_req_sglen	function ptr to be called to get a request SG
 *				len (given the sge index).
 * @param[in]	get_rsp_sga	function ptr to be called to get a response SG
 *				Address (given the sge index).
 * @param[in]	get_rsp_sglen	function ptr to be called to get a response SG
 *				len (given the sge index).
 * @param[in]	req		Allocated FCXP is used to send req or rsp?
 *				request - BFA_TRUE, response - BFA_FALSE
 *
 * @return FCXP instance. NULL on failure.
 */
struct bfa_fcxp_s *
bfa_fcxp_req_rsp_alloc(void *caller, struct bfa_s *bfa, int nreq_sgles,
		int nrsp_sgles, bfa_fcxp_get_sgaddr_t req_sga_cbfn,
		bfa_fcxp_get_sglen_t req_sglen_cbfn,
		bfa_fcxp_get_sgaddr_t rsp_sga_cbfn,
		bfa_fcxp_get_sglen_t rsp_sglen_cbfn, bfa_boolean_t req)
{}

/*
 * Get the internal request buffer pointer
 *
 * @param[in]	fcxp	BFA fcxp pointer
 *
 * @return		pointer to the internal request buffer
 */
void *
bfa_fcxp_get_reqbuf(struct bfa_fcxp_s *fcxp)
{}

u32
bfa_fcxp_get_reqbufsz(struct bfa_fcxp_s *fcxp)
{}

/*
 * Get the internal response buffer pointer
 *
 * @param[in]	fcxp	BFA fcxp pointer
 *
 * @return		pointer to the internal request buffer
 */
void *
bfa_fcxp_get_rspbuf(struct bfa_fcxp_s *fcxp)
{}

/*
 * Free the BFA FCXP
 *
 * @param[in]	fcxp			BFA fcxp pointer
 *
 * @return		void
 */
void
bfa_fcxp_free(struct bfa_fcxp_s *fcxp)
{}

/*
 * Send a FCXP request
 *
 * @param[in]	fcxp	BFA fcxp pointer
 * @param[in]	rport	BFA rport pointer. Could be left NULL for WKA rports
 * @param[in]	vf_id	virtual Fabric ID
 * @param[in]	lp_tag	lport tag
 * @param[in]	cts	use Continuous sequence
 * @param[in]	cos	fc Class of Service
 * @param[in]	reqlen	request length, does not include FCHS length
 * @param[in]	fchs	fc Header Pointer. The header content will be copied
 *			in by BFA.
 *
 * @param[in]	cbfn	call back function to be called on receiving
 *								the response
 * @param[in]	cbarg	arg for cbfn
 * @param[in]	rsp_timeout
 *			response timeout
 *
 * @return		bfa_status_t
 */
void
bfa_fcxp_send(struct bfa_fcxp_s *fcxp, struct bfa_rport_s *rport,
	      u16 vf_id, u8 lp_tag, bfa_boolean_t cts, enum fc_cos cos,
	      u32 reqlen, struct fchs_s *fchs, bfa_cb_fcxp_send_t cbfn,
	      void *cbarg, u32 rsp_maxlen, u8 rsp_timeout)
{}

/*
 * Abort a BFA FCXP
 *
 * @param[in]	fcxp	BFA fcxp pointer
 *
 * @return		void
 */
bfa_status_t
bfa_fcxp_abort(struct bfa_fcxp_s *fcxp)
{}

void
bfa_fcxp_req_rsp_alloc_wait(struct bfa_s *bfa, struct bfa_fcxp_wqe_s *wqe,
	       bfa_fcxp_alloc_cbfn_t alloc_cbfn, void *alloc_cbarg,
	       void *caller, int nreq_sgles,
	       int nrsp_sgles, bfa_fcxp_get_sgaddr_t req_sga_cbfn,
	       bfa_fcxp_get_sglen_t req_sglen_cbfn,
	       bfa_fcxp_get_sgaddr_t rsp_sga_cbfn,
	       bfa_fcxp_get_sglen_t rsp_sglen_cbfn, bfa_boolean_t req)
{}

void
bfa_fcxp_walloc_cancel(struct bfa_s *bfa, struct bfa_fcxp_wqe_s *wqe)
{}

void
bfa_fcxp_discard(struct bfa_fcxp_s *fcxp)
{}

void
bfa_fcxp_isr(struct bfa_s *bfa, struct bfi_msg_s *msg)
{}

u32
bfa_fcxp_get_maxrsp(struct bfa_s *bfa)
{}

void
bfa_fcxp_res_recfg(struct bfa_s *bfa, u16 num_fcxp_fw)
{}

/*
 *  BFA LPS state machine functions
 */

/*
 * Init state -- no login
 */
static void
bfa_lps_sm_init(struct bfa_lps_s *lps, enum bfa_lps_event event)
{}

/*
 * login is in progress -- awaiting response from firmware
 */
static void
bfa_lps_sm_login(struct bfa_lps_s *lps, enum bfa_lps_event event)
{}

/*
 * login pending - awaiting space in request queue
 */
static void
bfa_lps_sm_loginwait(struct bfa_lps_s *lps, enum bfa_lps_event event)
{}

/*
 * login complete
 */
static void
bfa_lps_sm_online(struct bfa_lps_s *lps, enum bfa_lps_event event)
{}

/*
 * login complete
 */
static void
bfa_lps_sm_online_n2n_pid_wait(struct bfa_lps_s *lps, enum bfa_lps_event event)
{}

/*
 * logout in progress - awaiting firmware response
 */
static void
bfa_lps_sm_logout(struct bfa_lps_s *lps, enum bfa_lps_event event)
{}

/*
 * logout pending -- awaiting space in request queue
 */
static void
bfa_lps_sm_logowait(struct bfa_lps_s *lps, enum bfa_lps_event event)
{}



/*
 *  lps_pvt BFA LPS private functions
 */

/*
 * return memory requirement
 */
void
bfa_lps_meminfo(struct bfa_iocfc_cfg_s *cfg, struct bfa_meminfo_s *minfo,
		struct bfa_s *bfa)
{}

/*
 * bfa module attach at initialization time
 */
void
bfa_lps_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg,
	struct bfa_pcidev_s *pcidev)
{}

/*
 * IOC in disabled state -- consider all lps offline
 */
void
bfa_lps_iocdisable(struct bfa_s *bfa)
{}

/*
 * Firmware login response
 */
static void
bfa_lps_login_rsp(struct bfa_s *bfa, struct bfi_lps_login_rsp_s *rsp)
{}

static void
bfa_lps_no_res(struct bfa_lps_s *first_lps, u8 count)
{}

/*
 * Firmware logout response
 */
static void
bfa_lps_logout_rsp(struct bfa_s *bfa, struct bfi_lps_logout_rsp_s *rsp)
{}

/*
 * Firmware received a Clear virtual link request (for FCoE)
 */
static void
bfa_lps_rx_cvl_event(struct bfa_s *bfa, struct bfi_lps_cvl_event_s *cvl)
{}

/*
 * Space is available in request queue, resume queueing request to firmware.
 */
static void
bfa_lps_reqq_resume(void *lps_arg)
{}

/*
 * lps is freed -- triggered by vport delete
 */
static void
bfa_lps_free(struct bfa_lps_s *lps)
{}

/*
 * send login request to firmware
 */
static void
bfa_lps_send_login(struct bfa_lps_s *lps)
{}

/*
 * send logout request to firmware
 */
static void
bfa_lps_send_logout(struct bfa_lps_s *lps)
{}

/*
 * send n2n pid set request to firmware
 */
static void
bfa_lps_send_set_n2n_pid(struct bfa_lps_s *lps)
{}

/*
 * Indirect login completion handler for non-fcs
 */
static void
bfa_lps_login_comp_cb(void *arg, bfa_boolean_t complete)
{}

/*
 * Login completion handler -- direct call for fcs, queue for others
 */
static void
bfa_lps_login_comp(struct bfa_lps_s *lps)
{}

/*
 * Indirect logout completion handler for non-fcs
 */
static void
bfa_lps_logout_comp_cb(void *arg, bfa_boolean_t complete)
{}

/*
 * Logout completion handler -- direct call for fcs, queue for others
 */
static void
bfa_lps_logout_comp(struct bfa_lps_s *lps)
{}

/*
 * Clear virtual link completion handler for non-fcs
 */
static void
bfa_lps_cvl_event_cb(void *arg, bfa_boolean_t complete)
{}

/*
 * Received Clear virtual link event --direct call for fcs,
 * queue for others
 */
static void
bfa_lps_cvl_event(struct bfa_lps_s *lps)
{}



/*
 *  lps_public BFA LPS public functions
 */

u32
bfa_lps_get_max_vport(struct bfa_s *bfa)
{}

/*
 * Allocate a lport srvice tag.
 */
struct bfa_lps_s  *
bfa_lps_alloc(struct bfa_s *bfa)
{}

/*
 * Free lport service tag. This can be called anytime after an alloc.
 * No need to wait for any pending login/logout completions.
 */
void
bfa_lps_delete(struct bfa_lps_s *lps)
{}

/*
 * Initiate a lport login.
 */
void
bfa_lps_flogi(struct bfa_lps_s *lps, void *uarg, u8 alpa, u16 pdusz,
	wwn_t pwwn, wwn_t nwwn, bfa_boolean_t auth_en)
{}

/*
 * Initiate a lport fdisc login.
 */
void
bfa_lps_fdisc(struct bfa_lps_s *lps, void *uarg, u16 pdusz, wwn_t pwwn,
	wwn_t nwwn)
{}


/*
 * Initiate a lport FDSIC logout.
 */
void
bfa_lps_fdisclogo(struct bfa_lps_s *lps)
{}

u8
bfa_lps_get_fwtag(struct bfa_s *bfa, u8 lp_tag)
{}

/*
 * Return lport services tag given the pid
 */
u8
bfa_lps_get_tag_from_pid(struct bfa_s *bfa, u32 pid)
{}


/*
 * return port id assigned to the base lport
 */
u32
bfa_lps_get_base_pid(struct bfa_s *bfa)
{}

/*
 * Set PID in case of n2n (which is assigned during PLOGI)
 */
void
bfa_lps_set_n2n_pid(struct bfa_lps_s *lps, uint32_t n2n_pid)
{}

/*
 * LPS firmware message class handler.
 */
void
bfa_lps_isr(struct bfa_s *bfa, struct bfi_msg_s *m)
{}

static void
bfa_fcport_aen_post(struct bfa_fcport_s *fcport, enum bfa_port_aen_event event)
{}

/*
 * FC PORT state machine functions
 */
static void
bfa_fcport_sm_uninit(struct bfa_fcport_s *fcport,
			enum bfa_fcport_sm_event event)
{}

static void
bfa_fcport_sm_enabling_qwait(struct bfa_fcport_s *fcport,
				enum bfa_fcport_sm_event event)
{}

static void
bfa_fcport_sm_enabling(struct bfa_fcport_s *fcport,
						enum bfa_fcport_sm_event event)
{}

static void
bfa_fcport_sm_linkdown(struct bfa_fcport_s *fcport,
						enum bfa_fcport_sm_event event)
{}

static void
bfa_fcport_sm_linkup(struct bfa_fcport_s *fcport,
	enum bfa_fcport_sm_event event)
{}

static void
bfa_fcport_sm_disabling_qwait(struct bfa_fcport_s *fcport,
				 enum bfa_fcport_sm_event event)
{}

static void
bfa_fcport_sm_toggling_qwait(struct bfa_fcport_s *fcport,
				 enum bfa_fcport_sm_event event)
{}

static void
bfa_fcport_sm_disabling(struct bfa_fcport_s *fcport,
						enum bfa_fcport_sm_event event)
{}

static void
bfa_fcport_sm_disabled(struct bfa_fcport_s *fcport,
						enum bfa_fcport_sm_event event)
{}

static void
bfa_fcport_sm_stopped(struct bfa_fcport_s *fcport,
			 enum bfa_fcport_sm_event event)
{}

/*
 * Port is enabled. IOC is down/failed.
 */
static void
bfa_fcport_sm_iocdown(struct bfa_fcport_s *fcport,
			 enum bfa_fcport_sm_event event)
{}

/*
 * Port is disabled. IOC is down/failed.
 */
static void
bfa_fcport_sm_iocfail(struct bfa_fcport_s *fcport,
			 enum bfa_fcport_sm_event event)
{}

static void
bfa_fcport_sm_dport(struct bfa_fcport_s *fcport, enum bfa_fcport_sm_event event)
{}

static void
bfa_fcport_sm_ddport(struct bfa_fcport_s *fcport,
			enum bfa_fcport_sm_event event)
{}

static void
bfa_fcport_sm_faa_misconfig(struct bfa_fcport_s *fcport,
			    enum bfa_fcport_sm_event event)
{}

/*
 * Link state is down
 */
static void
bfa_fcport_ln_sm_dn(struct bfa_fcport_ln_s *ln,
		enum bfa_fcport_ln_sm_event event)
{}

/*
 * Link state is waiting for down notification
 */
static void
bfa_fcport_ln_sm_dn_nf(struct bfa_fcport_ln_s *ln,
		enum bfa_fcport_ln_sm_event event)
{}

/*
 * Link state is waiting for down notification and there is a pending up
 */
static void
bfa_fcport_ln_sm_dn_up_nf(struct bfa_fcport_ln_s *ln,
		enum bfa_fcport_ln_sm_event event)
{}

/*
 * Link state is up
 */
static void
bfa_fcport_ln_sm_up(struct bfa_fcport_ln_s *ln,
		enum bfa_fcport_ln_sm_event event)
{}

/*
 * Link state is waiting for up notification
 */
static void
bfa_fcport_ln_sm_up_nf(struct bfa_fcport_ln_s *ln,
		enum bfa_fcport_ln_sm_event event)
{}

/*
 * Link state is waiting for up notification and there is a pending down
 */
static void
bfa_fcport_ln_sm_up_dn_nf(struct bfa_fcport_ln_s *ln,
		enum bfa_fcport_ln_sm_event event)
{}

/*
 * Link state is waiting for up notification and there are pending down and up
 */
static void
bfa_fcport_ln_sm_up_dn_up_nf(struct bfa_fcport_ln_s *ln,
			enum bfa_fcport_ln_sm_event event)
{}

static void
__bfa_cb_fcport_event(void *cbarg, bfa_boolean_t complete)
{}

/*
 * Send SCN notification to upper layers.
 * trunk - false if caller is fcport to ignore fcport event in trunked mode
 */
static void
bfa_fcport_scn(struct bfa_fcport_s *fcport, enum bfa_port_linkstate event,
	bfa_boolean_t trunk)
{}

static void
bfa_fcport_queue_cb(struct bfa_fcport_ln_s *ln, enum bfa_port_linkstate event)
{}

#define FCPORT_STATS_DMA_SZ

void
bfa_fcport_meminfo(struct bfa_iocfc_cfg_s *cfg, struct bfa_meminfo_s *minfo,
		   struct bfa_s *bfa)
{}

static void
bfa_fcport_qresume(void *cbarg)
{}

static void
bfa_fcport_mem_claim(struct bfa_fcport_s *fcport)
{}

/*
 * Memory initialization.
 */
void
bfa_fcport_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg,
		struct bfa_pcidev_s *pcidev)
{}

void
bfa_fcport_start(struct bfa_s *bfa)
{}

/*
 * Called when IOC failure is detected.
 */
void
bfa_fcport_iocdisable(struct bfa_s *bfa)
{}

/*
 * Update loop info in fcport for SCN online
 */
static void
bfa_fcport_update_loop_info(struct bfa_fcport_s *fcport,
			struct bfa_fcport_loop_info_s *loop_info)
{}

static void
bfa_fcport_update_linkinfo(struct bfa_fcport_s *fcport)
{}

static void
bfa_fcport_reset_linkinfo(struct bfa_fcport_s *fcport)
{}

/*
 * Send port enable message to firmware.
 */
static bfa_boolean_t
bfa_fcport_send_enable(struct bfa_fcport_s *fcport)
{}

/*
 * Send port disable message to firmware.
 */
static	bfa_boolean_t
bfa_fcport_send_disable(struct bfa_fcport_s *fcport)
{}

static void
bfa_fcport_set_wwns(struct bfa_fcport_s *fcport)
{}

static void
bfa_fcport_qos_stats_swap(struct bfa_qos_stats_s *d,
	struct bfa_qos_stats_s *s)
{}

static void
bfa_fcport_fcoe_stats_swap(struct bfa_fcoe_stats_s *d,
	struct bfa_fcoe_stats_s *s)
{}

static void
__bfa_cb_fcport_stats_get(void *cbarg, bfa_boolean_t complete)
{}

static void
bfa_fcport_stats_get_timeout(void *cbarg)
{}

static void
bfa_fcport_send_stats_get(void *cbarg)
{}

static void
__bfa_cb_fcport_stats_clr(void *cbarg, bfa_boolean_t complete)
{}

static void
bfa_fcport_stats_clr_timeout(void *cbarg)
{}

static void
bfa_fcport_send_stats_clear(void *cbarg)
{}

/*
 * Handle trunk SCN event from firmware.
 */
static void
bfa_trunk_scn(struct bfa_fcport_s *fcport, struct bfi_fcport_trunk_scn_s *scn)
{}

static void
bfa_trunk_iocdisable(struct bfa_s *bfa)
{}

/*
 * Called to initialize port attributes
 */
void
bfa_fcport_init(struct bfa_s *bfa)
{}

/*
 * Firmware message handler.
 */
void
bfa_fcport_isr(struct bfa_s *bfa, struct bfi_msg_s *msg)
{}

/*
 * Registered callback for port events.
 */
void
bfa_fcport_event_register(struct bfa_s *bfa,
				void (*cbfn) (void *cbarg,
				enum bfa_port_linkstate event),
				void *cbarg)
{}

bfa_status_t
bfa_fcport_enable(struct bfa_s *bfa)
{}

bfa_status_t
bfa_fcport_disable(struct bfa_s *bfa)
{}

/* If PBC is disabled on port, return error */
bfa_status_t
bfa_fcport_is_pbcdisabled(struct bfa_s *bfa)
{}

/*
 * Configure port speed.
 */
bfa_status_t
bfa_fcport_cfg_speed(struct bfa_s *bfa, enum bfa_port_speed speed)
{}

/*
 * Get current speed.
 */
enum bfa_port_speed
bfa_fcport_get_speed(struct bfa_s *bfa)
{}

/*
 * Configure port topology.
 */
bfa_status_t
bfa_fcport_cfg_topology(struct bfa_s *bfa, enum bfa_port_topology topology)
{}

/*
 * Get current topology.
 */
enum bfa_port_topology
bfa_fcport_get_topology(struct bfa_s *bfa)
{}

/*
 * Get config topology.
 */
enum bfa_port_topology
bfa_fcport_get_cfg_topology(struct bfa_s *bfa)
{}

bfa_status_t
bfa_fcport_cfg_hardalpa(struct bfa_s *bfa, u8 alpa)
{}

bfa_status_t
bfa_fcport_clr_hardalpa(struct bfa_s *bfa)
{}

bfa_boolean_t
bfa_fcport_get_hardalpa(struct bfa_s *bfa, u8 *alpa)
{}

u8
bfa_fcport_get_myalpa(struct bfa_s *bfa)
{}

bfa_status_t
bfa_fcport_cfg_maxfrsize(struct bfa_s *bfa, u16 maxfrsize)
{}

u16
bfa_fcport_get_maxfrsize(struct bfa_s *bfa)
{}

u8
bfa_fcport_get_rx_bbcredit(struct bfa_s *bfa)
{}

void
bfa_fcport_set_tx_bbcredit(struct bfa_s *bfa, u16 tx_bbcredit)
{}

/*
 * Get port attributes.
 */

wwn_t
bfa_fcport_get_wwn(struct bfa_s *bfa, bfa_boolean_t node)
{}

void
bfa_fcport_get_attr(struct bfa_s *bfa, struct bfa_port_attr_s *attr)
{}

#define BFA_FCPORT_STATS_TOV

/*
 * Fetch port statistics (FCQoS or FCoE).
 */
bfa_status_t
bfa_fcport_get_stats(struct bfa_s *bfa, struct bfa_cb_pending_q_s *cb)
{}

/*
 * Reset port statistics (FCQoS or FCoE).
 */
bfa_status_t
bfa_fcport_clear_stats(struct bfa_s *bfa, struct bfa_cb_pending_q_s *cb)
{}

/*
 * Fetch port attributes.
 */
bfa_boolean_t
bfa_fcport_is_disabled(struct bfa_s *bfa)
{}

bfa_boolean_t
bfa_fcport_is_dport(struct bfa_s *bfa)
{}

bfa_boolean_t
bfa_fcport_is_ddport(struct bfa_s *bfa)
{}

bfa_status_t
bfa_fcport_set_qos_bw(struct bfa_s *bfa, struct bfa_qos_bw_s *qos_bw)
{}

bfa_boolean_t
bfa_fcport_is_ratelim(struct bfa_s *bfa)
{}

/*
 *	Enable/Disable FAA feature in port config
 */
void
bfa_fcport_cfg_faa(struct bfa_s *bfa, u8 state)
{}

/*
 * Get default minimum ratelim speed
 */
enum bfa_port_speed
bfa_fcport_get_ratelim_speed(struct bfa_s *bfa)
{}

void
bfa_fcport_beacon(void *dev, bfa_boolean_t beacon,
		  bfa_boolean_t link_e2e_beacon)
{}

bfa_boolean_t
bfa_fcport_is_linkup(struct bfa_s *bfa)
{}

bfa_boolean_t
bfa_fcport_is_qos_enabled(struct bfa_s *bfa)
{}

bfa_boolean_t
bfa_fcport_is_trunk_enabled(struct bfa_s *bfa)
{}

bfa_status_t
bfa_fcport_cfg_bbcr(struct bfa_s *bfa, bfa_boolean_t on_off, u8 bb_scn)
{}

bfa_status_t
bfa_fcport_get_bbcr_attr(struct bfa_s *bfa,
		struct bfa_bbcr_attr_s *bbcr_attr)
{}

void
bfa_fcport_dportenable(struct bfa_s *bfa)
{}

void
bfa_fcport_dportdisable(struct bfa_s *bfa)
{}

static void
bfa_fcport_ddportenable(struct bfa_s *bfa)
{}

static void
bfa_fcport_ddportdisable(struct bfa_s *bfa)
{}

/*
 * Rport State machine functions
 */
/*
 * Beginning state, only online event expected.
 */
static void
bfa_rport_sm_uninit(struct bfa_rport_s *rp, enum bfa_rport_event event)
{}

static void
bfa_rport_sm_created(struct bfa_rport_s *rp, enum bfa_rport_event event)
{}

/*
 * Waiting for rport create response from firmware.
 */
static void
bfa_rport_sm_fwcreate(struct bfa_rport_s *rp, enum bfa_rport_event event)
{}

/*
 * Request queue is full, awaiting queue resume to send create request.
 */
static void
bfa_rport_sm_fwcreate_qfull(struct bfa_rport_s *rp, enum bfa_rport_event event)
{}

/*
 * Online state - normal parking state.
 */
static void
bfa_rport_sm_online(struct bfa_rport_s *rp, enum bfa_rport_event event)
{}

/*
 * Firmware rport is being deleted - awaiting f/w response.
 */
static void
bfa_rport_sm_fwdelete(struct bfa_rport_s *rp, enum bfa_rport_event event)
{}

static void
bfa_rport_sm_fwdelete_qfull(struct bfa_rport_s *rp, enum bfa_rport_event event)
{}

/*
 * Offline state.
 */
static void
bfa_rport_sm_offline(struct bfa_rport_s *rp, enum bfa_rport_event event)
{}

/*
 * Rport is deleted, waiting for firmware response to delete.
 */
static void
bfa_rport_sm_deleting(struct bfa_rport_s *rp, enum bfa_rport_event event)
{}

static void
bfa_rport_sm_deleting_qfull(struct bfa_rport_s *rp, enum bfa_rport_event event)
{}

/*
 * Waiting for rport create response from firmware. A delete is pending.
 */
static void
bfa_rport_sm_delete_pending(struct bfa_rport_s *rp,
				enum bfa_rport_event event)
{}

/*
 * Waiting for rport create response from firmware. Rport offline is pending.
 */
static void
bfa_rport_sm_offline_pending(struct bfa_rport_s *rp,
				 enum bfa_rport_event event)
{}

/*
 * IOC h/w failed.
 */
static void
bfa_rport_sm_iocdisable(struct bfa_rport_s *rp, enum bfa_rport_event event)
{}



/*
 *  bfa_rport_private BFA rport private functions
 */

static void
__bfa_cb_rport_online(void *cbarg, bfa_boolean_t complete)
{}

static void
__bfa_cb_rport_offline(void *cbarg, bfa_boolean_t complete)
{}

static void
bfa_rport_qresume(void *cbarg)
{}

void
bfa_rport_meminfo(struct bfa_iocfc_cfg_s *cfg, struct bfa_meminfo_s *minfo,
		struct bfa_s *bfa)
{}

void
bfa_rport_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg,
		struct bfa_pcidev_s *pcidev)
{}

void
bfa_rport_iocdisable(struct bfa_s *bfa)
{}

static struct bfa_rport_s *
bfa_rport_alloc(struct bfa_rport_mod_s *mod)
{}

static void
bfa_rport_free(struct bfa_rport_s *rport)
{}

static bfa_boolean_t
bfa_rport_send_fwcreate(struct bfa_rport_s *rp)
{}

static bfa_boolean_t
bfa_rport_send_fwdelete(struct bfa_rport_s *rp)
{}

static bfa_boolean_t
bfa_rport_send_fwspeed(struct bfa_rport_s *rp)
{}



/*
 *  bfa_rport_public
 */

/*
 * Rport interrupt processing.
 */
void
bfa_rport_isr(struct bfa_s *bfa, struct bfi_msg_s *m)
{}

void
bfa_rport_res_recfg(struct bfa_s *bfa, u16 num_rport_fw)
{}

/*
 *  bfa_rport_api
 */

struct bfa_rport_s *
bfa_rport_create(struct bfa_s *bfa, void *rport_drv)
{}

void
bfa_rport_online(struct bfa_rport_s *rport, struct bfa_rport_info_s *rport_info)
{}

void
bfa_rport_speed(struct bfa_rport_s *rport, enum bfa_port_speed speed)
{}

/* Set Rport LUN Mask */
void
bfa_rport_set_lunmask(struct bfa_s *bfa, struct bfa_rport_s *rp)
{}

/* Unset Rport LUN mask */
void
bfa_rport_unset_lunmask(struct bfa_s *bfa, struct bfa_rport_s *rp)
{}

/*
 * SGPG related functions
 */

/*
 * Compute and return memory needed by FCP(im) module.
 */
void
bfa_sgpg_meminfo(struct bfa_iocfc_cfg_s *cfg, struct bfa_meminfo_s *minfo,
		struct bfa_s *bfa)
{}

void
bfa_sgpg_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg,
		struct bfa_pcidev_s *pcidev)
{}

bfa_status_t
bfa_sgpg_malloc(struct bfa_s *bfa, struct list_head *sgpg_q, int nsgpgs)
{}

void
bfa_sgpg_mfree(struct bfa_s *bfa, struct list_head *sgpg_q, int nsgpg)
{}

void
bfa_sgpg_wait(struct bfa_s *bfa, struct bfa_sgpg_wqe_s *wqe, int nsgpg)
{}

void
bfa_sgpg_wcancel(struct bfa_s *bfa, struct bfa_sgpg_wqe_s *wqe)
{}

void
bfa_sgpg_winit(struct bfa_sgpg_wqe_s *wqe, void (*cbfn) (void *cbarg),
		   void *cbarg)
{}

/*
 *  UF related functions
 */
/*
 *****************************************************************************
 * Internal functions
 *****************************************************************************
 */
static void
__bfa_cb_uf_recv(void *cbarg, bfa_boolean_t complete)
{}

static void
claim_uf_post_msgs(struct bfa_uf_mod_s *ufm)
{}

static void
claim_ufs(struct bfa_uf_mod_s *ufm)
{}

static void
uf_mem_claim(struct bfa_uf_mod_s *ufm)
{}

void
bfa_uf_meminfo(struct bfa_iocfc_cfg_s *cfg, struct bfa_meminfo_s *minfo,
		struct bfa_s *bfa)
{}

void
bfa_uf_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg,
		struct bfa_pcidev_s *pcidev)
{}

static struct bfa_uf_s *
bfa_uf_get(struct bfa_uf_mod_s *uf_mod)
{}

static void
bfa_uf_put(struct bfa_uf_mod_s *uf_mod, struct bfa_uf_s *uf)
{}

static bfa_status_t
bfa_uf_post(struct bfa_uf_mod_s *ufm, struct bfa_uf_s *uf)
{}

static void
bfa_uf_post_all(struct bfa_uf_mod_s *uf_mod)
{}

static void
uf_recv(struct bfa_s *bfa, struct bfi_uf_frm_rcvd_s *m)
{}

void
bfa_uf_iocdisable(struct bfa_s *bfa)
{}

void
bfa_uf_start(struct bfa_s *bfa)
{}

/*
 * Register handler for all unsolicted receive frames.
 *
 * @param[in]	bfa		BFA instance
 * @param[in]	ufrecv	receive handler function
 * @param[in]	cbarg	receive handler arg
 */
void
bfa_uf_recv_register(struct bfa_s *bfa, bfa_cb_uf_recv_t ufrecv, void *cbarg)
{}

/*
 *	Free an unsolicited frame back to BFA.
 *
 * @param[in]		uf		unsolicited frame to be freed
 *
 * @return None
 */
void
bfa_uf_free(struct bfa_uf_s *uf)
{}



/*
 *  uf_pub BFA uf module public functions
 */
void
bfa_uf_isr(struct bfa_s *bfa, struct bfi_msg_s *msg)
{}

void
bfa_uf_res_recfg(struct bfa_s *bfa, u16 num_uf_fw)
{}

/*
 *	Dport forward declaration
 */

enum bfa_dport_test_state_e {};

static void bfa_dport_sm_disabled(struct bfa_dport_s *dport,
				  enum bfa_dport_sm_event event);
static void bfa_dport_sm_enabling_qwait(struct bfa_dport_s *dport,
				  enum bfa_dport_sm_event event);
static void bfa_dport_sm_enabling(struct bfa_dport_s *dport,
				  enum bfa_dport_sm_event event);
static void bfa_dport_sm_enabled(struct bfa_dport_s *dport,
				 enum bfa_dport_sm_event event);
static void bfa_dport_sm_disabling_qwait(struct bfa_dport_s *dport,
				 enum bfa_dport_sm_event event);
static void bfa_dport_sm_disabling(struct bfa_dport_s *dport,
				   enum bfa_dport_sm_event event);
static void bfa_dport_sm_starting_qwait(struct bfa_dport_s *dport,
					enum bfa_dport_sm_event event);
static void bfa_dport_sm_starting(struct bfa_dport_s *dport,
				  enum bfa_dport_sm_event event);
static void bfa_dport_sm_dynamic_disabling(struct bfa_dport_s *dport,
				   enum bfa_dport_sm_event event);
static void bfa_dport_sm_dynamic_disabling_qwait(struct bfa_dport_s *dport,
				   enum bfa_dport_sm_event event);
static void bfa_dport_qresume(void *cbarg);
static void bfa_dport_req_comp(struct bfa_dport_s *dport,
				struct bfi_diag_dport_rsp_s *msg);
static void bfa_dport_scn(struct bfa_dport_s *dport,
				struct bfi_diag_dport_scn_s *msg);

/*
 *	BFA fcdiag module
 */
#define BFA_DIAG_QTEST_TOV

/*
 *	Set port status to busy
 */
static void
bfa_fcdiag_set_busy_status(struct bfa_fcdiag_s *fcdiag)
{}

void
bfa_fcdiag_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg,
		struct bfa_pcidev_s *pcidev)
{}

void
bfa_fcdiag_iocdisable(struct bfa_s *bfa)
{}

static void
bfa_fcdiag_queuetest_timeout(void *cbarg)
{}

static bfa_status_t
bfa_fcdiag_queuetest_send(struct bfa_fcdiag_s *fcdiag)
{}

static void
bfa_fcdiag_queuetest_comp(struct bfa_fcdiag_s *fcdiag,
			bfi_diag_qtest_rsp_t *rsp)
{}

static void
bfa_fcdiag_loopback_comp(struct bfa_fcdiag_s *fcdiag,
			struct bfi_diag_lb_rsp_s *rsp)
{}

static bfa_status_t
bfa_fcdiag_loopback_send(struct bfa_fcdiag_s *fcdiag,
			struct bfa_diag_loopback_s *loopback)
{}

/*
 *	cpe/rme intr handler
 */
void
bfa_fcdiag_intr(struct bfa_s *bfa, struct bfi_msg_s *msg)
{}

/*
 *	Loopback test
 *
 *   @param[in] *bfa            - bfa data struct
 *   @param[in] opmode          - port operation mode
 *   @param[in] speed           - port speed
 *   @param[in] lpcnt           - loop count
 *   @param[in] pat                     - pattern to build packet
 *   @param[in] *result         - pt to bfa_diag_loopback_result_t data struct
 *   @param[in] cbfn            - callback function
 *   @param[in] cbarg           - callback functioin arg
 *
 *   @param[out]
 */
bfa_status_t
bfa_fcdiag_loopback(struct bfa_s *bfa, enum bfa_port_opmode opmode,
		enum bfa_port_speed speed, u32 lpcnt, u32 pat,
		struct bfa_diag_loopback_result_s *result, bfa_cb_diag_t cbfn,
		void *cbarg)
{}

/*
 *	DIAG queue test command
 *
 *   @param[in] *bfa            - bfa data struct
 *   @param[in] force           - 1: don't do ioc op checking
 *   @param[in] queue           - queue no. to test
 *   @param[in] *result         - pt to bfa_diag_qtest_result_t data struct
 *   @param[in] cbfn            - callback function
 *   @param[in] *cbarg          - callback functioin arg
 *
 *   @param[out]
 */
bfa_status_t
bfa_fcdiag_queuetest(struct bfa_s *bfa, u32 force, u32 queue,
		struct bfa_diag_qtest_result_s *result, bfa_cb_diag_t cbfn,
		void *cbarg)
{}

/*
 * DIAG PLB is running
 *
 *   @param[in] *bfa    - bfa data struct
 *
 *   @param[out]
 */
bfa_status_t
bfa_fcdiag_lb_is_running(struct bfa_s *bfa)
{}

/*
 *	D-port
 */
#define bfa_dport_result_start(__dport, __mode)

static bfa_boolean_t bfa_dport_send_req(struct bfa_dport_s *dport,
					enum bfi_dport_req req);
static void
bfa_cb_fcdiag_dport(struct bfa_dport_s *dport, bfa_status_t bfa_status)
{}

static void
bfa_dport_sm_disabled(struct bfa_dport_s *dport, enum bfa_dport_sm_event event)
{}

static void
bfa_dport_sm_enabling_qwait(struct bfa_dport_s *dport,
			    enum bfa_dport_sm_event event)
{}

static void
bfa_dport_sm_enabling(struct bfa_dport_s *dport, enum bfa_dport_sm_event event)
{}

static void
bfa_dport_sm_enabled(struct bfa_dport_s *dport, enum bfa_dport_sm_event event)
{}

static void
bfa_dport_sm_disabling_qwait(struct bfa_dport_s *dport,
			     enum bfa_dport_sm_event event)
{}

static void
bfa_dport_sm_disabling(struct bfa_dport_s *dport, enum bfa_dport_sm_event event)
{}

static void
bfa_dport_sm_starting_qwait(struct bfa_dport_s *dport,
			    enum bfa_dport_sm_event event)
{}

static void
bfa_dport_sm_starting(struct bfa_dport_s *dport, enum bfa_dport_sm_event event)
{}

static void
bfa_dport_sm_dynamic_disabling(struct bfa_dport_s *dport,
			       enum bfa_dport_sm_event event)
{}

static void
bfa_dport_sm_dynamic_disabling_qwait(struct bfa_dport_s *dport,
			    enum bfa_dport_sm_event event)
{}

static bfa_boolean_t
bfa_dport_send_req(struct bfa_dport_s *dport, enum bfi_dport_req req)
{}

static void
bfa_dport_qresume(void *cbarg)
{}

static void
bfa_dport_req_comp(struct bfa_dport_s *dport, struct bfi_diag_dport_rsp_s *msg)
{}

static bfa_boolean_t
bfa_dport_is_sending_req(struct bfa_dport_s *dport)
{}

static void
bfa_dport_scn(struct bfa_dport_s *dport, struct bfi_diag_dport_scn_s *msg)
{}

/*
 * Dport enable
 *
 * @param[in] *bfa            - bfa data struct
 */
bfa_status_t
bfa_dport_enable(struct bfa_s *bfa, u32 lpcnt, u32 pat,
				bfa_cb_diag_t cbfn, void *cbarg)
{}

/*
 *	Dport disable
 *
 *	@param[in] *bfa            - bfa data struct
 */
bfa_status_t
bfa_dport_disable(struct bfa_s *bfa, bfa_cb_diag_t cbfn, void *cbarg)
{}

/*
 * Dport start -- restart dport test
 *
 *   @param[in] *bfa		- bfa data struct
 */
bfa_status_t
bfa_dport_start(struct bfa_s *bfa, u32 lpcnt, u32 pat,
			bfa_cb_diag_t cbfn, void *cbarg)
{}

/*
 * Dport show -- return dport test result
 *
 *   @param[in] *bfa		- bfa data struct
 */
bfa_status_t
bfa_dport_show(struct bfa_s *bfa, struct bfa_diag_dport_result_s *result)
{}