linux/drivers/infiniband/hw/ocrdma/ocrdma_sli.h

/* This file is part of the Emulex RoCE Device Driver for
 * RoCE (RDMA over Converged Ethernet) adapters.
 * Copyright (C) 2012-2015 Emulex. All rights reserved.
 * EMULEX and SLI are trademarks of Emulex.
 * www.emulex.com
 *
 * This software is available to you under a choice of one of two licenses.
 * You may choose to be licensed under the terms of the GNU General Public
 * License (GPL) Version 2, available from the file COPYING in the main
 * directory of this source tree, or the BSD license below:
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * - Redistributions of source code must retain the above copyright notice,
 *   this list of conditions and the following disclaimer.
 *
 * - Redistributions in binary form must reproduce the above copyright
 *   notice, this list of conditions and the following disclaimer in
 *   the documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * Contact Information:
 * [email protected]
 *
 * Emulex
 * 3333 Susan Street
 * Costa Mesa, CA 92626
 */

#ifndef __OCRDMA_SLI_H__
#define __OCRDMA_SLI_H__

enum {};

enum {};

#define OCRDMA_SUBSYS_ROCE
enum {};

#define OCRDMA_SUBSYS_COMMON
enum {};

enum {};

#define OCRDMA_MAX_SGID

#define OCRDMA_MAX_QP
#define OCRDMA_MAX_CQ
#define OCRDMA_MAX_STAG

enum {};

enum {};

#define OCRDMA_DB_CQ_RING_ID_MASK
#define OCRDMA_DB_CQ_RING_ID_EXT_MASK
/* qid #2 msbits at 12-11 */
#define OCRDMA_DB_CQ_RING_ID_EXT_MASK_SHIFT
#define OCRDMA_DB_CQ_NUM_POPPED_SHIFT
/* Rearm bit */
#define OCRDMA_DB_CQ_REARM_SHIFT
/* solicited bit */
#define OCRDMA_DB_CQ_SOLICIT_SHIFT

#define OCRDMA_EQ_ID_MASK
#define OCRDMA_EQ_ID_EXT_MASK
#define OCRDMA_EQ_ID_EXT_MASK_SHIFT

/* Clear the interrupt for this eq */
#define OCRDMA_EQ_CLR_SHIFT
/* Must be 1 */
#define OCRDMA_EQ_TYPE_SHIFT
/* Number of event entries processed */
#define OCRDMA_NUM_EQE_SHIFT
/* Rearm bit */
#define OCRDMA_REARM_SHIFT

#define OCRDMA_MQ_ID_MASK
/* Number of entries posted */
#define OCRDMA_MQ_NUM_MQE_SHIFT

#define OCRDMA_MIN_HPAGE_SIZE

#define OCRDMA_MIN_Q_PAGE_SIZE
#define OCRDMA_MAX_Q_PAGES

#define OCRDMA_SLI_ASIC_ID_OFFSET
#define OCRDMA_SLI_ASIC_REV_MASK
#define OCRDMA_SLI_ASIC_GEN_NUM_MASK
#define OCRDMA_SLI_ASIC_GEN_NUM_SHIFT
/*
# 0: 4K Bytes
# 1: 8K Bytes
# 2: 16K Bytes
# 3: 32K Bytes
# 4: 64K Bytes
# 5: 128K Bytes
# 6: 256K Bytes
# 7: 512K Bytes
*/
#define OCRDMA_MAX_Q_PAGE_SIZE_CNT
#define OCRDMA_Q_PAGE_BASE_SIZE

#define MAX_OCRDMA_QP_PAGES
#define OCRDMA_MAX_WQE_MEM_SIZE

#define OCRDMA_CREATE_CQ_MAX_PAGES
#define OCRDMA_DPP_CQE_SIZE

