linux/drivers/net/ethernet/brocade/bna/bfi.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
 */
#ifndef __BFI_H__
#define __BFI_H__

#include "bfa_defs.h"

/* BFI FW image type */
#define BFI_FLASH_CHUNK_SZ
#define BFI_FLASH_CHUNK_SZ_WORDS
#define BFI_FLASH_IMAGE_SZ

/* Msg header common to all msgs */
struct bfi_mhdr {} __packed;

#define bfi_fn_lpu(__fn, __lpu)
#define bfi_mhdr_2_fn(_mh)
#define bfi_mhdr_2_qid(_mh)

#define bfi_h2i_set(_mh, _mc, _op, _fn_lpu)

#define bfi_i2h_set(_mh, _mc, _op, _i2htok)

/*
 * Message opcodes: 0-127 to firmware, 128-255 to host
 */
#define BFI_I2H_OPCODE_BASE
#define BFA_I2HM(_x)

/****************************************************************************
 *
 * Scatter Gather Element and Page definition
 *
 ****************************************************************************
 */

/* DMA addresses */
bfi_addr_u __packed;

/* Generic DMA addr-len pair. */
struct bfi_alen {} __packed;

/*
 * Large Message structure - 128 Bytes size Msgs
 */
#define BFI_LMSG_SZ
#define BFI_LMSG_PL_WSZ

/* Mailbox message structure */
#define BFI_MBMSG_SZ
struct bfi_mbmsg {} __packed;

/* Supported PCI function class codes (personality) */
enum bfi_pcifn_class {};

/* Message Classes */
enum bfi_mclass {};

#define BFI_IOC_MSGLEN_MAX

#define BFI_FWBOOT_ENV_OS

/*----------------------------------------------------------------------
 *				IOC
 *----------------------------------------------------------------------
 */

/* Different asic generations */
enum bfi_asic_gen {};

enum bfi_asic_mode {};

enum bfi_ioc_h2i_msgs {};

enum bfi_ioc_i2h_msgs {};

/* BFI_IOC_H2I_GETATTR_REQ message */
struct bfi_ioc_getattr_req {} __packed;

struct bfi_ioc_attr {} __packed;

/* BFI_IOC_I2H_GETATTR_REPLY message */
struct bfi_ioc_getattr_reply {} __packed;

/* Firmware memory page offsets */
#define BFI_IOC_SMEM_PG0_CB
#define BFI_IOC_SMEM_PG0_CT

/* Firmware statistic offset */
#define BFI_IOC_FWSTATS_OFF
#define BFI_IOC_FWSTATS_SZ

/* Firmware trace offset */
#define BFI_IOC_TRC_OFF
#define BFI_IOC_TRC_ENTS
#define BFI_IOC_TRC_ENT_SZ
#define BFI_IOC_TRC_HDR_SZ

#define BFI_IOC_FW_SIGNATURE
#define BFI_IOC_FW_INV_SIGN
#define BFI_IOC_MD5SUM_SZ

struct bfi_ioc_fwver {} __packed;

struct bfi_ioc_image_hdr {} __packed;

enum bfi_ioc_img_ver_cmp {};

#define BFI_FWBOOT_DEVMODE_OFF
#define BFI_FWBOOT_TYPE_OFF
#define BFI_FWBOOT_ENV_OFF
#define BFI_FWBOOT_DEVMODE(__asic_gen, __asic_mode, __p0_mode, __p1_mode)

enum bfi_fwboot_type {};

enum bfi_port_mode {};

struct bfi_ioc_hbeat {} __packed;

/* IOC hardware/firmware state */
enum bfi_ioc_state {};

enum {};

#define BFI_ADAPTER_GETP(__prop, __adap_prop)
#define BFI_ADAPTER_SETP(__prop, __val)
#define BFI_ADAPTER_IS_SPECIAL(__adap_type)

/* BFI_IOC_H2I_ENABLE_REQ & BFI_IOC_H2I_DISABLE_REQ messages */
struct bfi_ioc_ctrl_req {} __packed;

/* BFI_IOC_I2H_ENABLE_REPLY & BFI_IOC_I2H_DISABLE_REPLY messages */
struct bfi_ioc_ctrl_reply {} __packed;

#define BFI_IOC_MSGSZ
/* H2I Messages */
bfi_ioc_h2i_msg_u __packed;

/* I2H Messages */
bfi_ioc_i2h_msg_u __packed;

/*----------------------------------------------------------------------
 *				MSGQ
 *----------------------------------------------------------------------
 */

enum bfi_msgq_h2i_msgs {};

enum bfi_msgq_i2h_msgs {};

/* Messages(commands/responsed/AENS will have the following header */
struct bfi_msgq_mhdr {} __packed;

#define bfi_msgq_mhdr_set(_mh, _mc, _mid, _tok, _enet_id)

/*
 * Mailbox  for messaging interface
 */
#define BFI_MSGQ_CMD_ENTRY_SIZE
#define BFI_MSGQ_RSP_ENTRY_SIZE

#define bfi_msgq_num_cmd_entries(_size)

struct bfi_msgq {} __packed;

/* BFI_ENET_MSGQ_CFG_REQ TBD init or cfg? */
struct bfi_msgq_cfg_req {} __packed;

/* BFI_ENET_MSGQ_CFG_RSP */
struct bfi_msgq_cfg_rsp {} __packed;

/* BFI_MSGQ_H2I_DOORBELL */
struct bfi_msgq_h2i_db {} __packed;

/* BFI_MSGQ_I2H_DOORBELL */
struct bfi_msgq_i2h_db {} __packed;

#define BFI_CMD_COPY_SZ

/* BFI_MSGQ_H2I_CMD_COPY_RSP */
struct bfi_msgq_h2i_cmdq_copy_rsp {} __packed;

/* BFI_MSGQ_I2H_CMD_COPY_REQ */
struct bfi_msgq_i2h_cmdq_copy_req {} __packed;

/*
 *      FLASH module specific
 */
enum bfi_flash_h2i_msgs {};

enum bfi_flash_i2h_msgs {};

/*
 * Flash query request
 */
struct bfi_flash_query_req {} __packed;

/*
 * Flash write request
 */
struct bfi_flash_write_req {} __packed;

/*
 * Flash read request
 */
struct bfi_flash_read_req {} __packed;

/*
 * Flash query response
 */
struct bfi_flash_query_rsp {} __packed;

/*
 * Flash read response
 */
struct bfi_flash_read_rsp {} __packed;

/*
 * Flash write response
 */
struct bfi_flash_write_rsp {} __packed;

#endif /* __BFI_H__ */