cxgb_sge_defs.h revision 302408
1/************************************************************************** 2 3Copyright (c) 2007, Chelsio Inc. 4All rights reserved. 5 6Redistribution and use in source and binary forms, with or without 7modification, are permitted provided that the following conditions are met: 8 9 1. Redistributions of source code must retain the above copyright notice, 10 this list of conditions and the following disclaimer. 11 12 2. Neither the name of the Chelsio Corporation nor the names of its 13 contributors may be used to endorse or promote products derived from 14 this software without specific prior written permission. 15 16THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 20LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26POSSIBILITY OF SUCH DAMAGE. 27 28$FreeBSD: stable/11/sys/dev/cxgb/common/cxgb_sge_defs.h 172096 2007-09-09 01:28:03Z kmacy $ 29 30***************************************************************************/ 31/* 32 * This file is automatically generated --- any changes will be lost. 33 */ 34 35#ifndef _SGE_DEFS_H 36#define _SGE_DEFS_H 37 38#define S_EC_CREDITS 0 39#define M_EC_CREDITS 0x7FFF 40#define V_EC_CREDITS(x) ((x) << S_EC_CREDITS) 41#define G_EC_CREDITS(x) (((x) >> S_EC_CREDITS) & M_EC_CREDITS) 42 43#define S_EC_GTS 15 44#define V_EC_GTS(x) ((x) << S_EC_GTS) 45#define F_EC_GTS V_EC_GTS(1U) 46 47#define S_EC_INDEX 16 48#define M_EC_INDEX 0xFFFF 49#define V_EC_INDEX(x) ((x) << S_EC_INDEX) 50#define G_EC_INDEX(x) (((x) >> S_EC_INDEX) & M_EC_INDEX) 51 52#define S_EC_SIZE 0 53#define M_EC_SIZE 0xFFFF 54#define V_EC_SIZE(x) ((x) << S_EC_SIZE) 55#define G_EC_SIZE(x) (((x) >> S_EC_SIZE) & M_EC_SIZE) 56 57#define S_EC_BASE_LO 16 58#define M_EC_BASE_LO 0xFFFF 59#define V_EC_BASE_LO(x) ((x) << S_EC_BASE_LO) 60#define G_EC_BASE_LO(x) (((x) >> S_EC_BASE_LO) & M_EC_BASE_LO) 61 62#define S_EC_BASE_HI 0 63#define M_EC_BASE_HI 0xF 64#define V_EC_BASE_HI(x) ((x) << S_EC_BASE_HI) 65#define G_EC_BASE_HI(x) (((x) >> S_EC_BASE_HI) & M_EC_BASE_HI) 66 67#define S_EC_RESPQ 4 68#define M_EC_RESPQ 0x7 69#define V_EC_RESPQ(x) ((x) << S_EC_RESPQ) 70#define G_EC_RESPQ(x) (((x) >> S_EC_RESPQ) & M_EC_RESPQ) 71 72#define S_EC_TYPE 7 73#define M_EC_TYPE 0x7 74#define V_EC_TYPE(x) ((x) << S_EC_TYPE) 75#define G_EC_TYPE(x) (((x) >> S_EC_TYPE) & M_EC_TYPE) 76 77#define S_EC_GEN 10 78#define V_EC_GEN(x) ((x) << S_EC_GEN) 79#define F_EC_GEN V_EC_GEN(1U) 80 81#define S_EC_UP_TOKEN 11 82#define M_EC_UP_TOKEN 0xFFFFF 83#define V_EC_UP_TOKEN(x) ((x) << S_EC_UP_TOKEN) 84#define G_EC_UP_TOKEN(x) (((x) >> S_EC_UP_TOKEN) & M_EC_UP_TOKEN) 85 86#define S_EC_VALID 31 87#define V_EC_VALID(x) ((x) << S_EC_VALID) 88#define F_EC_VALID V_EC_VALID(1U) 89 90#define S_RQ_MSI_VEC 20 91#define M_RQ_MSI_VEC 0x3F 92#define V_RQ_MSI_VEC(x) ((x) << S_RQ_MSI_VEC) 93#define G_RQ_MSI_VEC(x) (((x) >> S_RQ_MSI_VEC) & M_RQ_MSI_VEC) 94 95#define S_RQ_INTR_EN 26 96#define V_RQ_INTR_EN(x) ((x) << S_RQ_INTR_EN) 97#define F_RQ_INTR_EN V_RQ_INTR_EN(1U) 98 99#define S_RQ_GEN 28 100#define V_RQ_GEN(x) ((x) << S_RQ_GEN) 101#define F_RQ_GEN V_RQ_GEN(1U) 102 103#define S_CQ_INDEX 0 104#define M_CQ_INDEX 0xFFFF 105#define V_CQ_INDEX(x) ((x) << S_CQ_INDEX) 106#define G_CQ_INDEX(x) (((x) >> S_CQ_INDEX) & M_CQ_INDEX) 107 108#define S_CQ_SIZE 16 109#define M_CQ_SIZE 0xFFFF 110#define V_CQ_SIZE(x) ((x) << S_CQ_SIZE) 111#define G_CQ_SIZE(x) (((x) >> S_CQ_SIZE) & M_CQ_SIZE) 112 113#define S_CQ_BASE_HI 0 114#define M_CQ_BASE_HI 0xFFFFF 115#define V_CQ_BASE_HI(x) ((x) << S_CQ_BASE_HI) 116#define G_CQ_BASE_HI(x) (((x) >> S_CQ_BASE_HI) & M_CQ_BASE_HI) 117 118#define S_CQ_RSPQ 20 119#define M_CQ_RSPQ 0x3F 120#define V_CQ_RSPQ(x) ((x) << S_CQ_RSPQ) 121#define G_CQ_RSPQ(x) (((x) >> S_CQ_RSPQ) & M_CQ_RSPQ) 122 123#define S_CQ_ASYNC_NOTIF 26 124#define V_CQ_ASYNC_NOTIF(x) ((x) << S_CQ_ASYNC_NOTIF) 125#define F_CQ_ASYNC_NOTIF V_CQ_ASYNC_NOTIF(1U) 126 127#define S_CQ_ARMED 27 128#define V_CQ_ARMED(x) ((x) << S_CQ_ARMED) 129#define F_CQ_ARMED V_CQ_ARMED(1U) 130 131#define S_CQ_ASYNC_NOTIF_SOL 28 132#define V_CQ_ASYNC_NOTIF_SOL(x) ((x) << S_CQ_ASYNC_NOTIF_SOL) 133#define F_CQ_ASYNC_NOTIF_SOL V_CQ_ASYNC_NOTIF_SOL(1U) 134 135#define S_CQ_GEN 29 136#define V_CQ_GEN(x) ((x) << S_CQ_GEN) 137#define F_CQ_GEN V_CQ_GEN(1U) 138 139#define S_CQ_ERR 30 140#define V_CQ_ERR(x) ((x) << S_CQ_ERR) 141#define F_CQ_ERR V_CQ_ERR(1U) 142 143#define S_CQ_OVERFLOW_MODE 31 144#define V_CQ_OVERFLOW_MODE(x) ((x) << S_CQ_OVERFLOW_MODE) 145#define F_CQ_OVERFLOW_MODE V_CQ_OVERFLOW_MODE(1U) 146 147#define S_CQ_CREDITS 0 148#define M_CQ_CREDITS 0xFFFF 149#define V_CQ_CREDITS(x) ((x) << S_CQ_CREDITS) 150#define G_CQ_CREDITS(x) (((x) >> S_CQ_CREDITS) & M_CQ_CREDITS) 151 152#define S_CQ_CREDIT_THRES 16 153#define M_CQ_CREDIT_THRES 0x1FFF 154#define V_CQ_CREDIT_THRES(x) ((x) << S_CQ_CREDIT_THRES) 155#define G_CQ_CREDIT_THRES(x) (((x) >> S_CQ_CREDIT_THRES) & M_CQ_CREDIT_THRES) 156 157#define S_FL_BASE_HI 0 158#define M_FL_BASE_HI 0xFFFFF 159#define V_FL_BASE_HI(x) ((x) << S_FL_BASE_HI) 160#define G_FL_BASE_HI(x) (((x) >> S_FL_BASE_HI) & M_FL_BASE_HI) 161 162#define S_FL_INDEX_LO 20 163#define M_FL_INDEX_LO 0xFFF 164#define V_FL_INDEX_LO(x) ((x) << S_FL_INDEX_LO) 165#define G_FL_INDEX_LO(x) (((x) >> S_FL_INDEX_LO) & M_FL_INDEX_LO) 166 167#define S_FL_INDEX_HI 0 168#define M_FL_INDEX_HI 0xF 169#define V_FL_INDEX_HI(x) ((x) << S_FL_INDEX_HI) 170#define G_FL_INDEX_HI(x) (((x) >> S_FL_INDEX_HI) & M_FL_INDEX_HI) 171 172#define S_FL_SIZE 4 173#define M_FL_SIZE 0xFFFF 174#define V_FL_SIZE(x) ((x) << S_FL_SIZE) 175#define G_FL_SIZE(x) (((x) >> S_FL_SIZE) & M_FL_SIZE) 176 177#define S_FL_GEN 20 178#define V_FL_GEN(x) ((x) << S_FL_GEN) 179#define F_FL_GEN V_FL_GEN(1U) 180 181#define S_FL_ENTRY_SIZE_LO 21 182#define M_FL_ENTRY_SIZE_LO 0x7FF 183#define V_FL_ENTRY_SIZE_LO(x) ((x) << S_FL_ENTRY_SIZE_LO) 184#define G_FL_ENTRY_SIZE_LO(x) (((x) >> S_FL_ENTRY_SIZE_LO) & M_FL_ENTRY_SIZE_LO) 185 186#define S_FL_ENTRY_SIZE_HI 0 187#define M_FL_ENTRY_SIZE_HI 0x1FFFFF 188#define V_FL_ENTRY_SIZE_HI(x) ((x) << S_FL_ENTRY_SIZE_HI) 189#define G_FL_ENTRY_SIZE_HI(x) (((x) >> S_FL_ENTRY_SIZE_HI) & M_FL_ENTRY_SIZE_HI) 190 191#define S_FL_CONG_THRES 21 192#define M_FL_CONG_THRES 0x3FF 193#define V_FL_CONG_THRES(x) ((x) << S_FL_CONG_THRES) 194#define G_FL_CONG_THRES(x) (((x) >> S_FL_CONG_THRES) & M_FL_CONG_THRES) 195 196#define S_FL_GTS 31 197#define V_FL_GTS(x) ((x) << S_FL_GTS) 198#define F_FL_GTS V_FL_GTS(1U) 199 200#define S_FLD_GEN1 31 201#define V_FLD_GEN1(x) ((x) << S_FLD_GEN1) 202#define F_FLD_GEN1 V_FLD_GEN1(1U) 203 204#define S_FLD_GEN2 0 205#define V_FLD_GEN2(x) ((x) << S_FLD_GEN2) 206#define F_FLD_GEN2 V_FLD_GEN2(1U) 207 208#define S_RSPD_TXQ1_CR 0 209#define M_RSPD_TXQ1_CR 0x7F 210#define V_RSPD_TXQ1_CR(x) ((x) << S_RSPD_TXQ1_CR) 211#define G_RSPD_TXQ1_CR(x) (((x) >> S_RSPD_TXQ1_CR) & M_RSPD_TXQ1_CR) 212 213#define S_RSPD_TXQ1_GTS 7 214#define V_RSPD_TXQ1_GTS(x) ((x) << S_RSPD_TXQ1_GTS) 215#define F_RSPD_TXQ1_GTS V_RSPD_TXQ1_GTS(1U) 216 217#define S_RSPD_TXQ2_CR 8 218#define M_RSPD_TXQ2_CR 0x7F 219#define V_RSPD_TXQ2_CR(x) ((x) << S_RSPD_TXQ2_CR) 220#define G_RSPD_TXQ2_CR(x) (((x) >> S_RSPD_TXQ2_CR) & M_RSPD_TXQ2_CR) 221 222#define S_RSPD_TXQ2_GTS 15 223#define V_RSPD_TXQ2_GTS(x) ((x) << S_RSPD_TXQ2_GTS) 224#define F_RSPD_TXQ2_GTS V_RSPD_TXQ2_GTS(1U) 225 226#define S_RSPD_TXQ0_CR 16 227#define M_RSPD_TXQ0_CR 0x7F 228#define V_RSPD_TXQ0_CR(x) ((x) << S_RSPD_TXQ0_CR) 229#define G_RSPD_TXQ0_CR(x) (((x) >> S_RSPD_TXQ0_CR) & M_RSPD_TXQ0_CR) 230 231#define S_RSPD_TXQ0_GTS 23 232#define V_RSPD_TXQ0_GTS(x) ((x) << S_RSPD_TXQ0_GTS) 233#define F_RSPD_TXQ0_GTS V_RSPD_TXQ0_GTS(1U) 234 235#define S_RSPD_EOP 24 236#define V_RSPD_EOP(x) ((x) << S_RSPD_EOP) 237#define F_RSPD_EOP V_RSPD_EOP(1U) 238#define G_RSPD_EOP(x) ((x) & F_RSPD_EOP) 239 240#define S_RSPD_SOP 25 241#define V_RSPD_SOP(x) ((x) << S_RSPD_SOP) 242#define F_RSPD_SOP V_RSPD_SOP(1U) 243#define G_RSPD_SOP(x) ((x) & F_RSPD_SOP) 244 245#define G_RSPD_SOP_EOP(x) ((G_RSPD_SOP(x) | G_RSPD_EOP(x)) >> S_RSPD_EOP) 246 247#define S_RSPD_ASYNC_NOTIF 26 248#define V_RSPD_ASYNC_NOTIF(x) ((x) << S_RSPD_ASYNC_NOTIF) 249#define F_RSPD_ASYNC_NOTIF V_RSPD_ASYNC_NOTIF(1U) 250 251#define S_RSPD_FL0_GTS 27 252#define V_RSPD_FL0_GTS(x) ((x) << S_RSPD_FL0_GTS) 253#define F_RSPD_FL0_GTS V_RSPD_FL0_GTS(1U) 254 255#define S_RSPD_FL1_GTS 28 256#define V_RSPD_FL1_GTS(x) ((x) << S_RSPD_FL1_GTS) 257#define F_RSPD_FL1_GTS V_RSPD_FL1_GTS(1U) 258 259#define S_RSPD_IMM_DATA_VALID 29 260#define V_RSPD_IMM_DATA_VALID(x) ((x) << S_RSPD_IMM_DATA_VALID) 261#define F_RSPD_IMM_DATA_VALID V_RSPD_IMM_DATA_VALID(1U) 262 263#define S_RSPD_OFFLOAD 30 264#define V_RSPD_OFFLOAD(x) ((x) << S_RSPD_OFFLOAD) 265#define F_RSPD_OFFLOAD V_RSPD_OFFLOAD(1U) 266 267#define S_RSPD_GEN1 31 268#define V_RSPD_GEN1(x) ((x) << S_RSPD_GEN1) 269#define F_RSPD_GEN1 V_RSPD_GEN1(1U) 270 271#define S_RSPD_LEN 0 272#define M_RSPD_LEN 0x7FFFFFFF 273#define V_RSPD_LEN(x) ((x) << S_RSPD_LEN) 274#define G_RSPD_LEN(x) (((x) >> S_RSPD_LEN) & M_RSPD_LEN) 275 276#define S_RSPD_FLQ 31 277#define V_RSPD_FLQ(x) ((x) << S_RSPD_FLQ) 278#define F_RSPD_FLQ V_RSPD_FLQ(1U) 279 280#define S_RSPD_GEN2 0 281#define V_RSPD_GEN2(x) ((x) << S_RSPD_GEN2) 282#define F_RSPD_GEN2 V_RSPD_GEN2(1U) 283 284#define S_RSPD_INR_VEC 1 285#define M_RSPD_INR_VEC 0x7F 286#define V_RSPD_INR_VEC(x) ((x) << S_RSPD_INR_VEC) 287#define G_RSPD_INR_VEC(x) (((x) >> S_RSPD_INR_VEC) & M_RSPD_INR_VEC) 288 289#endif /* _SGE_DEFS_H */ 290