#define OCRDMA_GEN2_MAX_CQE
#define OCRDMA_GEN2_CQ_PAGE_SIZE
#define OCRDMA_GEN2_WQE_SIZE
#define OCRDMA_MAX_CQE
#define OCRDMA_CQ_PAGE_SIZE
#define OCRDMA_WQE_SIZE
#define OCRDMA_WQE_STRIDE
#define OCRDMA_WQE_ALIGN_BYTES

#define MAX_OCRDMA_SRQ_PAGES

enum {};

/* mailbox cmd header */
struct ocrdma_mbx_hdr {};

enum {};

/* mailbox cmd response */
struct ocrdma_mbx_rsp {};

enum {};

struct ocrdma_mqe_sge {};

enum {};

struct ocrdma_mqe_hdr {};

struct ocrdma_mqe_emb_cmd {};

struct ocrdma_mqe {};

#define OCRDMA_EQ_LEN
#define OCRDMA_MQ_CQ_LEN
#define OCRDMA_MQ_LEN

#define PAGE_SHIFT_4K
#define PAGE_SIZE_4K

/* Returns number of pages spanned by the data starting at the given addr */
#define PAGES_4K_SPANNED(_address, size)

struct ocrdma_delete_q_req {};

struct ocrdma_pa {};

#define MAX_OCRDMA_EQ_PAGES
struct ocrdma_create_eq_req {};

enum {};

struct ocrdma_create_eq_rsp {};

#define OCRDMA_EQ_MINOR_OTHER

struct ocrmda_set_eqd {};

struct ocrdma_modify_eqd_cmd {} __packed;

struct ocrdma_modify_eqd_req {};


struct ocrdma_modify_eq_delay_rsp {} __packed;

enum {};

struct ocrdma_mcqe {};

enum {};
struct ocrdma_ae_mcqe {};

enum {};

struct ocrdma_ae_pvid_mcqe {};

enum {};

struct ocrdma_ae_mpa_mcqe {};

enum {};

struct ocrdma_ae_qp_mcqe {};

enum ocrdma_async_event_code {};

enum ocrdma_async_grp5_events {};

enum OCRDMA_ASYNC_EVENT_TYPE {};

struct ocrdma_ae_lnkst_mcqe {};

enum {};

enum {};

/* mailbox command request and responses */
enum {};

struct ocrdma_mbx_query_config {};

struct ocrdma_fw_ver_rsp {};

struct ocrdma_fw_conf_rsp {};

enum {};

enum {};

struct ocrdma_get_phy_info_rsp {};

enum {};

enum {};

struct ocrdma_get_link_speed_rsp {};

enum {};

enum {};

enum {};

struct ocrdma_create_cq_cmd {};

struct ocrdma_create_cq {};

enum {};

enum {};

struct ocrdma_create_cq_cmd_rsp {};

struct ocrdma_create_cq_rsp {};

enum {};

struct ocrdma_create_mq_req {};

struct ocrdma_create_mq_rsp {};

enum {};

struct ocrdma_destroy_cq {};

struct ocrdma_destroy_cq_rsp {};

enum {};

enum {};

enum {};

#define MAX_OCRDMA_IRD_PAGES

enum ocrdma_qp_flags {};

enum ocrdma_qp_state {};

struct ocrdma_create_qp_req {};

enum {};

struct ocrdma_create_qp_rsp {};

struct ocrdma_destroy_qp {};

struct ocrdma_destroy_qp_rsp {};

enum {};

enum {};

struct ocrdma_qp_params {};


struct ocrdma_modify_qp {};

enum {};

struct ocrdma_modify_qp_rsp {};

struct ocrdma_query_qp {};

struct ocrdma_query_qp_rsp {};

enum {};

struct ocrdma_create_srq {};

enum {};

struct ocrdma_create_srq_rsp {};

enum {};

struct ocrdma_modify_srq {};

enum {};

struct ocrdma_query_srq {};

enum {};

struct ocrdma_query_srq_rsp {};

enum {};

struct ocrdma_destroy_srq {};

enum {};

struct ocrdma_alloc_pd {};

