2 * Copyright (c) 2004, 2005 Topspin Communications. All rights reserved.
3 * Copyright (c) 2005 Cisco Systems. All rights reserved.
5 * This software is available to you under a choice of one of two
6 * licenses. You may choose to be licensed under the terms of the GNU
7 * General Public License (GPL) Version 2, available from the file
8 * COPYING in the main directory of this source tree, or the
9 * OpenIB.org BSD license below:
11 * Redistribution and use in source and binary forms, with or
12 * without modification, are permitted provided that the following
15 * - Redistributions of source code must retain the above
16 * copyright notice, this list of conditions and the following
19 * - Redistributions in binary form must reproduce the above
20 * copyright notice, this list of conditions and the following
21 * disclaimer in the documentation and/or other materials
22 * provided with the distribution.
24 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
28 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
29 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
30 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
38 MTHCA_SEND_DOORBELL = 0x10,
39 MTHCA_RECV_DOORBELL = 0x18
43 MTHCA_NEXT_DBD = 1 << 7,
44 MTHCA_NEXT_FENCE = 1 << 6,
45 MTHCA_NEXT_CQ_UPDATE = 1 << 3,
46 MTHCA_NEXT_EVENT_GEN = 1 << 2,
47 MTHCA_NEXT_SOLICIT = 1 << 1,
51 MTHCA_INLINE_SEG = 1 << 31
55 MTHCA_INVAL_LKEY = 0x100,
56 MTHCA_TAVOR_MAX_WQES_PER_RECV_DB = 256,
57 MTHCA_ARBEL_MAX_WQES_PER_SEND_DB = 255
60 struct mthca_next_seg {
61 uint32_t nda_op; /* [31:6] next WQE [4:0] next opcode */
62 uint32_t ee_nds; /* [31:8] next EE [7] DBD [6] F [5:0] next WQE size */
63 uint32_t flags; /* [3] CQ [2] Event [1] Solicit */
64 uint32_t imm; /* immediate data */
67 struct mthca_tavor_ud_seg {
71 uint32_t reserved2[4];
74 uint32_t reserved3[2];
77 struct mthca_arbel_ud_seg {
84 struct mthca_bind_seg {
85 uint32_t flags; /* [31] Atomic [30] rem write [29] rem read */
93 struct mthca_raddr_seg {
99 struct mthca_atomic_seg {
104 struct mthca_data_seg {
110 struct mthca_inline_seg {