/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/* Copyright © 2003-2011 Emulex. All rights reserved. */
/*
* Header file containing the command structures for Hardware
*/
#ifndef _OCE_HW_H_
#define _OCE_HW_H_
#ifdef __cplusplus
extern "C" {
#endif
#pragma pack(1)
/* PCI CSR offsets */
/* CSR register offsets */
#define MPU_EP_CONTROL 0
/* POST status reg struct */
/* DOORBELL registers */
/* EQE completion types */
/* Link Status field values */
/* Hardware Address types */
/* CREATE_IFACE capability and cap_en flags */
/* port link_status */
/* Logical Link Status */
#define NTWK_LOGICAL_LINK_DOWN 0
/* Rx filter bits */
/* max SGE per mbx */
/* physical address structure to be used in MBX */
struct phys_addr {
/* dw0 */
/* dw1 */
};
typedef union pcicfg_intr_ctl_u {
struct {
#ifdef _BIG_ENDIAN
#else
#endif
} bits;
typedef union pcicfg_semaphore_u {
struct {
#ifdef _BIG_ENDIAN
#else
#endif
}bits;
typedef union pcicfg_soft_reset_u {
struct {
#ifdef _BIG_ENDIAN
#else
#endif
}bits;
typedef union pcicfg_online1_u {
struct {
#ifdef _BIG_ENDIAN
#else
#endif
}bits;
typedef union mpu_ep_semaphore_u {
struct {
#ifdef _BIG_ENDIAN
#else
#endif
}bits;
typedef union mpu_ep_control_u {
struct {
#ifdef _BIG_ENDIAN
#else
#endif
}bits;
/* RX doorbell */
typedef union pd_rxulp_db_u {
struct {
#ifdef _BIG_ENDIAN
#else
#endif
}bits;
/* TX doorbell */
typedef union pd_txulp_db_u {
struct {
#ifdef _BIG_ENDIAN
#else
#endif
}bits;
/* CQ doorbell */
typedef union cq_db_u {
struct {
#ifdef _BIG_ENDIAN
#else
#endif
}bits;
}cq_db_t;
/* EQ doorbell */
typedef union eq_db_u {
struct {
#ifdef _BIG_ENDIAN
#else
#endif
}bits;
}eq_db_t;
/* bootstrap mbox doorbell */
typedef union pd_mpu_mbox_db_u {
struct {
#ifdef _BIG_ENDIAN
#else
#endif
}bits;
/* MQ ring doorbell */
typedef union pd_mq_db_u {
struct {
#ifdef _BIG_ENDIAN
#else
#endif
}bits;
/*
* Event Queue Entry
*/
struct oce_eqe {
union {
struct {
#ifdef _BIG_ENDIAN
#else
#endif
}s;
}u0;
};
/* MQ scatter gather entry. Array of these make an SGL */
struct oce_mq_sge {
};
/*
* payload can contain an SGL or an embedded array of upto 59 dwords
*/
struct oce_mbx_payload {
union {
union {
}u1;
}u0;
};
/*
* MQ MBX structure
*/
struct oce_mbx {
union {
struct {
#ifdef _BIG_ENDIAN
#else
#endif
}s;
}u0;
};
/* completion queue entry for MQ */
struct oce_mq_cqe {
union {
struct {
#ifdef _BIG_ENDIAN
/* dw0 */
/* dw1 dw2 */
/* dw3 */
#else
/* dw0 */
/* dw1 dw2 */
/* dw3 */
#endif
}s;
}u0;
};
struct oce_async_cqe_link_state {
union {
struct {
#ifdef _BIG_ENDIAN
/* dw0 */
/* dw1 */
/* dw2 */
/* dw3 */
#else
/* dw0 */
/* dw1 */
/* dw2 */
/* dw3 */
#endif
}s;
}u0;
};
/* MQ mailbox structure */
struct oce_bmbx {
};
/* ---[ MBXs start here ]---------------------------------------------- */
/* MBXs sub system codes */
enum {
MBX_SUBSYSTEM_RSVD = 0,
};
/* common ioctl opcodes */
enum {
};
/* common ioctl header */
struct mbx_hdr {
union {
struct {
#ifdef _BIG_ENDIAN
#else
#endif
}req;
struct {
/* dw 0 */
/* dw 1 */
}rsp;
}u0;
};
/* [05] OPCODE_QUERY_COMMON_LINK_STATUS */
struct mbx_query_common_link_status {
union {
struct {
}req;
struct {
/* dw 0 */
/* dw 1 */
}rsp;
}params;
};
/* [57] OPCODE_SET_COMMON_LINK_SPEED */
struct mbx_set_common_link_speed {
union {
struct {
#ifdef _BIG_ENDIAN
#else
#endif
}req;
struct {
}rsp;
}params;
};
struct mac_address_format {
};
/* [01] OPCODE_QUERY_COMMON_IFACE_MAC */
struct mbx_query_common_iface_mac {
union {
struct {
#ifdef _BIG_ENDIAN
#else
#endif
}req;
struct {
}rsp;
}params;
};
/* [02] OPCODE_SET_COMMON_IFACE_MAC */
struct mbx_set_common_iface_mac {
union {
struct {
#ifdef _BIG_ENDIAN
/* dw 0 */
#else
/* dw 0 */
#endif
/* dw 1 */
}req;
struct {
}rsp;
}params;
};
/* [03] OPCODE_SET_COMMON_IFACE_MULTICAST */
struct mbx_set_common_iface_multicast {
union {
struct {
/* dw 0 */
/* dw 1-48 */
struct {
}req;
struct {
}rsp;
}params;
};
struct qinq_vlan {
#ifdef _BIG_ENDIAN
#else
#endif
};
struct normal_vlan {
};
struct ntwk_if_vlan_tag {
union {
}u0;
};
/* [50] OPCODE_CREATE_COMMON_IFACE */
struct mbx_create_common_iface {
union {
struct {
}req;
struct {
}rsp;
}params;
};
/* [51] OPCODE_DESTROY_COMMON_IFACE */
struct mbx_destroy_common_iface {
union {
struct {
}req;
struct {
}rsp;
}params;
};
/* event queue context structure */
struct oce_eq_ctx {
#ifdef _BIG_ENDIAN
/* dw0 */
/* dw1 */
/* dw2 */
/* dw 3 */
#else
/* dw0 */
/* dw1 */
/* dw2 */
/* dw3 */
#endif
};
/* [13] OPCODE_CREATE_COMMON_EQ */
struct mbx_create_common_eq {
union {
struct {
#ifdef _BIG_ENDIAN
#else
#endif
}req;
struct {
}rsp;
}params;
};
/* [55] OPCODE_DESTROY_COMMON_EQ */
struct mbx_destroy_common_eq {
union {
struct {
#ifdef _BIG_ENDIAN
#else
#endif
}req;
struct {
}rsp;
}params;
};
struct oce_cq_ctx {
#ifdef _BIG_ENDIAN
/* dw0 */
/* dw1 */
/* dw2 */
#else
/* dw0 */
/* dw1 */
/* dw2 */
#endif
};
/* [12] OPCODE_CREATE_COMMON_CQ */
struct mbx_create_common_cq {
union {
struct {
#ifdef _BIG_ENDIAN
#else
#endif
}req;
struct {
}rsp;
}params;
};
/* [54] OPCODE_DESTROY_COMMON_CQ */
struct mbx_destroy_common_cq {
union {
struct {
#ifdef _BIG_ENDIAN
#else
#endif
}req;
struct {
}rsp;
}params;
};
struct mq_ring_ctx {
union {
struct {
#ifdef _BIG_ENDIAN
/* dw 0 */
/* dw1 */
/* dw 2 */
#else
/* dw 0 */
/* dw1 */
/* dw 2 */
#endif
/* dw3 */
}s;
}u0;
};
/* [21] OPCODE_CREATE_COMMON_MQ */
struct mbx_create_common_mq {
union {
struct {
#ifdef _BIG_ENDIAN
#else
#endif
}req;
struct {
}rsp;
}params;
};
/* [53] OPCODE_DESTROY_COMMON_MQ */
struct mbx_destroy_common_mq {
union {
struct {
#ifdef _BIG_ENDIAN
#else
#endif
}req;
struct {
}rsp;
}params;
};
/* [35] OPCODE_GET_COMMON_ FW_VERSION */
struct mbx_get_common_fw_version {
union {
struct {
}req;
struct {
}rsp;
}params;
};
/* [52] OPCODE_COMMON_CEV_MODIFY_MSI_MESSAGES */
struct mbx_common_cev_modify_msi_messages {
union {
struct {
}req;
struct {
}rsp;
}params;
};
/* [36] OPCODE_SET_COMMON_FLOW_CONTROL */
/* [37] OPCODE_GET_COMMON_FLOW_CONTROL */
struct mbx_common_get_set_flow_control {
#ifdef _BIG_ENDIAN
#else
#endif
};
enum e_flash_opcode {
};
/* [06] OPCODE_READ_COMMON_FLASHROM */
/* [07] OPCODE_WRITE_COMMON_FLASHROM */
struct mbx_common_read_write_flashrom {
};
/* ULP MODE SUPPORTED */
enum {
};
/* Function Mode Supported */
enum {
};
struct mbx_common_query_fw_config {
union {
struct {
}req;
struct {
struct {
}rsp;
}params;
};
struct mbx_common_config_vlan {
union {
struct {
#ifdef _BIG_ENDIAN
#else
#endif
union {
}tags;
}req;
struct {
}rsp;
}params;
};
/* [34] OPCODE_COMMON_NTWK_RX_FILTER */
struct mbx_set_common_ntwk_rx_filter {
struct {
};
/* [41] OPCODE_MODIFY_COMMON_EQ_DELAY */
struct mbx_modify_common_eq_delay {
union {
struct {
struct {
}req;
struct {
}rsp;
}params;
};
/* [59] OPCODE_ADD_COMMON_IFACE_MAC */
struct mbx_add_common_iface_mac {
union {
struct {
}req;
struct {
}rsp;
} params;
};
/* [60] OPCODE_DEL_COMMON_IFACE_MAC */
struct mbx_del_common_iface_mac {
union {
struct {
}req;
struct {
}rsp;
} params;
};
/* [8] OPCODE_QUERY_COMMON_MAX_MBX_BUFFER_SIZE */
struct mbx_query_common_max_mbx_buffer_size {
struct {
} rsp;
};
/* [61] OPCODE_COMMON_FUNCTION_RESET */
struct ioctl_common_function_reset {
};
/* [80] OPCODE_COMMON_FUNCTION_LINK_CONFIG */
struct mbx_common_func_link_cfg {
union {
struct {
}req;
struct {
}rsp;
} params;
};
#pragma pack()
#ifdef __cplusplus
}
#endif
#endif /* _OCE_HW_H_ */