enum {};

struct ocrdma_alloc_pd_rsp {};

struct ocrdma_dealloc_pd {};

struct ocrdma_dealloc_pd_rsp {};

struct ocrdma_alloc_pd_range {};

struct ocrdma_alloc_pd_range_rsp {};

enum {};

struct ocrdma_dealloc_pd_range {};

struct ocrdma_dealloc_pd_range_rsp {};

enum {};

enum {};

struct ocrdma_alloc_lkey {};

struct ocrdma_alloc_lkey_rsp {};

struct ocrdma_dealloc_lkey {};

struct ocrdma_dealloc_lkey_rsp {};

#define MAX_OCRDMA_NSMR_PBL
#define MAX_OCRDMA_PBL_SIZE
#define MAX_OCRDMA_PBL_PER_LKEY

enum {};

struct ocrdma_reg_nsmr {};

enum {};

struct ocrdma_reg_nsmr_cont {};

struct ocrdma_pbe {};

enum {};
struct ocrdma_reg_nsmr_rsp {};

enum {};

struct ocrdma_reg_nsmr_cont_rsp {};

enum {};

struct ocrdma_alloc_mw {};

enum {};

struct ocrdma_alloc_mw_rsp {};

struct ocrdma_attach_mcast {};

struct ocrdma_attach_mcast_rsp {};

struct ocrdma_detach_mcast {};

struct ocrdma_detach_mcast_rsp {};

enum {};

#define OCRDMA_AH_TBL_PAGES

struct ocrdma_create_ah_tbl {};

struct ocrdma_create_ah_tbl_rsp {};

struct ocrdma_delete_ah_tbl {};

struct ocrdma_delete_ah_tbl_rsp {};

enum {};

enum major_code {};

struct ocrdma_eqe {};

enum OCRDMA_CQE_STATUS {};

enum {};

struct ocrdma_cqe {};

struct ocrdma_sge {};

enum {};

enum OCRDMA_WQE_OPCODE {};

enum {};

enum {};

/* header WQE for all the SQ and RQ operations */
struct ocrdma_hdr_wqe {};

struct ocrdma_ewqe_ud_hdr {};

/* extended wqe followed by hdr_wqe for Fast Memory register */
struct ocrdma_ewqe_fr {};

struct ocrdma_eth_basic {} __packed;

struct ocrdma_eth_vlan {} __packed;

struct ocrdma_grh {} __packed;

#define OCRDMA_AV_VALID
#define OCRDMA_AV_VLAN_VALID

struct ocrdma_av {} __packed;

struct ocrdma_rsrc_stats {};

struct ocrdma_db_err_stats {};

struct ocrdma_wqe_stats {};

struct ocrdma_tx_stats {};


struct ocrdma_tx_qp_err_stats {};

struct ocrdma_rx_stats {};

struct ocrdma_rx_qp_err_stats {};

struct ocrdma_tx_dbg_stats {};

struct ocrdma_rx_dbg_stats {};

struct ocrdma_rdma_stats_req {} __packed;

struct ocrdma_rdma_stats_resp {} __packed;

enum {};

struct mgmt_hba_attribs {};

struct mgmt_controller_attrib {};

struct ocrdma_get_ctrl_attribs_rsp {};

#define OCRDMA_SUBSYS_DCBX

enum OCRDMA_DCBX_OPCODE {};

enum OCRDMA_DCBX_PARAM_TYPE {};

enum OCRDMA_DCBX_PROTO {};

enum OCRDMA_DCBX_APP_PARAM {};

enum OCRDMA_DCBX_STATE_FLAGS {};

enum OCRDMA_TCV_AEV_OPV_ST {};

struct ocrdma_app_parameter {};

struct ocrdma_dcbx_cfg {};

struct ocrdma_get_dcbx_cfg_req {} __packed;

struct ocrdma_get_dcbx_cfg_rsp {} __packed;

#endif				/* __OCRDMA_SLI_H__ */