18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Broadcom NetXtreme-E RoCE driver. 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (c) 2016 - 2017, Broadcom. All rights reserved. The term 68c2ecf20Sopenharmony_ci * Broadcom refers to Broadcom Limited and/or its subsidiaries. 78c2ecf20Sopenharmony_ci * 88c2ecf20Sopenharmony_ci * This software is available to you under a choice of one of two 98c2ecf20Sopenharmony_ci * licenses. You may choose to be licensed under the terms of the GNU 108c2ecf20Sopenharmony_ci * General Public License (GPL) Version 2, available from the file 118c2ecf20Sopenharmony_ci * COPYING in the main directory of this source tree, or the 128c2ecf20Sopenharmony_ci * BSD license below: 138c2ecf20Sopenharmony_ci * 148c2ecf20Sopenharmony_ci * Redistribution and use in source and binary forms, with or without 158c2ecf20Sopenharmony_ci * modification, are permitted provided that the following conditions 168c2ecf20Sopenharmony_ci * are met: 178c2ecf20Sopenharmony_ci * 188c2ecf20Sopenharmony_ci * 1. Redistributions of source code must retain the above copyright 198c2ecf20Sopenharmony_ci * notice, this list of conditions and the following disclaimer. 208c2ecf20Sopenharmony_ci * 2. Redistributions in binary form must reproduce the above copyright 218c2ecf20Sopenharmony_ci * notice, this list of conditions and the following disclaimer in 228c2ecf20Sopenharmony_ci * the documentation and/or other materials provided with the 238c2ecf20Sopenharmony_ci * distribution. 248c2ecf20Sopenharmony_ci * 258c2ecf20Sopenharmony_ci * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' 268c2ecf20Sopenharmony_ci * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 278c2ecf20Sopenharmony_ci * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 288c2ecf20Sopenharmony_ci * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS 298c2ecf20Sopenharmony_ci * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 308c2ecf20Sopenharmony_ci * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 318c2ecf20Sopenharmony_ci * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 328c2ecf20Sopenharmony_ci * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 338c2ecf20Sopenharmony_ci * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 348c2ecf20Sopenharmony_ci * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 358c2ecf20Sopenharmony_ci * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 368c2ecf20Sopenharmony_ci * 378c2ecf20Sopenharmony_ci * Description: Uverbs ABI header file 388c2ecf20Sopenharmony_ci */ 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci#ifndef __BNXT_RE_UVERBS_ABI_H__ 418c2ecf20Sopenharmony_ci#define __BNXT_RE_UVERBS_ABI_H__ 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci#include <linux/types.h> 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci#define BNXT_RE_ABI_VERSION 1 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci#define BNXT_RE_CHIP_ID0_CHIP_NUM_SFT 0x00 488c2ecf20Sopenharmony_ci#define BNXT_RE_CHIP_ID0_CHIP_REV_SFT 0x10 498c2ecf20Sopenharmony_ci#define BNXT_RE_CHIP_ID0_CHIP_MET_SFT 0x18 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_cienum { 528c2ecf20Sopenharmony_ci BNXT_RE_UCNTX_CMASK_HAVE_CCTX = 0x1ULL 538c2ecf20Sopenharmony_ci}; 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_cistruct bnxt_re_uctx_resp { 568c2ecf20Sopenharmony_ci __u32 dev_id; 578c2ecf20Sopenharmony_ci __u32 max_qp; 588c2ecf20Sopenharmony_ci __u32 pg_size; 598c2ecf20Sopenharmony_ci __u32 cqe_sz; 608c2ecf20Sopenharmony_ci __u32 max_cqd; 618c2ecf20Sopenharmony_ci __u32 rsvd; 628c2ecf20Sopenharmony_ci __aligned_u64 comp_mask; 638c2ecf20Sopenharmony_ci __u32 chip_id0; 648c2ecf20Sopenharmony_ci __u32 chip_id1; 658c2ecf20Sopenharmony_ci}; 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ci/* 688c2ecf20Sopenharmony_ci * This struct is placed after the ib_uverbs_alloc_pd_resp struct, which is 698c2ecf20Sopenharmony_ci * not 8 byted aligned. To avoid undesired padding in various cases we have to 708c2ecf20Sopenharmony_ci * set this struct to packed. 718c2ecf20Sopenharmony_ci */ 728c2ecf20Sopenharmony_cistruct bnxt_re_pd_resp { 738c2ecf20Sopenharmony_ci __u32 pdid; 748c2ecf20Sopenharmony_ci __u32 dpi; 758c2ecf20Sopenharmony_ci __u64 dbr; 768c2ecf20Sopenharmony_ci} __attribute__((packed, aligned(4))); 778c2ecf20Sopenharmony_ci 788c2ecf20Sopenharmony_cistruct bnxt_re_cq_req { 798c2ecf20Sopenharmony_ci __aligned_u64 cq_va; 808c2ecf20Sopenharmony_ci __aligned_u64 cq_handle; 818c2ecf20Sopenharmony_ci}; 828c2ecf20Sopenharmony_ci 838c2ecf20Sopenharmony_cistruct bnxt_re_cq_resp { 848c2ecf20Sopenharmony_ci __u32 cqid; 858c2ecf20Sopenharmony_ci __u32 tail; 868c2ecf20Sopenharmony_ci __u32 phase; 878c2ecf20Sopenharmony_ci __u32 rsvd; 888c2ecf20Sopenharmony_ci}; 898c2ecf20Sopenharmony_ci 908c2ecf20Sopenharmony_cistruct bnxt_re_qp_req { 918c2ecf20Sopenharmony_ci __aligned_u64 qpsva; 928c2ecf20Sopenharmony_ci __aligned_u64 qprva; 938c2ecf20Sopenharmony_ci __aligned_u64 qp_handle; 948c2ecf20Sopenharmony_ci}; 958c2ecf20Sopenharmony_ci 968c2ecf20Sopenharmony_cistruct bnxt_re_qp_resp { 978c2ecf20Sopenharmony_ci __u32 qpid; 988c2ecf20Sopenharmony_ci __u32 rsvd; 998c2ecf20Sopenharmony_ci}; 1008c2ecf20Sopenharmony_ci 1018c2ecf20Sopenharmony_cistruct bnxt_re_srq_req { 1028c2ecf20Sopenharmony_ci __aligned_u64 srqva; 1038c2ecf20Sopenharmony_ci __aligned_u64 srq_handle; 1048c2ecf20Sopenharmony_ci}; 1058c2ecf20Sopenharmony_ci 1068c2ecf20Sopenharmony_cistruct bnxt_re_srq_resp { 1078c2ecf20Sopenharmony_ci __u32 srqid; 1088c2ecf20Sopenharmony_ci}; 1098c2ecf20Sopenharmony_ci 1108c2ecf20Sopenharmony_cienum bnxt_re_shpg_offt { 1118c2ecf20Sopenharmony_ci BNXT_RE_BEG_RESV_OFFT = 0x00, 1128c2ecf20Sopenharmony_ci BNXT_RE_AVID_OFFT = 0x10, 1138c2ecf20Sopenharmony_ci BNXT_RE_AVID_SIZE = 0x04, 1148c2ecf20Sopenharmony_ci BNXT_RE_END_RESV_OFFT = 0xFF0 1158c2ecf20Sopenharmony_ci}; 1168c2ecf20Sopenharmony_ci 1178c2ecf20Sopenharmony_ci#endif /* __BNXT_RE_UVERBS_ABI_H__*/ 118