1 /*- 2 * Copyright (c) 2012 Chelsio Communications, Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * 14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 * $FreeBSD$ 27 * 28 */ 29 30 #ifndef _T4FW_INTERFACE_H_ 31 #define _T4FW_INTERFACE_H_ 32 33 /****************************************************************************** 34 * R E T U R N V A L U E S 35 ********************************/ 36 37 enum fw_retval { 38 FW_SUCCESS = 0, /* completed sucessfully */ 39 FW_EPERM = 1, /* operation not permitted */ 40 FW_ENOENT = 2, /* no such file or directory */ 41 FW_EIO = 5, /* input/output error; hw bad */ 42 FW_ENOEXEC = 8, /* exec format error; inv microcode */ 43 FW_EAGAIN = 11, /* try again */ 44 FW_ENOMEM = 12, /* out of memory */ 45 FW_EFAULT = 14, /* bad address; fw bad */ 46 FW_EBUSY = 16, /* resource busy */ 47 FW_EEXIST = 17, /* file exists */ 48 FW_ENODEV = 19, /* no such device */ 49 FW_EINVAL = 22, /* invalid argument */ 50 FW_ENOSPC = 28, /* no space left on device */ 51 FW_ENOSYS = 38, /* functionality not implemented */ 52 FW_ENODATA = 61, /* no data available */ 53 FW_EPROTO = 71, /* protocol error */ 54 FW_EADDRINUSE = 98, /* address already in use */ 55 FW_EADDRNOTAVAIL = 99, /* cannot assigned requested address */ 56 FW_ENETDOWN = 100, /* network is down */ 57 FW_ENETUNREACH = 101, /* network is unreachable */ 58 FW_ENOBUFS = 105, /* no buffer space available */ 59 FW_ETIMEDOUT = 110, /* timeout */ 60 FW_EINPROGRESS = 115, /* fw internal */ 61 FW_SCSI_ABORT_REQUESTED = 128, /* */ 62 FW_SCSI_ABORT_TIMEDOUT = 129, /* */ 63 FW_SCSI_ABORTED = 130, /* */ 64 FW_SCSI_CLOSE_REQUESTED = 131, /* */ 65 FW_ERR_LINK_DOWN = 132, /* */ 66 FW_RDEV_NOT_READY = 133, /* */ 67 FW_ERR_RDEV_LOST = 134, /* */ 68 FW_ERR_RDEV_LOGO = 135, /* */ 69 FW_FCOE_NO_XCHG = 136, /* */ 70 FW_SCSI_RSP_ERR = 137, /* */ 71 FW_ERR_RDEV_IMPL_LOGO = 138, /* */ 72 FW_SCSI_UNDER_FLOW_ERR = 139, /* */ 73 FW_SCSI_OVER_FLOW_ERR = 140, /* */ 74 FW_SCSI_DDP_ERR = 141, /* DDP error*/ 75 FW_SCSI_TASK_ERR = 142, /* No SCSI tasks available */ 76 }; 77 78 /****************************************************************************** 79 * W O R K R E Q U E S T s 80 ********************************/ 81 82 enum fw_wr_opcodes { 83 FW_FRAG_WR = 0x1d, 84 FW_FILTER_WR = 0x02, 85 FW_ULPTX_WR = 0x04, 86 FW_TP_WR = 0x05, 87 FW_ETH_TX_PKT_WR = 0x08, 88 FW_ETH_TX_PKTS_WR = 0x09, 89 FW_ETH_TX_UO_WR = 0x1c, 90 FW_EQ_FLUSH_WR = 0x1b, 91 FW_OFLD_CONNECTION_WR = 0x2f, 92 FW_FLOWC_WR = 0x0a, 93 FW_OFLD_TX_DATA_WR = 0x0b, 94 FW_CMD_WR = 0x10, 95 FW_ETH_TX_PKT_VM_WR = 0x11, 96 FW_RI_RES_WR = 0x0c, 97 FW_RI_RDMA_WRITE_WR = 0x14, 98 FW_RI_SEND_WR = 0x15, 99 FW_RI_RDMA_READ_WR = 0x16, 100 FW_RI_RECV_WR = 0x17, 101 FW_RI_BIND_MW_WR = 0x18, 102 FW_RI_FR_NSMR_WR = 0x19, 103 FW_RI_INV_LSTAG_WR = 0x1a, 104 FW_RI_SEND_IMMEDIATE_WR = 0x15, 105 FW_RI_ATOMIC_WR = 0x16, 106 FW_RI_WR = 0x0d, 107 FW_CHNET_IFCONF_WR = 0x6b, 108 FW_RDEV_WR = 0x38, 109 FW_FOISCSI_NODE_WR = 0x60, 110 FW_FOISCSI_CTRL_WR = 0x6a, 111 FW_FOISCSI_CHAP_WR = 0x6c, 112 FW_FCOE_ELS_CT_WR = 0x30, 113 FW_SCSI_WRITE_WR = 0x31, 114 FW_SCSI_READ_WR = 0x32, 115 FW_SCSI_CMD_WR = 0x33, 116 FW_SCSI_ABRT_CLS_WR = 0x34, 117 FW_SCSI_TGT_ACC_WR = 0x35, 118 FW_SCSI_TGT_XMIT_WR = 0x36, 119 FW_SCSI_TGT_RSP_WR = 0x37, 120 FW_POFCOE_TCB_WR = 0x42, 121 FW_POFCOE_ULPTX_WR = 0x43, 122 FW_LASTC2E_WR = 0x70 123 }; 124 125 /* 126 * Generic work request header flit0 127 */ 128 struct fw_wr_hdr { 129 __be32 hi; 130 __be32 lo; 131 }; 132 133 /* work request opcode (hi) 134 */ 135 #define S_FW_WR_OP 24 136 #define M_FW_WR_OP 0xff 137 #define V_FW_WR_OP(x) ((x) << S_FW_WR_OP) 138 #define G_FW_WR_OP(x) (((x) >> S_FW_WR_OP) & M_FW_WR_OP) 139 140 /* atomic flag (hi) - firmware encapsulates CPLs in CPL_BARRIER 141 */ 142 #define S_FW_WR_ATOMIC 23 143 #define M_FW_WR_ATOMIC 0x1 144 #define V_FW_WR_ATOMIC(x) ((x) << S_FW_WR_ATOMIC) 145 #define G_FW_WR_ATOMIC(x) \ 146 (((x) >> S_FW_WR_ATOMIC) & M_FW_WR_ATOMIC) 147 #define F_FW_WR_ATOMIC V_FW_WR_ATOMIC(1U) 148 149 /* flush flag (hi) - firmware flushes flushable work request buffered 150 * in the flow context. 151 */ 152 #define S_FW_WR_FLUSH 22 153 #define M_FW_WR_FLUSH 0x1 154 #define V_FW_WR_FLUSH(x) ((x) << S_FW_WR_FLUSH) 155 #define G_FW_WR_FLUSH(x) \ 156 (((x) >> S_FW_WR_FLUSH) & M_FW_WR_FLUSH) 157 #define F_FW_WR_FLUSH V_FW_WR_FLUSH(1U) 158 159 /* completion flag (hi) - firmware generates a cpl_fw6_ack 160 */ 161 #define S_FW_WR_COMPL 21 162 #define M_FW_WR_COMPL 0x1 163 #define V_FW_WR_COMPL(x) ((x) << S_FW_WR_COMPL) 164 #define G_FW_WR_COMPL(x) \ 165 (((x) >> S_FW_WR_COMPL) & M_FW_WR_COMPL) 166 #define F_FW_WR_COMPL V_FW_WR_COMPL(1U) 167 168 169 /* work request immediate data lengh (hi) 170 */ 171 #define S_FW_WR_IMMDLEN 0 172 #define M_FW_WR_IMMDLEN 0xff 173 #define V_FW_WR_IMMDLEN(x) ((x) << S_FW_WR_IMMDLEN) 174 #define G_FW_WR_IMMDLEN(x) \ 175 (((x) >> S_FW_WR_IMMDLEN) & M_FW_WR_IMMDLEN) 176 177 /* egress queue status update to associated ingress queue entry (lo) 178 */ 179 #define S_FW_WR_EQUIQ 31 180 #define M_FW_WR_EQUIQ 0x1 181 #define V_FW_WR_EQUIQ(x) ((x) << S_FW_WR_EQUIQ) 182 #define G_FW_WR_EQUIQ(x) (((x) >> S_FW_WR_EQUIQ) & M_FW_WR_EQUIQ) 183 #define F_FW_WR_EQUIQ V_FW_WR_EQUIQ(1U) 184 185 /* egress queue status update to egress queue status entry (lo) 186 */ 187 #define S_FW_WR_EQUEQ 30 188 #define M_FW_WR_EQUEQ 0x1 189 #define V_FW_WR_EQUEQ(x) ((x) << S_FW_WR_EQUEQ) 190 #define G_FW_WR_EQUEQ(x) (((x) >> S_FW_WR_EQUEQ) & M_FW_WR_EQUEQ) 191 #define F_FW_WR_EQUEQ V_FW_WR_EQUEQ(1U) 192 193 /* flow context identifier (lo) 194 */ 195 #define S_FW_WR_FLOWID 8 196 #define M_FW_WR_FLOWID 0xfffff 197 #define V_FW_WR_FLOWID(x) ((x) << S_FW_WR_FLOWID) 198 #define G_FW_WR_FLOWID(x) (((x) >> S_FW_WR_FLOWID) & M_FW_WR_FLOWID) 199 200 /* length in units of 16-bytes (lo) 201 */ 202 #define S_FW_WR_LEN16 0 203 #define M_FW_WR_LEN16 0xff 204 #define V_FW_WR_LEN16(x) ((x) << S_FW_WR_LEN16) 205 #define G_FW_WR_LEN16(x) (((x) >> S_FW_WR_LEN16) & M_FW_WR_LEN16) 206 207 struct fw_frag_wr { 208 __be32 op_to_fragoff16; 209 __be32 flowid_len16; 210 __be64 r4; 211 }; 212 213 #define S_FW_FRAG_WR_EOF 15 214 #define M_FW_FRAG_WR_EOF 0x1 215 #define V_FW_FRAG_WR_EOF(x) ((x) << S_FW_FRAG_WR_EOF) 216 #define G_FW_FRAG_WR_EOF(x) (((x) >> S_FW_FRAG_WR_EOF) & M_FW_FRAG_WR_EOF) 217 #define F_FW_FRAG_WR_EOF V_FW_FRAG_WR_EOF(1U) 218 219 #define S_FW_FRAG_WR_FRAGOFF16 8 220 #define M_FW_FRAG_WR_FRAGOFF16 0x7f 221 #define V_FW_FRAG_WR_FRAGOFF16(x) ((x) << S_FW_FRAG_WR_FRAGOFF16) 222 #define G_FW_FRAG_WR_FRAGOFF16(x) \ 223 (((x) >> S_FW_FRAG_WR_FRAGOFF16) & M_FW_FRAG_WR_FRAGOFF16) 224 225 /* valid filter configurations for compressed tuple 226 * Encodings: TPL - Compressed TUPLE for filter in addition to 4-tuple 227 * FR - FRAGMENT, FC - FCoE, MT - MPS MATCH TYPE, M - MPS MATCH, 228 * E - Ethertype, P - Port, PR - Protocol, T - TOS, IV - Inner VLAN, 229 * OV - Outer VLAN/VNIC_ID, 230 */ 231 #define HW_TPL_FR_MT_M_E_P_FC 0x3C3 232 #define HW_TPL_FR_MT_M_PR_T_FC 0x3B3 233 #define HW_TPL_FR_MT_M_IV_P_FC 0x38B 234 #define HW_TPL_FR_MT_M_OV_P_FC 0x387 235 #define HW_TPL_FR_MT_E_PR_T 0x370 236 #define HW_TPL_FR_MT_E_PR_P_FC 0X363 237 #define HW_TPL_FR_MT_E_T_P_FC 0X353 238 #define HW_TPL_FR_MT_PR_IV_P_FC 0X32B 239 #define HW_TPL_FR_MT_PR_OV_P_FC 0X327 240 #define HW_TPL_FR_MT_T_IV_P_FC 0X31B 241 #define HW_TPL_FR_MT_T_OV_P_FC 0X317 242 #define HW_TPL_FR_M_E_PR_FC 0X2E1 243 #define HW_TPL_FR_M_E_T_FC 0X2D1 244 #define HW_TPL_FR_M_PR_IV_FC 0X2A9 245 #define HW_TPL_FR_M_PR_OV_FC 0X2A5 246 #define HW_TPL_FR_M_T_IV_FC 0X299 247 #define HW_TPL_FR_M_T_OV_FC 0X295 248 #define HW_TPL_FR_E_PR_T_P 0X272 249 #define HW_TPL_FR_E_PR_T_FC 0X271 250 #define HW_TPL_FR_E_IV_FC 0X249 251 #define HW_TPL_FR_E_OV_FC 0X245 252 #define HW_TPL_FR_PR_T_IV_FC 0X239 253 #define HW_TPL_FR_PR_T_OV_FC 0X235 254 #define HW_TPL_FR_IV_OV_FC 0X20D 255 #define HW_TPL_MT_M_E_PR 0X1E0 256 #define HW_TPL_MT_M_E_T 0X1D0 257 #define HW_TPL_MT_E_PR_T_FC 0X171 258 #define HW_TPL_MT_E_IV 0X148 259 #define HW_TPL_MT_E_OV 0X144 260 #define HW_TPL_MT_PR_T_IV 0X138 261 #define HW_TPL_MT_PR_T_OV 0X134 262 #define HW_TPL_M_E_PR_P 0X0E2 263 #define HW_TPL_M_E_T_P 0X0D2 264 #define HW_TPL_E_PR_T_P_FC 0X073 265 #define HW_TPL_E_IV_P 0X04A 266 #define HW_TPL_E_OV_P 0X046 267 #define HW_TPL_PR_T_IV_P 0X03A 268 #define HW_TPL_PR_T_OV_P 0X036 269 270 /* filter wr reply code in cookie in CPL_SET_TCB_RPL */ 271 enum fw_filter_wr_cookie { 272 FW_FILTER_WR_SUCCESS, 273 FW_FILTER_WR_FLT_ADDED, 274 FW_FILTER_WR_FLT_DELETED, 275 FW_FILTER_WR_SMT_TBL_FULL, 276 FW_FILTER_WR_EINVAL, 277 }; 278 279 struct fw_filter_wr { 280 __be32 op_pkd; 281 __be32 len16_pkd; 282 __be64 r3; 283 __be32 tid_to_iq; 284 __be32 del_filter_to_l2tix; 285 __be16 ethtype; 286 __be16 ethtypem; 287 __u8 frag_to_ovlan_vldm; 288 __u8 smac_sel; 289 __be16 rx_chan_rx_rpl_iq; 290 __be32 maci_to_matchtypem; 291 __u8 ptcl; 292 __u8 ptclm; 293 __u8 ttyp; 294 __u8 ttypm; 295 __be16 ivlan; 296 __be16 ivlanm; 297 __be16 ovlan; 298 __be16 ovlanm; 299 __u8 lip[16]; 300 __u8 lipm[16]; 301 __u8 fip[16]; 302 __u8 fipm[16]; 303 __be16 lp; 304 __be16 lpm; 305 __be16 fp; 306 __be16 fpm; 307 __be16 r7; 308 __u8 sma[6]; 309 }; 310 311 #define S_FW_FILTER_WR_TID 12 312 #define M_FW_FILTER_WR_TID 0xfffff 313 #define V_FW_FILTER_WR_TID(x) ((x) << S_FW_FILTER_WR_TID) 314 #define G_FW_FILTER_WR_TID(x) \ 315 (((x) >> S_FW_FILTER_WR_TID) & M_FW_FILTER_WR_TID) 316 317 #define S_FW_FILTER_WR_RQTYPE 11 318 #define M_FW_FILTER_WR_RQTYPE 0x1 319 #define V_FW_FILTER_WR_RQTYPE(x) ((x) << S_FW_FILTER_WR_RQTYPE) 320 #define G_FW_FILTER_WR_RQTYPE(x) \ 321 (((x) >> S_FW_FILTER_WR_RQTYPE) & M_FW_FILTER_WR_RQTYPE) 322 #define F_FW_FILTER_WR_RQTYPE V_FW_FILTER_WR_RQTYPE(1U) 323 324 #define S_FW_FILTER_WR_NOREPLY 10 325 #define M_FW_FILTER_WR_NOREPLY 0x1 326 #define V_FW_FILTER_WR_NOREPLY(x) ((x) << S_FW_FILTER_WR_NOREPLY) 327 #define G_FW_FILTER_WR_NOREPLY(x) \ 328 (((x) >> S_FW_FILTER_WR_NOREPLY) & M_FW_FILTER_WR_NOREPLY) 329 #define F_FW_FILTER_WR_NOREPLY V_FW_FILTER_WR_NOREPLY(1U) 330 331 #define S_FW_FILTER_WR_IQ 0 332 #define M_FW_FILTER_WR_IQ 0x3ff 333 #define V_FW_FILTER_WR_IQ(x) ((x) << S_FW_FILTER_WR_IQ) 334 #define G_FW_FILTER_WR_IQ(x) \ 335 (((x) >> S_FW_FILTER_WR_IQ) & M_FW_FILTER_WR_IQ) 336 337 #define S_FW_FILTER_WR_DEL_FILTER 31 338 #define M_FW_FILTER_WR_DEL_FILTER 0x1 339 #define V_FW_FILTER_WR_DEL_FILTER(x) ((x) << S_FW_FILTER_WR_DEL_FILTER) 340 #define G_FW_FILTER_WR_DEL_FILTER(x) \ 341 (((x) >> S_FW_FILTER_WR_DEL_FILTER) & M_FW_FILTER_WR_DEL_FILTER) 342 #define F_FW_FILTER_WR_DEL_FILTER V_FW_FILTER_WR_DEL_FILTER(1U) 343 344 #define S_FW_FILTER_WR_RPTTID 25 345 #define M_FW_FILTER_WR_RPTTID 0x1 346 #define V_FW_FILTER_WR_RPTTID(x) ((x) << S_FW_FILTER_WR_RPTTID) 347 #define G_FW_FILTER_WR_RPTTID(x) \ 348 (((x) >> S_FW_FILTER_WR_RPTTID) & M_FW_FILTER_WR_RPTTID) 349 #define F_FW_FILTER_WR_RPTTID V_FW_FILTER_WR_RPTTID(1U) 350 351 #define S_FW_FILTER_WR_DROP 24 352 #define M_FW_FILTER_WR_DROP 0x1 353 #define V_FW_FILTER_WR_DROP(x) ((x) << S_FW_FILTER_WR_DROP) 354 #define G_FW_FILTER_WR_DROP(x) \ 355 (((x) >> S_FW_FILTER_WR_DROP) & M_FW_FILTER_WR_DROP) 356 #define F_FW_FILTER_WR_DROP V_FW_FILTER_WR_DROP(1U) 357 358 #define S_FW_FILTER_WR_DIRSTEER 23 359 #define M_FW_FILTER_WR_DIRSTEER 0x1 360 #define V_FW_FILTER_WR_DIRSTEER(x) ((x) << S_FW_FILTER_WR_DIRSTEER) 361 #define G_FW_FILTER_WR_DIRSTEER(x) \ 362 (((x) >> S_FW_FILTER_WR_DIRSTEER) & M_FW_FILTER_WR_DIRSTEER) 363 #define F_FW_FILTER_WR_DIRSTEER V_FW_FILTER_WR_DIRSTEER(1U) 364 365 #define S_FW_FILTER_WR_MASKHASH 22 366 #define M_FW_FILTER_WR_MASKHASH 0x1 367 #define V_FW_FILTER_WR_MASKHASH(x) ((x) << S_FW_FILTER_WR_MASKHASH) 368 #define G_FW_FILTER_WR_MASKHASH(x) \ 369 (((x) >> S_FW_FILTER_WR_MASKHASH) & M_FW_FILTER_WR_MASKHASH) 370 #define F_FW_FILTER_WR_MASKHASH V_FW_FILTER_WR_MASKHASH(1U) 371 372 #define S_FW_FILTER_WR_DIRSTEERHASH 21 373 #define M_FW_FILTER_WR_DIRSTEERHASH 0x1 374 #define V_FW_FILTER_WR_DIRSTEERHASH(x) ((x) << S_FW_FILTER_WR_DIRSTEERHASH) 375 #define G_FW_FILTER_WR_DIRSTEERHASH(x) \ 376 (((x) >> S_FW_FILTER_WR_DIRSTEERHASH) & M_FW_FILTER_WR_DIRSTEERHASH) 377 #define F_FW_FILTER_WR_DIRSTEERHASH V_FW_FILTER_WR_DIRSTEERHASH(1U) 378 379 #define S_FW_FILTER_WR_LPBK 20 380 #define M_FW_FILTER_WR_LPBK 0x1 381 #define V_FW_FILTER_WR_LPBK(x) ((x) << S_FW_FILTER_WR_LPBK) 382 #define G_FW_FILTER_WR_LPBK(x) \ 383 (((x) >> S_FW_FILTER_WR_LPBK) & M_FW_FILTER_WR_LPBK) 384 #define F_FW_FILTER_WR_LPBK V_FW_FILTER_WR_LPBK(1U) 385 386 #define S_FW_FILTER_WR_DMAC 19 387 #define M_FW_FILTER_WR_DMAC 0x1 388 #define V_FW_FILTER_WR_DMAC(x) ((x) << S_FW_FILTER_WR_DMAC) 389 #define G_FW_FILTER_WR_DMAC(x) \ 390 (((x) >> S_FW_FILTER_WR_DMAC) & M_FW_FILTER_WR_DMAC) 391 #define F_FW_FILTER_WR_DMAC V_FW_FILTER_WR_DMAC(1U) 392 393 #define S_FW_FILTER_WR_SMAC 18 394 #define M_FW_FILTER_WR_SMAC 0x1 395 #define V_FW_FILTER_WR_SMAC(x) ((x) << S_FW_FILTER_WR_SMAC) 396 #define G_FW_FILTER_WR_SMAC(x) \ 397 (((x) >> S_FW_FILTER_WR_SMAC) & M_FW_FILTER_WR_SMAC) 398 #define F_FW_FILTER_WR_SMAC V_FW_FILTER_WR_SMAC(1U) 399 400 #define S_FW_FILTER_WR_INSVLAN 17 401 #define M_FW_FILTER_WR_INSVLAN 0x1 402 #define V_FW_FILTER_WR_INSVLAN(x) ((x) << S_FW_FILTER_WR_INSVLAN) 403 #define G_FW_FILTER_WR_INSVLAN(x) \ 404 (((x) >> S_FW_FILTER_WR_INSVLAN) & M_FW_FILTER_WR_INSVLAN) 405 #define F_FW_FILTER_WR_INSVLAN V_FW_FILTER_WR_INSVLAN(1U) 406 407 #define S_FW_FILTER_WR_RMVLAN 16 408 #define M_FW_FILTER_WR_RMVLAN 0x1 409 #define V_FW_FILTER_WR_RMVLAN(x) ((x) << S_FW_FILTER_WR_RMVLAN) 410 #define G_FW_FILTER_WR_RMVLAN(x) \ 411 (((x) >> S_FW_FILTER_WR_RMVLAN) & M_FW_FILTER_WR_RMVLAN) 412 #define F_FW_FILTER_WR_RMVLAN V_FW_FILTER_WR_RMVLAN(1U) 413 414 #define S_FW_FILTER_WR_HITCNTS 15 415 #define M_FW_FILTER_WR_HITCNTS 0x1 416 #define V_FW_FILTER_WR_HITCNTS(x) ((x) << S_FW_FILTER_WR_HITCNTS) 417 #define G_FW_FILTER_WR_HITCNTS(x) \ 418 (((x) >> S_FW_FILTER_WR_HITCNTS) & M_FW_FILTER_WR_HITCNTS) 419 #define F_FW_FILTER_WR_HITCNTS V_FW_FILTER_WR_HITCNTS(1U) 420 421 #define S_FW_FILTER_WR_TXCHAN 13 422 #define M_FW_FILTER_WR_TXCHAN 0x3 423 #define V_FW_FILTER_WR_TXCHAN(x) ((x) << S_FW_FILTER_WR_TXCHAN) 424 #define G_FW_FILTER_WR_TXCHAN(x) \ 425 (((x) >> S_FW_FILTER_WR_TXCHAN) & M_FW_FILTER_WR_TXCHAN) 426 427 #define S_FW_FILTER_WR_PRIO 12 428 #define M_FW_FILTER_WR_PRIO 0x1 429 #define V_FW_FILTER_WR_PRIO(x) ((x) << S_FW_FILTER_WR_PRIO) 430 #define G_FW_FILTER_WR_PRIO(x) \ 431 (((x) >> S_FW_FILTER_WR_PRIO) & M_FW_FILTER_WR_PRIO) 432 #define F_FW_FILTER_WR_PRIO V_FW_FILTER_WR_PRIO(1U) 433 434 #define S_FW_FILTER_WR_L2TIX 0 435 #define M_FW_FILTER_WR_L2TIX 0xfff 436 #define V_FW_FILTER_WR_L2TIX(x) ((x) << S_FW_FILTER_WR_L2TIX) 437 #define G_FW_FILTER_WR_L2TIX(x) \ 438 (((x) >> S_FW_FILTER_WR_L2TIX) & M_FW_FILTER_WR_L2TIX) 439 440 #define S_FW_FILTER_WR_FRAG 7 441 #define M_FW_FILTER_WR_FRAG 0x1 442 #define V_FW_FILTER_WR_FRAG(x) ((x) << S_FW_FILTER_WR_FRAG) 443 #define G_FW_FILTER_WR_FRAG(x) \ 444 (((x) >> S_FW_FILTER_WR_FRAG) & M_FW_FILTER_WR_FRAG) 445 #define F_FW_FILTER_WR_FRAG V_FW_FILTER_WR_FRAG(1U) 446 447 #define S_FW_FILTER_WR_FRAGM 6 448 #define M_FW_FILTER_WR_FRAGM 0x1 449 #define V_FW_FILTER_WR_FRAGM(x) ((x) << S_FW_FILTER_WR_FRAGM) 450 #define G_FW_FILTER_WR_FRAGM(x) \ 451 (((x) >> S_FW_FILTER_WR_FRAGM) & M_FW_FILTER_WR_FRAGM) 452 #define F_FW_FILTER_WR_FRAGM V_FW_FILTER_WR_FRAGM(1U) 453 454 #define S_FW_FILTER_WR_IVLAN_VLD 5 455 #define M_FW_FILTER_WR_IVLAN_VLD 0x1 456 #define V_FW_FILTER_WR_IVLAN_VLD(x) ((x) << S_FW_FILTER_WR_IVLAN_VLD) 457 #define G_FW_FILTER_WR_IVLAN_VLD(x) \ 458 (((x) >> S_FW_FILTER_WR_IVLAN_VLD) & M_FW_FILTER_WR_IVLAN_VLD) 459 #define F_FW_FILTER_WR_IVLAN_VLD V_FW_FILTER_WR_IVLAN_VLD(1U) 460 461 #define S_FW_FILTER_WR_OVLAN_VLD 4 462 #define M_FW_FILTER_WR_OVLAN_VLD 0x1 463 #define V_FW_FILTER_WR_OVLAN_VLD(x) ((x) << S_FW_FILTER_WR_OVLAN_VLD) 464 #define G_FW_FILTER_WR_OVLAN_VLD(x) \ 465 (((x) >> S_FW_FILTER_WR_OVLAN_VLD) & M_FW_FILTER_WR_OVLAN_VLD) 466 #define F_FW_FILTER_WR_OVLAN_VLD V_FW_FILTER_WR_OVLAN_VLD(1U) 467 468 #define S_FW_FILTER_WR_IVLAN_VLDM 3 469 #define M_FW_FILTER_WR_IVLAN_VLDM 0x1 470 #define V_FW_FILTER_WR_IVLAN_VLDM(x) ((x) << S_FW_FILTER_WR_IVLAN_VLDM) 471 #define G_FW_FILTER_WR_IVLAN_VLDM(x) \ 472 (((x) >> S_FW_FILTER_WR_IVLAN_VLDM) & M_FW_FILTER_WR_IVLAN_VLDM) 473 #define F_FW_FILTER_WR_IVLAN_VLDM V_FW_FILTER_WR_IVLAN_VLDM(1U) 474 475 #define S_FW_FILTER_WR_OVLAN_VLDM 2 476 #define M_FW_FILTER_WR_OVLAN_VLDM 0x1 477 #define V_FW_FILTER_WR_OVLAN_VLDM(x) ((x) << S_FW_FILTER_WR_OVLAN_VLDM) 478 #define G_FW_FILTER_WR_OVLAN_VLDM(x) \ 479 (((x) >> S_FW_FILTER_WR_OVLAN_VLDM) & M_FW_FILTER_WR_OVLAN_VLDM) 480 #define F_FW_FILTER_WR_OVLAN_VLDM V_FW_FILTER_WR_OVLAN_VLDM(1U) 481 482 #define S_FW_FILTER_WR_RX_CHAN 15 483 #define M_FW_FILTER_WR_RX_CHAN 0x1 484 #define V_FW_FILTER_WR_RX_CHAN(x) ((x) << S_FW_FILTER_WR_RX_CHAN) 485 #define G_FW_FILTER_WR_RX_CHAN(x) \ 486 (((x) >> S_FW_FILTER_WR_RX_CHAN) & M_FW_FILTER_WR_RX_CHAN) 487 #define F_FW_FILTER_WR_RX_CHAN V_FW_FILTER_WR_RX_CHAN(1U) 488 489 #define S_FW_FILTER_WR_RX_RPL_IQ 0 490 #define M_FW_FILTER_WR_RX_RPL_IQ 0x3ff 491 #define V_FW_FILTER_WR_RX_RPL_IQ(x) ((x) << S_FW_FILTER_WR_RX_RPL_IQ) 492 #define G_FW_FILTER_WR_RX_RPL_IQ(x) \ 493 (((x) >> S_FW_FILTER_WR_RX_RPL_IQ) & M_FW_FILTER_WR_RX_RPL_IQ) 494 495 #define S_FW_FILTER_WR_MACI 23 496 #define M_FW_FILTER_WR_MACI 0x1ff 497 #define V_FW_FILTER_WR_MACI(x) ((x) << S_FW_FILTER_WR_MACI) 498 #define G_FW_FILTER_WR_MACI(x) \ 499 (((x) >> S_FW_FILTER_WR_MACI) & M_FW_FILTER_WR_MACI) 500 501 #define S_FW_FILTER_WR_MACIM 14 502 #define M_FW_FILTER_WR_MACIM 0x1ff 503 #define V_FW_FILTER_WR_MACIM(x) ((x) << S_FW_FILTER_WR_MACIM) 504 #define G_FW_FILTER_WR_MACIM(x) \ 505 (((x) >> S_FW_FILTER_WR_MACIM) & M_FW_FILTER_WR_MACIM) 506 507 #define S_FW_FILTER_WR_FCOE 13 508 #define M_FW_FILTER_WR_FCOE 0x1 509 #define V_FW_FILTER_WR_FCOE(x) ((x) << S_FW_FILTER_WR_FCOE) 510 #define G_FW_FILTER_WR_FCOE(x) \ 511 (((x) >> S_FW_FILTER_WR_FCOE) & M_FW_FILTER_WR_FCOE) 512 #define F_FW_FILTER_WR_FCOE V_FW_FILTER_WR_FCOE(1U) 513 514 #define S_FW_FILTER_WR_FCOEM 12 515 #define M_FW_FILTER_WR_FCOEM 0x1 516 #define V_FW_FILTER_WR_FCOEM(x) ((x) << S_FW_FILTER_WR_FCOEM) 517 #define G_FW_FILTER_WR_FCOEM(x) \ 518 (((x) >> S_FW_FILTER_WR_FCOEM) & M_FW_FILTER_WR_FCOEM) 519 #define F_FW_FILTER_WR_FCOEM V_FW_FILTER_WR_FCOEM(1U) 520 521 #define S_FW_FILTER_WR_PORT 9 522 #define M_FW_FILTER_WR_PORT 0x7 523 #define V_FW_FILTER_WR_PORT(x) ((x) << S_FW_FILTER_WR_PORT) 524 #define G_FW_FILTER_WR_PORT(x) \ 525 (((x) >> S_FW_FILTER_WR_PORT) & M_FW_FILTER_WR_PORT) 526 527 #define S_FW_FILTER_WR_PORTM 6 528 #define M_FW_FILTER_WR_PORTM 0x7 529 #define V_FW_FILTER_WR_PORTM(x) ((x) << S_FW_FILTER_WR_PORTM) 530 #define G_FW_FILTER_WR_PORTM(x) \ 531 (((x) >> S_FW_FILTER_WR_PORTM) & M_FW_FILTER_WR_PORTM) 532 533 #define S_FW_FILTER_WR_MATCHTYPE 3 534 #define M_FW_FILTER_WR_MATCHTYPE 0x7 535 #define V_FW_FILTER_WR_MATCHTYPE(x) ((x) << S_FW_FILTER_WR_MATCHTYPE) 536 #define G_FW_FILTER_WR_MATCHTYPE(x) \ 537 (((x) >> S_FW_FILTER_WR_MATCHTYPE) & M_FW_FILTER_WR_MATCHTYPE) 538 539 #define S_FW_FILTER_WR_MATCHTYPEM 0 540 #define M_FW_FILTER_WR_MATCHTYPEM 0x7 541 #define V_FW_FILTER_WR_MATCHTYPEM(x) ((x) << S_FW_FILTER_WR_MATCHTYPEM) 542 #define G_FW_FILTER_WR_MATCHTYPEM(x) \ 543 (((x) >> S_FW_FILTER_WR_MATCHTYPEM) & M_FW_FILTER_WR_MATCHTYPEM) 544 545 struct fw_ulptx_wr { 546 __be32 op_to_compl; 547 __be32 flowid_len16; 548 __u64 cookie; 549 }; 550 551 struct fw_tp_wr { 552 __be32 op_to_immdlen; 553 __be32 flowid_len16; 554 __u64 cookie; 555 }; 556 557 struct fw_eth_tx_pkt_wr { 558 __be32 op_immdlen; 559 __be32 equiq_to_len16; 560 __be64 r3; 561 }; 562 563 #define S_FW_ETH_TX_PKT_WR_IMMDLEN 0 564 #define M_FW_ETH_TX_PKT_WR_IMMDLEN 0x1ff 565 #define V_FW_ETH_TX_PKT_WR_IMMDLEN(x) ((x) << S_FW_ETH_TX_PKT_WR_IMMDLEN) 566 #define G_FW_ETH_TX_PKT_WR_IMMDLEN(x) \ 567 (((x) >> S_FW_ETH_TX_PKT_WR_IMMDLEN) & M_FW_ETH_TX_PKT_WR_IMMDLEN) 568 569 struct fw_eth_tx_pkts_wr { 570 __be32 op_pkd; 571 __be32 equiq_to_len16; 572 __be32 r3; 573 __be16 plen; 574 __u8 npkt; 575 __u8 type; 576 }; 577 578 struct fw_eth_tx_uo_wr { 579 __be32 op_immdlen; 580 __be32 equiq_to_len16; 581 __be64 r3; 582 __u8 r4; 583 __u8 ethlen; 584 __be16 iplen; 585 __u8 udplen; 586 __u8 rtplen; 587 __be16 r5; 588 __be16 mss; 589 __be16 schedpktsize; 590 __be32 length; 591 }; 592 593 struct fw_eq_flush_wr { 594 __u8 opcode; 595 __u8 r1[3]; 596 __be32 equiq_to_len16; 597 __be64 r3; 598 }; 599 600 struct fw_ofld_connection_wr { 601 __be32 op_compl; 602 __be32 len16_pkd; 603 __u64 cookie; 604 __be64 r2; 605 __be64 r3; 606 struct fw_ofld_connection_le { 607 __be32 version_cpl; 608 __be32 filter; 609 __be32 r1; 610 __be16 lport; 611 __be16 pport; 612 union fw_ofld_connection_leip { 613 struct fw_ofld_connection_le_ipv4 { 614 __be32 pip; 615 __be32 lip; 616 __be64 r0; 617 __be64 r1; 618 __be64 r2; 619 } ipv4; 620 struct fw_ofld_connection_le_ipv6 { 621 __be64 pip_hi; 622 __be64 pip_lo; 623 __be64 lip_hi; 624 __be64 lip_lo; 625 } ipv6; 626 } u; 627 } le; 628 struct fw_ofld_connection_tcb { 629 __be32 t_state_to_astid; 630 __be16 cplrxdataack_cplpassacceptrpl; 631 __be16 rcv_adv; 632 __be32 rcv_nxt; 633 __be32 tx_max; 634 __be64 opt0; 635 __be32 opt2; 636 __be32 r1; 637 __be64 r2; 638 __be64 r3; 639 } tcb; 640 }; 641 642 #define S_FW_OFLD_CONNECTION_WR_VERSION 31 643 #define M_FW_OFLD_CONNECTION_WR_VERSION 0x1 644 #define V_FW_OFLD_CONNECTION_WR_VERSION(x) \ 645 ((x) << S_FW_OFLD_CONNECTION_WR_VERSION) 646 #define G_FW_OFLD_CONNECTION_WR_VERSION(x) \ 647 (((x) >> S_FW_OFLD_CONNECTION_WR_VERSION) & \ 648 M_FW_OFLD_CONNECTION_WR_VERSION) 649 #define F_FW_OFLD_CONNECTION_WR_VERSION V_FW_OFLD_CONNECTION_WR_VERSION(1U) 650 651 #define S_FW_OFLD_CONNECTION_WR_CPL 30 652 #define M_FW_OFLD_CONNECTION_WR_CPL 0x1 653 #define V_FW_OFLD_CONNECTION_WR_CPL(x) ((x) << S_FW_OFLD_CONNECTION_WR_CPL) 654 #define G_FW_OFLD_CONNECTION_WR_CPL(x) \ 655 (((x) >> S_FW_OFLD_CONNECTION_WR_CPL) & M_FW_OFLD_CONNECTION_WR_CPL) 656 #define F_FW_OFLD_CONNECTION_WR_CPL V_FW_OFLD_CONNECTION_WR_CPL(1U) 657 658 #define S_FW_OFLD_CONNECTION_WR_T_STATE 28 659 #define M_FW_OFLD_CONNECTION_WR_T_STATE 0xf 660 #define V_FW_OFLD_CONNECTION_WR_T_STATE(x) \ 661 ((x) << S_FW_OFLD_CONNECTION_WR_T_STATE) 662 #define G_FW_OFLD_CONNECTION_WR_T_STATE(x) \ 663 (((x) >> S_FW_OFLD_CONNECTION_WR_T_STATE) & \ 664 M_FW_OFLD_CONNECTION_WR_T_STATE) 665 666 #define S_FW_OFLD_CONNECTION_WR_RCV_SCALE 24 667 #define M_FW_OFLD_CONNECTION_WR_RCV_SCALE 0xf 668 #define V_FW_OFLD_CONNECTION_WR_RCV_SCALE(x) \ 669 ((x) << S_FW_OFLD_CONNECTION_WR_RCV_SCALE) 670 #define G_FW_OFLD_CONNECTION_WR_RCV_SCALE(x) \ 671 (((x) >> S_FW_OFLD_CONNECTION_WR_RCV_SCALE) & \ 672 M_FW_OFLD_CONNECTION_WR_RCV_SCALE) 673 674 #define S_FW_OFLD_CONNECTION_WR_ASTID 0 675 #define M_FW_OFLD_CONNECTION_WR_ASTID 0xffffff 676 #define V_FW_OFLD_CONNECTION_WR_ASTID(x) \ 677 ((x) << S_FW_OFLD_CONNECTION_WR_ASTID) 678 #define G_FW_OFLD_CONNECTION_WR_ASTID(x) \ 679 (((x) >> S_FW_OFLD_CONNECTION_WR_ASTID) & M_FW_OFLD_CONNECTION_WR_ASTID) 680 681 #define S_FW_OFLD_CONNECTION_WR_CPLRXDATAACK 15 682 #define M_FW_OFLD_CONNECTION_WR_CPLRXDATAACK 0x1 683 #define V_FW_OFLD_CONNECTION_WR_CPLRXDATAACK(x) \ 684 ((x) << S_FW_OFLD_CONNECTION_WR_CPLRXDATAACK) 685 #define G_FW_OFLD_CONNECTION_WR_CPLRXDATAACK(x) \ 686 (((x) >> S_FW_OFLD_CONNECTION_WR_CPLRXDATAACK) & \ 687 M_FW_OFLD_CONNECTION_WR_CPLRXDATAACK) 688 #define F_FW_OFLD_CONNECTION_WR_CPLRXDATAACK \ 689 V_FW_OFLD_CONNECTION_WR_CPLRXDATAACK(1U) 690 691 #define S_FW_OFLD_CONNECTION_WR_CPLPASSACCEPTRPL 14 692 #define M_FW_OFLD_CONNECTION_WR_CPLPASSACCEPTRPL 0x1 693 #define V_FW_OFLD_CONNECTION_WR_CPLPASSACCEPTRPL(x) \ 694 ((x) << S_FW_OFLD_CONNECTION_WR_CPLPASSACCEPTRPL) 695 #define G_FW_OFLD_CONNECTION_WR_CPLPASSACCEPTRPL(x) \ 696 (((x) >> S_FW_OFLD_CONNECTION_WR_CPLPASSACCEPTRPL) & \ 697 M_FW_OFLD_CONNECTION_WR_CPLPASSACCEPTRPL) 698 #define F_FW_OFLD_CONNECTION_WR_CPLPASSACCEPTRPL \ 699 V_FW_OFLD_CONNECTION_WR_CPLPASSACCEPTRPL(1U) 700 701 enum fw_flowc_mnem_tcpstate { 702 FW_FLOWC_MNEM_TCPSTATE_CLOSED = 0, /* illegal */ 703 FW_FLOWC_MNEM_TCPSTATE_LISTEN = 1, /* illegal */ 704 FW_FLOWC_MNEM_TCPSTATE_SYNSENT = 2, /* illegal */ 705 FW_FLOWC_MNEM_TCPSTATE_SYNRECEIVED = 3, /* illegal */ 706 FW_FLOWC_MNEM_TCPSTATE_ESTABLISHED = 4, /* default */ 707 FW_FLOWC_MNEM_TCPSTATE_CLOSEWAIT = 5, /* got peer close already */ 708 FW_FLOWC_MNEM_TCPSTATE_FINWAIT1 = 6, /* haven't gotten ACK for FIN and 709 * will resend FIN - equiv ESTAB 710 */ 711 FW_FLOWC_MNEM_TCPSTATE_CLOSING = 7, /* haven't gotten ACK for FIN and 712 * will resend FIN but have 713 * received FIN 714 */ 715 FW_FLOWC_MNEM_TCPSTATE_LASTACK = 8, /* haven't gotten ACK for FIN and 716 * will resend FIN but have 717 * received FIN 718 */ 719 FW_FLOWC_MNEM_TCPSTATE_FINWAIT2 = 9, /* sent FIN and got FIN + ACK, 720 * waiting for FIN 721 */ 722 FW_FLOWC_MNEM_TCPSTATE_TIMEWAIT = 10, /* not expected */ 723 }; 724 725 enum fw_flowc_mnem_uostate { 726 FW_FLOWC_MNEM_UOSTATE_CLOSED = 0, /* illegal */ 727 FW_FLOWC_MNEM_UOSTATE_ESTABLISHED = 1, /* default */ 728 FW_FLOWC_MNEM_UOSTATE_CLOSING = 2, /* graceful close, after sending 729 * outstanding payload 730 */ 731 FW_FLOWC_MNEM_UOSTATE_ABORTING = 3, /* immediate close, after 732 * discarding outstanding payload 733 */ 734 }; 735 736 enum fw_flowc_mnem { 737 FW_FLOWC_MNEM_PFNVFN = 0, /* PFN [15:8] VFN [7:0] */ 738 FW_FLOWC_MNEM_CH = 1, 739 FW_FLOWC_MNEM_PORT = 2, 740 FW_FLOWC_MNEM_IQID = 3, 741 FW_FLOWC_MNEM_SNDNXT = 4, 742 FW_FLOWC_MNEM_RCVNXT = 5, 743 FW_FLOWC_MNEM_SNDBUF = 6, 744 FW_FLOWC_MNEM_MSS = 7, 745 FW_FLOWC_MNEM_TXDATAPLEN_MAX = 8, 746 FW_FLOWC_MNEM_TCPSTATE = 9, 747 FW_FLOWC_MNEM_UOSTATE = 10, 748 FW_FLOWC_MNEM_SCHEDCLASS = 11, 749 FW_FLOWC_MNEM_DCBPRIO = 12, 750 }; 751 752 struct fw_flowc_mnemval { 753 __u8 mnemonic; 754 __u8 r4[3]; 755 __be32 val; 756 }; 757 758 struct fw_flowc_wr { 759 __be32 op_to_nparams; 760 __be32 flowid_len16; 761 #ifndef C99_NOT_SUPPORTED 762 struct fw_flowc_mnemval mnemval[0]; 763 #endif 764 }; 765 766 #define S_FW_FLOWC_WR_NPARAMS 0 767 #define M_FW_FLOWC_WR_NPARAMS 0xff 768 #define V_FW_FLOWC_WR_NPARAMS(x) ((x) << S_FW_FLOWC_WR_NPARAMS) 769 #define G_FW_FLOWC_WR_NPARAMS(x) \ 770 (((x) >> S_FW_FLOWC_WR_NPARAMS) & M_FW_FLOWC_WR_NPARAMS) 771 772 struct fw_ofld_tx_data_wr { 773 __be32 op_to_immdlen; 774 __be32 flowid_len16; 775 __be32 plen; 776 __be32 tunnel_to_proxy; 777 }; 778 779 #define S_FW_OFLD_TX_DATA_WR_TUNNEL 19 780 #define M_FW_OFLD_TX_DATA_WR_TUNNEL 0x1 781 #define V_FW_OFLD_TX_DATA_WR_TUNNEL(x) ((x) << S_FW_OFLD_TX_DATA_WR_TUNNEL) 782 #define G_FW_OFLD_TX_DATA_WR_TUNNEL(x) \ 783 (((x) >> S_FW_OFLD_TX_DATA_WR_TUNNEL) & M_FW_OFLD_TX_DATA_WR_TUNNEL) 784 #define F_FW_OFLD_TX_DATA_WR_TUNNEL V_FW_OFLD_TX_DATA_WR_TUNNEL(1U) 785 786 #define S_FW_OFLD_TX_DATA_WR_SAVE 18 787 #define M_FW_OFLD_TX_DATA_WR_SAVE 0x1 788 #define V_FW_OFLD_TX_DATA_WR_SAVE(x) ((x) << S_FW_OFLD_TX_DATA_WR_SAVE) 789 #define G_FW_OFLD_TX_DATA_WR_SAVE(x) \ 790 (((x) >> S_FW_OFLD_TX_DATA_WR_SAVE) & M_FW_OFLD_TX_DATA_WR_SAVE) 791 #define F_FW_OFLD_TX_DATA_WR_SAVE V_FW_OFLD_TX_DATA_WR_SAVE(1U) 792 793 #define S_FW_OFLD_TX_DATA_WR_FLUSH 17 794 #define M_FW_OFLD_TX_DATA_WR_FLUSH 0x1 795 #define V_FW_OFLD_TX_DATA_WR_FLUSH(x) ((x) << S_FW_OFLD_TX_DATA_WR_FLUSH) 796 #define G_FW_OFLD_TX_DATA_WR_FLUSH(x) \ 797 (((x) >> S_FW_OFLD_TX_DATA_WR_FLUSH) & M_FW_OFLD_TX_DATA_WR_FLUSH) 798 #define F_FW_OFLD_TX_DATA_WR_FLUSH V_FW_OFLD_TX_DATA_WR_FLUSH(1U) 799 800 #define S_FW_OFLD_TX_DATA_WR_URGENT 16 801 #define M_FW_OFLD_TX_DATA_WR_URGENT 0x1 802 #define V_FW_OFLD_TX_DATA_WR_URGENT(x) ((x) << S_FW_OFLD_TX_DATA_WR_URGENT) 803 #define G_FW_OFLD_TX_DATA_WR_URGENT(x) \ 804 (((x) >> S_FW_OFLD_TX_DATA_WR_URGENT) & M_FW_OFLD_TX_DATA_WR_URGENT) 805 #define F_FW_OFLD_TX_DATA_WR_URGENT V_FW_OFLD_TX_DATA_WR_URGENT(1U) 806 807 #define S_FW_OFLD_TX_DATA_WR_MORE 15 808 #define M_FW_OFLD_TX_DATA_WR_MORE 0x1 809 #define V_FW_OFLD_TX_DATA_WR_MORE(x) ((x) << S_FW_OFLD_TX_DATA_WR_MORE) 810 #define G_FW_OFLD_TX_DATA_WR_MORE(x) \ 811 (((x) >> S_FW_OFLD_TX_DATA_WR_MORE) & M_FW_OFLD_TX_DATA_WR_MORE) 812 #define F_FW_OFLD_TX_DATA_WR_MORE V_FW_OFLD_TX_DATA_WR_MORE(1U) 813 814 #define S_FW_OFLD_TX_DATA_WR_SHOVE 14 815 #define M_FW_OFLD_TX_DATA_WR_SHOVE 0x1 816 #define V_FW_OFLD_TX_DATA_WR_SHOVE(x) ((x) << S_FW_OFLD_TX_DATA_WR_SHOVE) 817 #define G_FW_OFLD_TX_DATA_WR_SHOVE(x) \ 818 (((x) >> S_FW_OFLD_TX_DATA_WR_SHOVE) & M_FW_OFLD_TX_DATA_WR_SHOVE) 819 #define F_FW_OFLD_TX_DATA_WR_SHOVE V_FW_OFLD_TX_DATA_WR_SHOVE(1U) 820 821 #define S_FW_OFLD_TX_DATA_WR_ULPMODE 10 822 #define M_FW_OFLD_TX_DATA_WR_ULPMODE 0xf 823 #define V_FW_OFLD_TX_DATA_WR_ULPMODE(x) ((x) << S_FW_OFLD_TX_DATA_WR_ULPMODE) 824 #define G_FW_OFLD_TX_DATA_WR_ULPMODE(x) \ 825 (((x) >> S_FW_OFLD_TX_DATA_WR_ULPMODE) & M_FW_OFLD_TX_DATA_WR_ULPMODE) 826 827 #define S_FW_OFLD_TX_DATA_WR_ULPSUBMODE 6 828 #define M_FW_OFLD_TX_DATA_WR_ULPSUBMODE 0xf 829 #define V_FW_OFLD_TX_DATA_WR_ULPSUBMODE(x) \ 830 ((x) << S_FW_OFLD_TX_DATA_WR_ULPSUBMODE) 831 #define G_FW_OFLD_TX_DATA_WR_ULPSUBMODE(x) \ 832 (((x) >> S_FW_OFLD_TX_DATA_WR_ULPSUBMODE) & \ 833 M_FW_OFLD_TX_DATA_WR_ULPSUBMODE) 834 835 #define S_FW_OFLD_TX_DATA_WR_PROXY 5 836 #define M_FW_OFLD_TX_DATA_WR_PROXY 0x1 837 #define V_FW_OFLD_TX_DATA_WR_PROXY(x) ((x) << S_FW_OFLD_TX_DATA_WR_PROXY) 838 #define G_FW_OFLD_TX_DATA_WR_PROXY(x) \ 839 (((x) >> S_FW_OFLD_TX_DATA_WR_PROXY) & M_FW_OFLD_TX_DATA_WR_PROXY) 840 #define F_FW_OFLD_TX_DATA_WR_PROXY V_FW_OFLD_TX_DATA_WR_PROXY(1U) 841 842 struct fw_cmd_wr { 843 __be32 op_dma; 844 __be32 len16_pkd; 845 __be64 cookie_daddr; 846 }; 847 848 #define S_FW_CMD_WR_DMA 17 849 #define M_FW_CMD_WR_DMA 0x1 850 #define V_FW_CMD_WR_DMA(x) ((x) << S_FW_CMD_WR_DMA) 851 #define G_FW_CMD_WR_DMA(x) (((x) >> S_FW_CMD_WR_DMA) & M_FW_CMD_WR_DMA) 852 #define F_FW_CMD_WR_DMA V_FW_CMD_WR_DMA(1U) 853 854 struct fw_eth_tx_pkt_vm_wr { 855 __be32 op_immdlen; 856 __be32 equiq_to_len16; 857 __be32 r3[2]; 858 __u8 ethmacdst[6]; 859 __u8 ethmacsrc[6]; 860 __be16 ethtype; 861 __be16 vlantci; 862 }; 863 864 /****************************************************************************** 865 * R I W O R K R E Q U E S T s 866 **************************************/ 867 868 enum fw_ri_wr_opcode { 869 FW_RI_RDMA_WRITE = 0x0, /* IETF RDMAP v1.0 ... */ 870 FW_RI_READ_REQ = 0x1, 871 FW_RI_READ_RESP = 0x2, 872 FW_RI_SEND = 0x3, 873 FW_RI_SEND_WITH_INV = 0x4, 874 FW_RI_SEND_WITH_SE = 0x5, 875 FW_RI_SEND_WITH_SE_INV = 0x6, 876 FW_RI_TERMINATE = 0x7, 877 FW_RI_RDMA_INIT = 0x8, /* CHELSIO RI specific ... */ 878 FW_RI_BIND_MW = 0x9, 879 FW_RI_FAST_REGISTER = 0xa, 880 FW_RI_LOCAL_INV = 0xb, 881 FW_RI_QP_MODIFY = 0xc, 882 FW_RI_BYPASS = 0xd, 883 FW_RI_RECEIVE = 0xe, 884 #if 0 885 FW_RI_SEND_IMMEDIATE = 0x8, 886 FW_RI_SEND_IMMEDIATE_WITH_SE = 0x9, 887 FW_RI_ATOMIC_REQUEST = 0xa, 888 FW_RI_ATOMIC_RESPONSE = 0xb, 889 890 FW_RI_BIND_MW = 0xc, /* CHELSIO RI specific ... */ 891 FW_RI_FAST_REGISTER = 0xd, 892 FW_RI_LOCAL_INV = 0xe, 893 #endif 894 FW_RI_SGE_EC_CR_RETURN = 0xf 895 }; 896 897 enum fw_ri_wr_flags { 898 FW_RI_COMPLETION_FLAG = 0x01, 899 FW_RI_NOTIFICATION_FLAG = 0x02, 900 FW_RI_SOLICITED_EVENT_FLAG = 0x04, 901 FW_RI_READ_FENCE_FLAG = 0x08, 902 FW_RI_LOCAL_FENCE_FLAG = 0x10, 903 FW_RI_RDMA_READ_INVALIDATE = 0x20 904 }; 905 906 enum fw_ri_mpa_attrs { 907 FW_RI_MPA_RX_MARKER_ENABLE = 0x01, 908 FW_RI_MPA_TX_MARKER_ENABLE = 0x02, 909 FW_RI_MPA_CRC_ENABLE = 0x04, 910 FW_RI_MPA_IETF_ENABLE = 0x08 911 }; 912 913 enum fw_ri_qp_caps { 914 FW_RI_QP_RDMA_READ_ENABLE = 0x01, 915 FW_RI_QP_RDMA_WRITE_ENABLE = 0x02, 916 FW_RI_QP_BIND_ENABLE = 0x04, 917 FW_RI_QP_FAST_REGISTER_ENABLE = 0x08, 918 FW_RI_QP_STAG0_ENABLE = 0x10, 919 FW_RI_QP_RDMA_READ_REQ_0B_ENABLE= 0x80, 920 }; 921 922 enum fw_ri_addr_type { 923 FW_RI_ZERO_BASED_TO = 0x00, 924 FW_RI_VA_BASED_TO = 0x01 925 }; 926 927 enum fw_ri_mem_perms { 928 FW_RI_MEM_ACCESS_REM_WRITE = 0x01, 929 FW_RI_MEM_ACCESS_REM_READ = 0x02, 930 FW_RI_MEM_ACCESS_REM = 0x03, 931 FW_RI_MEM_ACCESS_LOCAL_WRITE = 0x04, 932 FW_RI_MEM_ACCESS_LOCAL_READ = 0x08, 933 FW_RI_MEM_ACCESS_LOCAL = 0x0C 934 }; 935 936 enum fw_ri_stag_type { 937 FW_RI_STAG_NSMR = 0x00, 938 FW_RI_STAG_SMR = 0x01, 939 FW_RI_STAG_MW = 0x02, 940 FW_RI_STAG_MW_RELAXED = 0x03 941 }; 942 943 enum fw_ri_data_op { 944 FW_RI_DATA_IMMD = 0x81, 945 FW_RI_DATA_DSGL = 0x82, 946 FW_RI_DATA_ISGL = 0x83 947 }; 948 949 enum fw_ri_sgl_depth { 950 FW_RI_SGL_DEPTH_MAX_SQ = 16, 951 FW_RI_SGL_DEPTH_MAX_RQ = 4 952 }; 953 954 enum fw_ri_cqe_err { 955 FW_RI_CQE_ERR_SUCCESS = 0x00, /* success, no error detected */ 956 FW_RI_CQE_ERR_STAG = 0x01, /* STAG invalid */ 957 FW_RI_CQE_ERR_PDID = 0x02, /* PDID mismatch */ 958 FW_RI_CQE_ERR_QPID = 0x03, /* QPID mismatch */ 959 FW_RI_CQE_ERR_ACCESS = 0x04, /* Invalid access right */ 960 FW_RI_CQE_ERR_WRAP = 0x05, /* Wrap error */ 961 FW_RI_CQE_ERR_BOUND = 0x06, /* base and bounds violation */ 962 FW_RI_CQE_ERR_INVALIDATE_SHARED_MR = 0x07, /* attempt to invalidate a SMR */ 963 FW_RI_CQE_ERR_INVALIDATE_MR_WITH_MW_BOUND = 0x08, /* attempt to invalidate a MR w MW */ 964 FW_RI_CQE_ERR_ECC = 0x09, /* ECC error detected */ 965 FW_RI_CQE_ERR_ECC_PSTAG = 0x0A, /* ECC error detected when reading the PSTAG for a MW Invalidate */ 966 FW_RI_CQE_ERR_PBL_ADDR_BOUND = 0x0B, /* pbl address out of bound : software error */ 967 FW_RI_CQE_ERR_CRC = 0x10, /* CRC error */ 968 FW_RI_CQE_ERR_MARKER = 0x11, /* Marker error */ 969 FW_RI_CQE_ERR_PDU_LEN_ERR = 0x12, /* invalid PDU length */ 970 FW_RI_CQE_ERR_OUT_OF_RQE = 0x13, /* out of RQE */ 971 FW_RI_CQE_ERR_DDP_VERSION = 0x14, /* wrong DDP version */ 972 FW_RI_CQE_ERR_RDMA_VERSION = 0x15, /* wrong RDMA version */ 973 FW_RI_CQE_ERR_OPCODE = 0x16, /* invalid rdma opcode */ 974 FW_RI_CQE_ERR_DDP_QUEUE_NUM = 0x17, /* invalid ddp queue number */ 975 FW_RI_CQE_ERR_MSN = 0x18, /* MSN error */ 976 FW_RI_CQE_ERR_TBIT = 0x19, /* tag bit not set correctly */ 977 FW_RI_CQE_ERR_MO = 0x1A, /* MO not zero for TERMINATE or READ_REQ */ 978 FW_RI_CQE_ERR_MSN_GAP = 0x1B, /* */ 979 FW_RI_CQE_ERR_MSN_RANGE = 0x1C, /* */ 980 FW_RI_CQE_ERR_IRD_OVERFLOW = 0x1D, /* */ 981 FW_RI_CQE_ERR_RQE_ADDR_BOUND = 0x1E, /* RQE address out of bound : software error */ 982 FW_RI_CQE_ERR_INTERNAL_ERR = 0x1F /* internel error (opcode mismatch) */ 983 984 }; 985 986 struct fw_ri_dsge_pair { 987 __be32 len[2]; 988 __be64 addr[2]; 989 }; 990 991 struct fw_ri_dsgl { 992 __u8 op; 993 __u8 r1; 994 __be16 nsge; 995 __be32 len0; 996 __be64 addr0; 997 #ifndef C99_NOT_SUPPORTED 998 struct fw_ri_dsge_pair sge[0]; 999 #endif 1000 }; 1001 1002 struct fw_ri_sge { 1003 __be32 stag; 1004 __be32 len; 1005 __be64 to; 1006 }; 1007 1008 struct fw_ri_isgl { 1009 __u8 op; 1010 __u8 r1; 1011 __be16 nsge; 1012 __be32 r2; 1013 #ifndef C99_NOT_SUPPORTED 1014 struct fw_ri_sge sge[0]; 1015 #endif 1016 }; 1017 1018 struct fw_ri_immd { 1019 __u8 op; 1020 __u8 r1; 1021 __be16 r2; 1022 __be32 immdlen; 1023 #ifndef C99_NOT_SUPPORTED 1024 __u8 data[0]; 1025 #endif 1026 }; 1027 1028 struct fw_ri_tpte { 1029 __be32 valid_to_pdid; 1030 __be32 locread_to_qpid; 1031 __be32 nosnoop_pbladdr; 1032 __be32 len_lo; 1033 __be32 va_hi; 1034 __be32 va_lo_fbo; 1035 __be32 dca_mwbcnt_pstag; 1036 __be32 len_hi; 1037 }; 1038 1039 #define S_FW_RI_TPTE_VALID 31 1040 #define M_FW_RI_TPTE_VALID 0x1 1041 #define V_FW_RI_TPTE_VALID(x) ((x) << S_FW_RI_TPTE_VALID) 1042 #define G_FW_RI_TPTE_VALID(x) \ 1043 (((x) >> S_FW_RI_TPTE_VALID) & M_FW_RI_TPTE_VALID) 1044 #define F_FW_RI_TPTE_VALID V_FW_RI_TPTE_VALID(1U) 1045 1046 #define S_FW_RI_TPTE_STAGKEY 23 1047 #define M_FW_RI_TPTE_STAGKEY 0xff 1048 #define V_FW_RI_TPTE_STAGKEY(x) ((x) << S_FW_RI_TPTE_STAGKEY) 1049 #define G_FW_RI_TPTE_STAGKEY(x) \ 1050 (((x) >> S_FW_RI_TPTE_STAGKEY) & M_FW_RI_TPTE_STAGKEY) 1051 1052 #define S_FW_RI_TPTE_STAGSTATE 22 1053 #define M_FW_RI_TPTE_STAGSTATE 0x1 1054 #define V_FW_RI_TPTE_STAGSTATE(x) ((x) << S_FW_RI_TPTE_STAGSTATE) 1055 #define G_FW_RI_TPTE_STAGSTATE(x) \ 1056 (((x) >> S_FW_RI_TPTE_STAGSTATE) & M_FW_RI_TPTE_STAGSTATE) 1057 #define F_FW_RI_TPTE_STAGSTATE V_FW_RI_TPTE_STAGSTATE(1U) 1058 1059 #define S_FW_RI_TPTE_STAGTYPE 20 1060 #define M_FW_RI_TPTE_STAGTYPE 0x3 1061 #define V_FW_RI_TPTE_STAGTYPE(x) ((x) << S_FW_RI_TPTE_STAGTYPE) 1062 #define G_FW_RI_TPTE_STAGTYPE(x) \ 1063 (((x) >> S_FW_RI_TPTE_STAGTYPE) & M_FW_RI_TPTE_STAGTYPE) 1064 1065 #define S_FW_RI_TPTE_PDID 0 1066 #define M_FW_RI_TPTE_PDID 0xfffff 1067 #define V_FW_RI_TPTE_PDID(x) ((x) << S_FW_RI_TPTE_PDID) 1068 #define G_FW_RI_TPTE_PDID(x) \ 1069 (((x) >> S_FW_RI_TPTE_PDID) & M_FW_RI_TPTE_PDID) 1070 1071 #define S_FW_RI_TPTE_PERM 28 1072 #define M_FW_RI_TPTE_PERM 0xf 1073 #define V_FW_RI_TPTE_PERM(x) ((x) << S_FW_RI_TPTE_PERM) 1074 #define G_FW_RI_TPTE_PERM(x) \ 1075 (((x) >> S_FW_RI_TPTE_PERM) & M_FW_RI_TPTE_PERM) 1076 1077 #define S_FW_RI_TPTE_REMINVDIS 27 1078 #define M_FW_RI_TPTE_REMINVDIS 0x1 1079 #define V_FW_RI_TPTE_REMINVDIS(x) ((x) << S_FW_RI_TPTE_REMINVDIS) 1080 #define G_FW_RI_TPTE_REMINVDIS(x) \ 1081 (((x) >> S_FW_RI_TPTE_REMINVDIS) & M_FW_RI_TPTE_REMINVDIS) 1082 #define F_FW_RI_TPTE_REMINVDIS V_FW_RI_TPTE_REMINVDIS(1U) 1083 1084 #define S_FW_RI_TPTE_ADDRTYPE 26 1085 #define M_FW_RI_TPTE_ADDRTYPE 1 1086 #define V_FW_RI_TPTE_ADDRTYPE(x) ((x) << S_FW_RI_TPTE_ADDRTYPE) 1087 #define G_FW_RI_TPTE_ADDRTYPE(x) \ 1088 (((x) >> S_FW_RI_TPTE_ADDRTYPE) & M_FW_RI_TPTE_ADDRTYPE) 1089 #define F_FW_RI_TPTE_ADDRTYPE V_FW_RI_TPTE_ADDRTYPE(1U) 1090 1091 #define S_FW_RI_TPTE_MWBINDEN 25 1092 #define M_FW_RI_TPTE_MWBINDEN 0x1 1093 #define V_FW_RI_TPTE_MWBINDEN(x) ((x) << S_FW_RI_TPTE_MWBINDEN) 1094 #define G_FW_RI_TPTE_MWBINDEN(x) \ 1095 (((x) >> S_FW_RI_TPTE_MWBINDEN) & M_FW_RI_TPTE_MWBINDEN) 1096 #define F_FW_RI_TPTE_MWBINDEN V_FW_RI_TPTE_MWBINDEN(1U) 1097 1098 #define S_FW_RI_TPTE_PS 20 1099 #define M_FW_RI_TPTE_PS 0x1f 1100 #define V_FW_RI_TPTE_PS(x) ((x) << S_FW_RI_TPTE_PS) 1101 #define G_FW_RI_TPTE_PS(x) \ 1102 (((x) >> S_FW_RI_TPTE_PS) & M_FW_RI_TPTE_PS) 1103 1104 #define S_FW_RI_TPTE_QPID 0 1105 #define M_FW_RI_TPTE_QPID 0xfffff 1106 #define V_FW_RI_TPTE_QPID(x) ((x) << S_FW_RI_TPTE_QPID) 1107 #define G_FW_RI_TPTE_QPID(x) \ 1108 (((x) >> S_FW_RI_TPTE_QPID) & M_FW_RI_TPTE_QPID) 1109 1110 #define S_FW_RI_TPTE_NOSNOOP 31 1111 #define M_FW_RI_TPTE_NOSNOOP 0x1 1112 #define V_FW_RI_TPTE_NOSNOOP(x) ((x) << S_FW_RI_TPTE_NOSNOOP) 1113 #define G_FW_RI_TPTE_NOSNOOP(x) \ 1114 (((x) >> S_FW_RI_TPTE_NOSNOOP) & M_FW_RI_TPTE_NOSNOOP) 1115 #define F_FW_RI_TPTE_NOSNOOP V_FW_RI_TPTE_NOSNOOP(1U) 1116 1117 #define S_FW_RI_TPTE_PBLADDR 0 1118 #define M_FW_RI_TPTE_PBLADDR 0x1fffffff 1119 #define V_FW_RI_TPTE_PBLADDR(x) ((x) << S_FW_RI_TPTE_PBLADDR) 1120 #define G_FW_RI_TPTE_PBLADDR(x) \ 1121 (((x) >> S_FW_RI_TPTE_PBLADDR) & M_FW_RI_TPTE_PBLADDR) 1122 1123 #define S_FW_RI_TPTE_DCA 24 1124 #define M_FW_RI_TPTE_DCA 0x1f 1125 #define V_FW_RI_TPTE_DCA(x) ((x) << S_FW_RI_TPTE_DCA) 1126 #define G_FW_RI_TPTE_DCA(x) \ 1127 (((x) >> S_FW_RI_TPTE_DCA) & M_FW_RI_TPTE_DCA) 1128 1129 #define S_FW_RI_TPTE_MWBCNT_PSTAG 0 1130 #define M_FW_RI_TPTE_MWBCNT_PSTAG 0xffffff 1131 #define V_FW_RI_TPTE_MWBCNT_PSTAT(x) \ 1132 ((x) << S_FW_RI_TPTE_MWBCNT_PSTAG) 1133 #define G_FW_RI_TPTE_MWBCNT_PSTAG(x) \ 1134 (((x) >> S_FW_RI_TPTE_MWBCNT_PSTAG) & M_FW_RI_TPTE_MWBCNT_PSTAG) 1135 1136 enum fw_ri_cqe_rxtx { 1137 FW_RI_CQE_RXTX_RX = 0x0, 1138 FW_RI_CQE_RXTX_TX = 0x1, 1139 }; 1140 1141 struct fw_ri_cqe { 1142 union fw_ri_rxtx { 1143 struct fw_ri_scqe { 1144 __be32 qpid_n_stat_rxtx_type; 1145 __be32 plen; 1146 __be32 reserved; 1147 __be32 wrid; 1148 } scqe; 1149 struct fw_ri_rcqe { 1150 __be32 qpid_n_stat_rxtx_type; 1151 __be32 plen; 1152 __be32 stag; 1153 __be32 msn; 1154 } rcqe; 1155 } u; 1156 }; 1157 1158 #define S_FW_RI_CQE_QPID 12 1159 #define M_FW_RI_CQE_QPID 0xfffff 1160 #define V_FW_RI_CQE_QPID(x) ((x) << S_FW_RI_CQE_QPID) 1161 #define G_FW_RI_CQE_QPID(x) \ 1162 (((x) >> S_FW_RI_CQE_QPID) & M_FW_RI_CQE_QPID) 1163 1164 #define S_FW_RI_CQE_NOTIFY 10 1165 #define M_FW_RI_CQE_NOTIFY 0x1 1166 #define V_FW_RI_CQE_NOTIFY(x) ((x) << S_FW_RI_CQE_NOTIFY) 1167 #define G_FW_RI_CQE_NOTIFY(x) \ 1168 (((x) >> S_FW_RI_CQE_NOTIFY) & M_FW_RI_CQE_NOTIFY) 1169 1170 #define S_FW_RI_CQE_STATUS 5 1171 #define M_FW_RI_CQE_STATUS 0x1f 1172 #define V_FW_RI_CQE_STATUS(x) ((x) << S_FW_RI_CQE_STATUS) 1173 #define G_FW_RI_CQE_STATUS(x) \ 1174 (((x) >> S_FW_RI_CQE_STATUS) & M_FW_RI_CQE_STATUS) 1175 1176 1177 #define S_FW_RI_CQE_RXTX 4 1178 #define M_FW_RI_CQE_RXTX 0x1 1179 #define V_FW_RI_CQE_RXTX(x) ((x) << S_FW_RI_CQE_RXTX) 1180 #define G_FW_RI_CQE_RXTX(x) \ 1181 (((x) >> S_FW_RI_CQE_RXTX) & M_FW_RI_CQE_RXTX) 1182 1183 #define S_FW_RI_CQE_TYPE 0 1184 #define M_FW_RI_CQE_TYPE 0xf 1185 #define V_FW_RI_CQE_TYPE(x) ((x) << S_FW_RI_CQE_TYPE) 1186 #define G_FW_RI_CQE_TYPE(x) \ 1187 (((x) >> S_FW_RI_CQE_TYPE) & M_FW_RI_CQE_TYPE) 1188 1189 enum fw_ri_res_type { 1190 FW_RI_RES_TYPE_SQ, 1191 FW_RI_RES_TYPE_RQ, 1192 FW_RI_RES_TYPE_CQ, 1193 }; 1194 1195 enum fw_ri_res_op { 1196 FW_RI_RES_OP_WRITE, 1197 FW_RI_RES_OP_RESET, 1198 }; 1199 1200 struct fw_ri_res { 1201 union fw_ri_restype { 1202 struct fw_ri_res_sqrq { 1203 __u8 restype; 1204 __u8 op; 1205 __be16 r3; 1206 __be32 eqid; 1207 __be32 r4[2]; 1208 __be32 fetchszm_to_iqid; 1209 __be32 dcaen_to_eqsize; 1210 __be64 eqaddr; 1211 } sqrq; 1212 struct fw_ri_res_cq { 1213 __u8 restype; 1214 __u8 op; 1215 __be16 r3; 1216 __be32 iqid; 1217 __be32 r4[2]; 1218 __be32 iqandst_to_iqandstindex; 1219 __be16 iqdroprss_to_iqesize; 1220 __be16 iqsize; 1221 __be64 iqaddr; 1222 __be32 iqns_iqro; 1223 __be32 r6_lo; 1224 __be64 r7; 1225 } cq; 1226 } u; 1227 }; 1228 1229 struct fw_ri_res_wr { 1230 __be32 op_nres; 1231 __be32 len16_pkd; 1232 __u64 cookie; 1233 #ifndef C99_NOT_SUPPORTED 1234 struct fw_ri_res res[0]; 1235 #endif 1236 }; 1237 1238 #define S_FW_RI_RES_WR_NRES 0 1239 #define M_FW_RI_RES_WR_NRES 0xff 1240 #define V_FW_RI_RES_WR_NRES(x) ((x) << S_FW_RI_RES_WR_NRES) 1241 #define G_FW_RI_RES_WR_NRES(x) \ 1242 (((x) >> S_FW_RI_RES_WR_NRES) & M_FW_RI_RES_WR_NRES) 1243 1244 #define S_FW_RI_RES_WR_FETCHSZM 26 1245 #define M_FW_RI_RES_WR_FETCHSZM 0x1 1246 #define V_FW_RI_RES_WR_FETCHSZM(x) ((x) << S_FW_RI_RES_WR_FETCHSZM) 1247 #define G_FW_RI_RES_WR_FETCHSZM(x) \ 1248 (((x) >> S_FW_RI_RES_WR_FETCHSZM) & M_FW_RI_RES_WR_FETCHSZM) 1249 #define F_FW_RI_RES_WR_FETCHSZM V_FW_RI_RES_WR_FETCHSZM(1U) 1250 1251 #define S_FW_RI_RES_WR_STATUSPGNS 25 1252 #define M_FW_RI_RES_WR_STATUSPGNS 0x1 1253 #define V_FW_RI_RES_WR_STATUSPGNS(x) ((x) << S_FW_RI_RES_WR_STATUSPGNS) 1254 #define G_FW_RI_RES_WR_STATUSPGNS(x) \ 1255 (((x) >> S_FW_RI_RES_WR_STATUSPGNS) & M_FW_RI_RES_WR_STATUSPGNS) 1256 #define F_FW_RI_RES_WR_STATUSPGNS V_FW_RI_RES_WR_STATUSPGNS(1U) 1257 1258 #define S_FW_RI_RES_WR_STATUSPGRO 24 1259 #define M_FW_RI_RES_WR_STATUSPGRO 0x1 1260 #define V_FW_RI_RES_WR_STATUSPGRO(x) ((x) << S_FW_RI_RES_WR_STATUSPGRO) 1261 #define G_FW_RI_RES_WR_STATUSPGRO(x) \ 1262 (((x) >> S_FW_RI_RES_WR_STATUSPGRO) & M_FW_RI_RES_WR_STATUSPGRO) 1263 #define F_FW_RI_RES_WR_STATUSPGRO V_FW_RI_RES_WR_STATUSPGRO(1U) 1264 1265 #define S_FW_RI_RES_WR_FETCHNS 23 1266 #define M_FW_RI_RES_WR_FETCHNS 0x1 1267 #define V_FW_RI_RES_WR_FETCHNS(x) ((x) << S_FW_RI_RES_WR_FETCHNS) 1268 #define G_FW_RI_RES_WR_FETCHNS(x) \ 1269 (((x) >> S_FW_RI_RES_WR_FETCHNS) & M_FW_RI_RES_WR_FETCHNS) 1270 #define F_FW_RI_RES_WR_FETCHNS V_FW_RI_RES_WR_FETCHNS(1U) 1271 1272 #define S_FW_RI_RES_WR_FETCHRO 22 1273 #define M_FW_RI_RES_WR_FETCHRO 0x1 1274 #define V_FW_RI_RES_WR_FETCHRO(x) ((x) << S_FW_RI_RES_WR_FETCHRO) 1275 #define G_FW_RI_RES_WR_FETCHRO(x) \ 1276 (((x) >> S_FW_RI_RES_WR_FETCHRO) & M_FW_RI_RES_WR_FETCHRO) 1277 #define F_FW_RI_RES_WR_FETCHRO V_FW_RI_RES_WR_FETCHRO(1U) 1278 1279 #define S_FW_RI_RES_WR_HOSTFCMODE 20 1280 #define M_FW_RI_RES_WR_HOSTFCMODE 0x3 1281 #define V_FW_RI_RES_WR_HOSTFCMODE(x) ((x) << S_FW_RI_RES_WR_HOSTFCMODE) 1282 #define G_FW_RI_RES_WR_HOSTFCMODE(x) \ 1283 (((x) >> S_FW_RI_RES_WR_HOSTFCMODE) & M_FW_RI_RES_WR_HOSTFCMODE) 1284 1285 #define S_FW_RI_RES_WR_CPRIO 19 1286 #define M_FW_RI_RES_WR_CPRIO 0x1 1287 #define V_FW_RI_RES_WR_CPRIO(x) ((x) << S_FW_RI_RES_WR_CPRIO) 1288 #define G_FW_RI_RES_WR_CPRIO(x) \ 1289 (((x) >> S_FW_RI_RES_WR_CPRIO) & M_FW_RI_RES_WR_CPRIO) 1290 #define F_FW_RI_RES_WR_CPRIO V_FW_RI_RES_WR_CPRIO(1U) 1291 1292 #define S_FW_RI_RES_WR_ONCHIP 18 1293 #define M_FW_RI_RES_WR_ONCHIP 0x1 1294 #define V_FW_RI_RES_WR_ONCHIP(x) ((x) << S_FW_RI_RES_WR_ONCHIP) 1295 #define G_FW_RI_RES_WR_ONCHIP(x) \ 1296 (((x) >> S_FW_RI_RES_WR_ONCHIP) & M_FW_RI_RES_WR_ONCHIP) 1297 #define F_FW_RI_RES_WR_ONCHIP V_FW_RI_RES_WR_ONCHIP(1U) 1298 1299 #define S_FW_RI_RES_WR_PCIECHN 16 1300 #define M_FW_RI_RES_WR_PCIECHN 0x3 1301 #define V_FW_RI_RES_WR_PCIECHN(x) ((x) << S_FW_RI_RES_WR_PCIECHN) 1302 #define G_FW_RI_RES_WR_PCIECHN(x) \ 1303 (((x) >> S_FW_RI_RES_WR_PCIECHN) & M_FW_RI_RES_WR_PCIECHN) 1304 1305 #define S_FW_RI_RES_WR_IQID 0 1306 #define M_FW_RI_RES_WR_IQID 0xffff 1307 #define V_FW_RI_RES_WR_IQID(x) ((x) << S_FW_RI_RES_WR_IQID) 1308 #define G_FW_RI_RES_WR_IQID(x) \ 1309 (((x) >> S_FW_RI_RES_WR_IQID) & M_FW_RI_RES_WR_IQID) 1310 1311 #define S_FW_RI_RES_WR_DCAEN 31 1312 #define M_FW_RI_RES_WR_DCAEN 0x1 1313 #define V_FW_RI_RES_WR_DCAEN(x) ((x) << S_FW_RI_RES_WR_DCAEN) 1314 #define G_FW_RI_RES_WR_DCAEN(x) \ 1315 (((x) >> S_FW_RI_RES_WR_DCAEN) & M_FW_RI_RES_WR_DCAEN) 1316 #define F_FW_RI_RES_WR_DCAEN V_FW_RI_RES_WR_DCAEN(1U) 1317 1318 #define S_FW_RI_RES_WR_DCACPU 26 1319 #define M_FW_RI_RES_WR_DCACPU 0x1f 1320 #define V_FW_RI_RES_WR_DCACPU(x) ((x) << S_FW_RI_RES_WR_DCACPU) 1321 #define G_FW_RI_RES_WR_DCACPU(x) \ 1322 (((x) >> S_FW_RI_RES_WR_DCACPU) & M_FW_RI_RES_WR_DCACPU) 1323 1324 #define S_FW_RI_RES_WR_FBMIN 23 1325 #define M_FW_RI_RES_WR_FBMIN 0x7 1326 #define V_FW_RI_RES_WR_FBMIN(x) ((x) << S_FW_RI_RES_WR_FBMIN) 1327 #define G_FW_RI_RES_WR_FBMIN(x) \ 1328 (((x) >> S_FW_RI_RES_WR_FBMIN) & M_FW_RI_RES_WR_FBMIN) 1329 1330 #define S_FW_RI_RES_WR_FBMAX 20 1331 #define M_FW_RI_RES_WR_FBMAX 0x7 1332 #define V_FW_RI_RES_WR_FBMAX(x) ((x) << S_FW_RI_RES_WR_FBMAX) 1333 #define G_FW_RI_RES_WR_FBMAX(x) \ 1334 (((x) >> S_FW_RI_RES_WR_FBMAX) & M_FW_RI_RES_WR_FBMAX) 1335 1336 #define S_FW_RI_RES_WR_CIDXFTHRESHO 19 1337 #define M_FW_RI_RES_WR_CIDXFTHRESHO 0x1 1338 #define V_FW_RI_RES_WR_CIDXFTHRESHO(x) ((x) << S_FW_RI_RES_WR_CIDXFTHRESHO) 1339 #define G_FW_RI_RES_WR_CIDXFTHRESHO(x) \ 1340 (((x) >> S_FW_RI_RES_WR_CIDXFTHRESHO) & M_FW_RI_RES_WR_CIDXFTHRESHO) 1341 #define F_FW_RI_RES_WR_CIDXFTHRESHO V_FW_RI_RES_WR_CIDXFTHRESHO(1U) 1342 1343 #define S_FW_RI_RES_WR_CIDXFTHRESH 16 1344 #define M_FW_RI_RES_WR_CIDXFTHRESH 0x7 1345 #define V_FW_RI_RES_WR_CIDXFTHRESH(x) ((x) << S_FW_RI_RES_WR_CIDXFTHRESH) 1346 #define G_FW_RI_RES_WR_CIDXFTHRESH(x) \ 1347 (((x) >> S_FW_RI_RES_WR_CIDXFTHRESH) & M_FW_RI_RES_WR_CIDXFTHRESH) 1348 1349 #define S_FW_RI_RES_WR_EQSIZE 0 1350 #define M_FW_RI_RES_WR_EQSIZE 0xffff 1351 #define V_FW_RI_RES_WR_EQSIZE(x) ((x) << S_FW_RI_RES_WR_EQSIZE) 1352 #define G_FW_RI_RES_WR_EQSIZE(x) \ 1353 (((x) >> S_FW_RI_RES_WR_EQSIZE) & M_FW_RI_RES_WR_EQSIZE) 1354 1355 #define S_FW_RI_RES_WR_IQANDST 15 1356 #define M_FW_RI_RES_WR_IQANDST 0x1 1357 #define V_FW_RI_RES_WR_IQANDST(x) ((x) << S_FW_RI_RES_WR_IQANDST) 1358 #define G_FW_RI_RES_WR_IQANDST(x) \ 1359 (((x) >> S_FW_RI_RES_WR_IQANDST) & M_FW_RI_RES_WR_IQANDST) 1360 #define F_FW_RI_RES_WR_IQANDST V_FW_RI_RES_WR_IQANDST(1U) 1361 1362 #define S_FW_RI_RES_WR_IQANUS 14 1363 #define M_FW_RI_RES_WR_IQANUS 0x1 1364 #define V_FW_RI_RES_WR_IQANUS(x) ((x) << S_FW_RI_RES_WR_IQANUS) 1365 #define G_FW_RI_RES_WR_IQANUS(x) \ 1366 (((x) >> S_FW_RI_RES_WR_IQANUS) & M_FW_RI_RES_WR_IQANUS) 1367 #define F_FW_RI_RES_WR_IQANUS V_FW_RI_RES_WR_IQANUS(1U) 1368 1369 #define S_FW_RI_RES_WR_IQANUD 12 1370 #define M_FW_RI_RES_WR_IQANUD 0x3 1371 #define V_FW_RI_RES_WR_IQANUD(x) ((x) << S_FW_RI_RES_WR_IQANUD) 1372 #define G_FW_RI_RES_WR_IQANUD(x) \ 1373 (((x) >> S_FW_RI_RES_WR_IQANUD) & M_FW_RI_RES_WR_IQANUD) 1374 1375 #define S_FW_RI_RES_WR_IQANDSTINDEX 0 1376 #define M_FW_RI_RES_WR_IQANDSTINDEX 0xfff 1377 #define V_FW_RI_RES_WR_IQANDSTINDEX(x) ((x) << S_FW_RI_RES_WR_IQANDSTINDEX) 1378 #define G_FW_RI_RES_WR_IQANDSTINDEX(x) \ 1379 (((x) >> S_FW_RI_RES_WR_IQANDSTINDEX) & M_FW_RI_RES_WR_IQANDSTINDEX) 1380 1381 #define S_FW_RI_RES_WR_IQDROPRSS 15 1382 #define M_FW_RI_RES_WR_IQDROPRSS 0x1 1383 #define V_FW_RI_RES_WR_IQDROPRSS(x) ((x) << S_FW_RI_RES_WR_IQDROPRSS) 1384 #define G_FW_RI_RES_WR_IQDROPRSS(x) \ 1385 (((x) >> S_FW_RI_RES_WR_IQDROPRSS) & M_FW_RI_RES_WR_IQDROPRSS) 1386 #define F_FW_RI_RES_WR_IQDROPRSS V_FW_RI_RES_WR_IQDROPRSS(1U) 1387 1388 #define S_FW_RI_RES_WR_IQGTSMODE 14 1389 #define M_FW_RI_RES_WR_IQGTSMODE 0x1 1390 #define V_FW_RI_RES_WR_IQGTSMODE(x) ((x) << S_FW_RI_RES_WR_IQGTSMODE) 1391 #define G_FW_RI_RES_WR_IQGTSMODE(x) \ 1392 (((x) >> S_FW_RI_RES_WR_IQGTSMODE) & M_FW_RI_RES_WR_IQGTSMODE) 1393 #define F_FW_RI_RES_WR_IQGTSMODE V_FW_RI_RES_WR_IQGTSMODE(1U) 1394 1395 #define S_FW_RI_RES_WR_IQPCIECH 12 1396 #define M_FW_RI_RES_WR_IQPCIECH 0x3 1397 #define V_FW_RI_RES_WR_IQPCIECH(x) ((x) << S_FW_RI_RES_WR_IQPCIECH) 1398 #define G_FW_RI_RES_WR_IQPCIECH(x) \ 1399 (((x) >> S_FW_RI_RES_WR_IQPCIECH) & M_FW_RI_RES_WR_IQPCIECH) 1400 1401 #define S_FW_RI_RES_WR_IQDCAEN 11 1402 #define M_FW_RI_RES_WR_IQDCAEN 0x1 1403 #define V_FW_RI_RES_WR_IQDCAEN(x) ((x) << S_FW_RI_RES_WR_IQDCAEN) 1404 #define G_FW_RI_RES_WR_IQDCAEN(x) \ 1405 (((x) >> S_FW_RI_RES_WR_IQDCAEN) & M_FW_RI_RES_WR_IQDCAEN) 1406 #define F_FW_RI_RES_WR_IQDCAEN V_FW_RI_RES_WR_IQDCAEN(1U) 1407 1408 #define S_FW_RI_RES_WR_IQDCACPU 6 1409 #define M_FW_RI_RES_WR_IQDCACPU 0x1f 1410 #define V_FW_RI_RES_WR_IQDCACPU(x) ((x) << S_FW_RI_RES_WR_IQDCACPU) 1411 #define G_FW_RI_RES_WR_IQDCACPU(x) \ 1412 (((x) >> S_FW_RI_RES_WR_IQDCACPU) & M_FW_RI_RES_WR_IQDCACPU) 1413 1414 #define S_FW_RI_RES_WR_IQINTCNTTHRESH 4 1415 #define M_FW_RI_RES_WR_IQINTCNTTHRESH 0x3 1416 #define V_FW_RI_RES_WR_IQINTCNTTHRESH(x) \ 1417 ((x) << S_FW_RI_RES_WR_IQINTCNTTHRESH) 1418 #define G_FW_RI_RES_WR_IQINTCNTTHRESH(x) \ 1419 (((x) >> S_FW_RI_RES_WR_IQINTCNTTHRESH) & M_FW_RI_RES_WR_IQINTCNTTHRESH) 1420 1421 #define S_FW_RI_RES_WR_IQO 3 1422 #define M_FW_RI_RES_WR_IQO 0x1 1423 #define V_FW_RI_RES_WR_IQO(x) ((x) << S_FW_RI_RES_WR_IQO) 1424 #define G_FW_RI_RES_WR_IQO(x) \ 1425 (((x) >> S_FW_RI_RES_WR_IQO) & M_FW_RI_RES_WR_IQO) 1426 #define F_FW_RI_RES_WR_IQO V_FW_RI_RES_WR_IQO(1U) 1427 1428 #define S_FW_RI_RES_WR_IQCPRIO 2 1429 #define M_FW_RI_RES_WR_IQCPRIO 0x1 1430 #define V_FW_RI_RES_WR_IQCPRIO(x) ((x) << S_FW_RI_RES_WR_IQCPRIO) 1431 #define G_FW_RI_RES_WR_IQCPRIO(x) \ 1432 (((x) >> S_FW_RI_RES_WR_IQCPRIO) & M_FW_RI_RES_WR_IQCPRIO) 1433 #define F_FW_RI_RES_WR_IQCPRIO V_FW_RI_RES_WR_IQCPRIO(1U) 1434 1435 #define S_FW_RI_RES_WR_IQESIZE 0 1436 #define M_FW_RI_RES_WR_IQESIZE 0x3 1437 #define V_FW_RI_RES_WR_IQESIZE(x) ((x) << S_FW_RI_RES_WR_IQESIZE) 1438 #define G_FW_RI_RES_WR_IQESIZE(x) \ 1439 (((x) >> S_FW_RI_RES_WR_IQESIZE) & M_FW_RI_RES_WR_IQESIZE) 1440 1441 #define S_FW_RI_RES_WR_IQNS 31 1442 #define M_FW_RI_RES_WR_IQNS 0x1 1443 #define V_FW_RI_RES_WR_IQNS(x) ((x) << S_FW_RI_RES_WR_IQNS) 1444 #define G_FW_RI_RES_WR_IQNS(x) \ 1445 (((x) >> S_FW_RI_RES_WR_IQNS) & M_FW_RI_RES_WR_IQNS) 1446 #define F_FW_RI_RES_WR_IQNS V_FW_RI_RES_WR_IQNS(1U) 1447 1448 #define S_FW_RI_RES_WR_IQRO 30 1449 #define M_FW_RI_RES_WR_IQRO 0x1 1450 #define V_FW_RI_RES_WR_IQRO(x) ((x) << S_FW_RI_RES_WR_IQRO) 1451 #define G_FW_RI_RES_WR_IQRO(x) \ 1452 (((x) >> S_FW_RI_RES_WR_IQRO) & M_FW_RI_RES_WR_IQRO) 1453 #define F_FW_RI_RES_WR_IQRO V_FW_RI_RES_WR_IQRO(1U) 1454 1455 struct fw_ri_rdma_write_wr { 1456 __u8 opcode; 1457 __u8 flags; 1458 __u16 wrid; 1459 __u8 r1[3]; 1460 __u8 len16; 1461 __be64 r2; 1462 __be32 plen; 1463 __be32 stag_sink; 1464 __be64 to_sink; 1465 #ifndef C99_NOT_SUPPORTED 1466 union { 1467 struct fw_ri_immd immd_src[0]; 1468 struct fw_ri_isgl isgl_src[0]; 1469 } u; 1470 #endif 1471 }; 1472 1473 struct fw_ri_send_wr { 1474 __u8 opcode; 1475 __u8 flags; 1476 __u16 wrid; 1477 __u8 r1[3]; 1478 __u8 len16; 1479 __be32 sendop_pkd; 1480 __be32 stag_inv; 1481 __be32 plen; 1482 __be32 r3; 1483 __be64 r4; 1484 #ifndef C99_NOT_SUPPORTED 1485 union { 1486 struct fw_ri_immd immd_src[0]; 1487 struct fw_ri_isgl isgl_src[0]; 1488 } u; 1489 #endif 1490 }; 1491 1492 #define S_FW_RI_SEND_WR_SENDOP 0 1493 #define M_FW_RI_SEND_WR_SENDOP 0xf 1494 #define V_FW_RI_SEND_WR_SENDOP(x) ((x) << S_FW_RI_SEND_WR_SENDOP) 1495 #define G_FW_RI_SEND_WR_SENDOP(x) \ 1496 (((x) >> S_FW_RI_SEND_WR_SENDOP) & M_FW_RI_SEND_WR_SENDOP) 1497 1498 struct fw_ri_rdma_read_wr { 1499 __u8 opcode; 1500 __u8 flags; 1501 __u16 wrid; 1502 __u8 r1[3]; 1503 __u8 len16; 1504 __be64 r2; 1505 __be32 stag_sink; 1506 __be32 to_sink_hi; 1507 __be32 to_sink_lo; 1508 __be32 plen; 1509 __be32 stag_src; 1510 __be32 to_src_hi; 1511 __be32 to_src_lo; 1512 __be32 r5; 1513 }; 1514 1515 struct fw_ri_recv_wr { 1516 __u8 opcode; 1517 __u8 r1; 1518 __u16 wrid; 1519 __u8 r2[3]; 1520 __u8 len16; 1521 struct fw_ri_isgl isgl; 1522 }; 1523 1524 struct fw_ri_bind_mw_wr { 1525 __u8 opcode; 1526 __u8 flags; 1527 __u16 wrid; 1528 __u8 r1[3]; 1529 __u8 len16; 1530 __u8 qpbinde_to_dcacpu; 1531 __u8 pgsz_shift; 1532 __u8 addr_type; 1533 __u8 mem_perms; 1534 __be32 stag_mr; 1535 __be32 stag_mw; 1536 __be32 r3; 1537 __be64 len_mw; 1538 __be64 va_fbo; 1539 __be64 r4; 1540 }; 1541 1542 #define S_FW_RI_BIND_MW_WR_QPBINDE 6 1543 #define M_FW_RI_BIND_MW_WR_QPBINDE 0x1 1544 #define V_FW_RI_BIND_MW_WR_QPBINDE(x) ((x) << S_FW_RI_BIND_MW_WR_QPBINDE) 1545 #define G_FW_RI_BIND_MW_WR_QPBINDE(x) \ 1546 (((x) >> S_FW_RI_BIND_MW_WR_QPBINDE) & M_FW_RI_BIND_MW_WR_QPBINDE) 1547 #define F_FW_RI_BIND_MW_WR_QPBINDE V_FW_RI_BIND_MW_WR_QPBINDE(1U) 1548 1549 #define S_FW_RI_BIND_MW_WR_NS 5 1550 #define M_FW_RI_BIND_MW_WR_NS 0x1 1551 #define V_FW_RI_BIND_MW_WR_NS(x) ((x) << S_FW_RI_BIND_MW_WR_NS) 1552 #define G_FW_RI_BIND_MW_WR_NS(x) \ 1553 (((x) >> S_FW_RI_BIND_MW_WR_NS) & M_FW_RI_BIND_MW_WR_NS) 1554 #define F_FW_RI_BIND_MW_WR_NS V_FW_RI_BIND_MW_WR_NS(1U) 1555 1556 #define S_FW_RI_BIND_MW_WR_DCACPU 0 1557 #define M_FW_RI_BIND_MW_WR_DCACPU 0x1f 1558 #define V_FW_RI_BIND_MW_WR_DCACPU(x) ((x) << S_FW_RI_BIND_MW_WR_DCACPU) 1559 #define G_FW_RI_BIND_MW_WR_DCACPU(x) \ 1560 (((x) >> S_FW_RI_BIND_MW_WR_DCACPU) & M_FW_RI_BIND_MW_WR_DCACPU) 1561 1562 struct fw_ri_fr_nsmr_wr { 1563 __u8 opcode; 1564 __u8 flags; 1565 __u16 wrid; 1566 __u8 r1[3]; 1567 __u8 len16; 1568 __u8 qpbinde_to_dcacpu; 1569 __u8 pgsz_shift; 1570 __u8 addr_type; 1571 __u8 mem_perms; 1572 __be32 stag; 1573 __be32 len_hi; 1574 __be32 len_lo; 1575 __be32 va_hi; 1576 __be32 va_lo_fbo; 1577 }; 1578 1579 #define S_FW_RI_FR_NSMR_WR_QPBINDE 6 1580 #define M_FW_RI_FR_NSMR_WR_QPBINDE 0x1 1581 #define V_FW_RI_FR_NSMR_WR_QPBINDE(x) ((x) << S_FW_RI_FR_NSMR_WR_QPBINDE) 1582 #define G_FW_RI_FR_NSMR_WR_QPBINDE(x) \ 1583 (((x) >> S_FW_RI_FR_NSMR_WR_QPBINDE) & M_FW_RI_FR_NSMR_WR_QPBINDE) 1584 #define F_FW_RI_FR_NSMR_WR_QPBINDE V_FW_RI_FR_NSMR_WR_QPBINDE(1U) 1585 1586 #define S_FW_RI_FR_NSMR_WR_NS 5 1587 #define M_FW_RI_FR_NSMR_WR_NS 0x1 1588 #define V_FW_RI_FR_NSMR_WR_NS(x) ((x) << S_FW_RI_FR_NSMR_WR_NS) 1589 #define G_FW_RI_FR_NSMR_WR_NS(x) \ 1590 (((x) >> S_FW_RI_FR_NSMR_WR_NS) & M_FW_RI_FR_NSMR_WR_NS) 1591 #define F_FW_RI_FR_NSMR_WR_NS V_FW_RI_FR_NSMR_WR_NS(1U) 1592 1593 #define S_FW_RI_FR_NSMR_WR_DCACPU 0 1594 #define M_FW_RI_FR_NSMR_WR_DCACPU 0x1f 1595 #define V_FW_RI_FR_NSMR_WR_DCACPU(x) ((x) << S_FW_RI_FR_NSMR_WR_DCACPU) 1596 #define G_FW_RI_FR_NSMR_WR_DCACPU(x) \ 1597 (((x) >> S_FW_RI_FR_NSMR_WR_DCACPU) & M_FW_RI_FR_NSMR_WR_DCACPU) 1598 1599 struct fw_ri_inv_lstag_wr { 1600 __u8 opcode; 1601 __u8 flags; 1602 __u16 wrid; 1603 __u8 r1[3]; 1604 __u8 len16; 1605 __be32 r2; 1606 __be32 stag_inv; 1607 }; 1608 1609 struct fw_ri_send_immediate_wr { 1610 __u8 opcode; 1611 __u8 flags; 1612 __u16 wrid; 1613 __u8 r1[3]; 1614 __u8 len16; 1615 __be32 sendimmop_pkd; 1616 __be32 r3; 1617 __be32 plen; 1618 __be32 r4; 1619 __be64 r5; 1620 #ifndef C99_NOT_SUPPORTED 1621 struct fw_ri_immd immd_src[0]; 1622 #endif 1623 }; 1624 1625 #define S_FW_RI_SEND_IMMEDIATE_WR_SENDIMMOP 0 1626 #define M_FW_RI_SEND_IMMEDIATE_WR_SENDIMMOP 0xf 1627 #define V_FW_RI_SEND_IMMEDIATE_WR_SENDIMMOP(x) \ 1628 ((x) << S_FW_RI_SEND_IMMEDIATE_WR_SENDIMMOP) 1629 #define G_FW_RI_SEND_IMMEDIATE_WR_SENDIMMOP(x) \ 1630 (((x) >> S_FW_RI_SEND_IMMEDIATE_WR_SENDIMMOP) & \ 1631 M_FW_RI_SEND_IMMEDIATE_WR_SENDIMMOP) 1632 1633 enum fw_ri_atomic_op { 1634 FW_RI_ATOMIC_OP_FETCHADD, 1635 FW_RI_ATOMIC_OP_SWAP, 1636 FW_RI_ATOMIC_OP_CMDSWAP, 1637 }; 1638 1639 struct fw_ri_atomic_wr { 1640 __u8 opcode; 1641 __u8 flags; 1642 __u16 wrid; 1643 __u8 r1[3]; 1644 __u8 len16; 1645 __be32 atomicop_pkd; 1646 __be64 r3; 1647 __be32 aopcode_pkd; 1648 __be32 reqid; 1649 __be32 stag; 1650 __be32 to_hi; 1651 __be32 to_lo; 1652 __be32 addswap_data_hi; 1653 __be32 addswap_data_lo; 1654 __be32 addswap_mask_hi; 1655 __be32 addswap_mask_lo; 1656 __be32 compare_data_hi; 1657 __be32 compare_data_lo; 1658 __be32 compare_mask_hi; 1659 __be32 compare_mask_lo; 1660 __be32 r5; 1661 }; 1662 1663 #define S_FW_RI_ATOMIC_WR_ATOMICOP 0 1664 #define M_FW_RI_ATOMIC_WR_ATOMICOP 0xf 1665 #define V_FW_RI_ATOMIC_WR_ATOMICOP(x) ((x) << S_FW_RI_ATOMIC_WR_ATOMICOP) 1666 #define G_FW_RI_ATOMIC_WR_ATOMICOP(x) \ 1667 (((x) >> S_FW_RI_ATOMIC_WR_ATOMICOP) & M_FW_RI_ATOMIC_WR_ATOMICOP) 1668 1669 #define S_FW_RI_ATOMIC_WR_AOPCODE 0 1670 #define M_FW_RI_ATOMIC_WR_AOPCODE 0xf 1671 #define V_FW_RI_ATOMIC_WR_AOPCODE(x) ((x) << S_FW_RI_ATOMIC_WR_AOPCODE) 1672 #define G_FW_RI_ATOMIC_WR_AOPCODE(x) \ 1673 (((x) >> S_FW_RI_ATOMIC_WR_AOPCODE) & M_FW_RI_ATOMIC_WR_AOPCODE) 1674 1675 enum fw_ri_type { 1676 FW_RI_TYPE_INIT, 1677 FW_RI_TYPE_FINI, 1678 FW_RI_TYPE_TERMINATE 1679 }; 1680 1681 enum fw_ri_init_p2ptype { 1682 FW_RI_INIT_P2PTYPE_RDMA_WRITE = FW_RI_RDMA_WRITE, 1683 FW_RI_INIT_P2PTYPE_READ_REQ = FW_RI_READ_REQ, 1684 FW_RI_INIT_P2PTYPE_SEND = FW_RI_SEND, 1685 FW_RI_INIT_P2PTYPE_SEND_WITH_INV = FW_RI_SEND_WITH_INV, 1686 FW_RI_INIT_P2PTYPE_SEND_WITH_SE = FW_RI_SEND_WITH_SE, 1687 FW_RI_INIT_P2PTYPE_SEND_WITH_SE_INV = FW_RI_SEND_WITH_SE_INV, 1688 FW_RI_INIT_P2PTYPE_DISABLED = 0xf, 1689 }; 1690 1691 struct fw_ri_wr { 1692 __be32 op_compl; 1693 __be32 flowid_len16; 1694 __u64 cookie; 1695 union fw_ri { 1696 struct fw_ri_init { 1697 __u8 type; 1698 __u8 mpareqbit_p2ptype; 1699 __u8 r4[2]; 1700 __u8 mpa_attrs; 1701 __u8 qp_caps; 1702 __be16 nrqe; 1703 __be32 pdid; 1704 __be32 qpid; 1705 __be32 sq_eqid; 1706 __be32 rq_eqid; 1707 __be32 scqid; 1708 __be32 rcqid; 1709 __be32 ord_max; 1710 __be32 ird_max; 1711 __be32 iss; 1712 __be32 irs; 1713 __be32 hwrqsize; 1714 __be32 hwrqaddr; 1715 __be64 r5; 1716 union fw_ri_init_p2p { 1717 struct fw_ri_rdma_write_wr write; 1718 struct fw_ri_rdma_read_wr read; 1719 struct fw_ri_send_wr send; 1720 } u; 1721 } init; 1722 struct fw_ri_fini { 1723 __u8 type; 1724 __u8 r3[7]; 1725 __be64 r4; 1726 } fini; 1727 struct fw_ri_terminate { 1728 __u8 type; 1729 __u8 r3[3]; 1730 __be32 immdlen; 1731 __u8 termmsg[40]; 1732 } terminate; 1733 } u; 1734 }; 1735 1736 #define S_FW_RI_WR_MPAREQBIT 7 1737 #define M_FW_RI_WR_MPAREQBIT 0x1 1738 #define V_FW_RI_WR_MPAREQBIT(x) ((x) << S_FW_RI_WR_MPAREQBIT) 1739 #define G_FW_RI_WR_MPAREQBIT(x) \ 1740 (((x) >> S_FW_RI_WR_MPAREQBIT) & M_FW_RI_WR_MPAREQBIT) 1741 #define F_FW_RI_WR_MPAREQBIT V_FW_RI_WR_MPAREQBIT(1U) 1742 1743 #define S_FW_RI_WR_0BRRBIT 6 1744 #define M_FW_RI_WR_0BRRBIT 0x1 1745 #define V_FW_RI_WR_0BRRBIT(x) ((x) << S_FW_RI_WR_0BRRBIT) 1746 #define G_FW_RI_WR_0BRRBIT(x) \ 1747 (((x) >> S_FW_RI_WR_0BRRBIT) & M_FW_RI_WR_0BRRBIT) 1748 #define F_FW_RI_WR_0BRRBIT V_FW_RI_WR_0BRRBIT(1U) 1749 1750 #define S_FW_RI_WR_P2PTYPE 0 1751 #define M_FW_RI_WR_P2PTYPE 0xf 1752 #define V_FW_RI_WR_P2PTYPE(x) ((x) << S_FW_RI_WR_P2PTYPE) 1753 #define G_FW_RI_WR_P2PTYPE(x) \ 1754 (((x) >> S_FW_RI_WR_P2PTYPE) & M_FW_RI_WR_P2PTYPE) 1755 1756 /****************************************************************************** 1757 * F O i S C S I W O R K R E Q U E S T s 1758 *********************************************/ 1759 1760 #define FW_FOISCSI_NAME_MAX_LEN 224 1761 #define FW_FOISCSI_ALIAS_MAX_LEN 224 1762 #define FW_FOISCSI_CHAP_SEC_MAX_LEN 128 1763 #define FW_FOISCSI_INIT_NODE_MAX 8 1764 1765 enum fw_chnet_ifconf_wr_subop { 1766 FW_CHNET_IFCONF_WR_SUBOP_NONE = 0, 1767 1768 FW_CHNET_IFCONF_WR_SUBOP_IPV4_SET, 1769 FW_CHNET_IFCONF_WR_SUBOP_IPV4_GET, 1770 1771 FW_CHNET_IFCONF_WR_SUBOP_VLAN_IPV4_SET, 1772 FW_CHNET_IFCONF_WR_SUBOP_VLAN_IPV4_GET, 1773 1774 FW_CHNET_IFCONF_WR_SUBOP_IPV6_SET, 1775 FW_CHNET_IFCONF_WR_SUBOP_IPV6_GET, 1776 1777 FW_CHNET_IFCONF_WR_SUBOP_VLAN_SET, 1778 FW_CHNET_IFCONF_WR_SUBOP_VLAN_GET, 1779 1780 FW_CHNET_IFCONF_WR_SUBOP_MTU_SET, 1781 FW_CHNET_IFCONF_WR_SUBOP_MTU_GET, 1782 1783 FW_CHNET_IFCONF_WR_SUBOP_DHCP_SET, 1784 FW_CHNET_IFCONF_WR_SUBOP_DHCP_GET, 1785 1786 FW_CHNET_IFCONF_WR_SUBOP_MAX, 1787 }; 1788 1789 struct fw_chnet_ifconf_wr { 1790 __be32 op_compl; 1791 __be32 flowid_len16; 1792 __be64 cookie; 1793 __be32 if_flowid; 1794 __u8 idx; 1795 __u8 subop; 1796 __u8 retval; 1797 __u8 r2; 1798 __be64 r3; 1799 struct fw_chnet_ifconf_params { 1800 __be32 r0; 1801 __be16 vlanid; 1802 __be16 mtu; 1803 union fw_chnet_ifconf_addr_type { 1804 struct fw_chnet_ifconf_ipv4 { 1805 __be32 addr; 1806 __be32 mask; 1807 __be32 router; 1808 __be32 r0; 1809 __be64 r1; 1810 } ipv4; 1811 struct fw_chnet_ifconf_ipv6 { 1812 __be64 linklocal_lo; 1813 __be64 linklocal_hi; 1814 __be64 router_hi; 1815 __be64 router_lo; 1816 __be64 aconf_hi; 1817 __be64 aconf_lo; 1818 __be64 linklocal_aconf_hi; 1819 __be64 linklocal_aconf_lo; 1820 __be64 router_aconf_hi; 1821 __be64 router_aconf_lo; 1822 __be64 r0; 1823 } ipv6; 1824 } in_attr; 1825 } param; 1826 }; 1827 1828 enum fw_foiscsi_node_type { 1829 FW_FOISCSI_NODE_TYPE_INITIATOR = 0, 1830 FW_FOISCSI_NODE_TYPE_TARGET, 1831 }; 1832 1833 enum fw_foiscsi_session_type { 1834 FW_FOISCSI_SESSION_TYPE_DISCOVERY = 0, 1835 FW_FOISCSI_SESSION_TYPE_NORMAL, 1836 }; 1837 1838 enum fw_foiscsi_auth_policy { 1839 FW_FOISCSI_AUTH_POLICY_ONEWAY = 0, 1840 FW_FOISCSI_AUTH_POLICY_MUTUAL, 1841 }; 1842 1843 enum fw_foiscsi_auth_method { 1844 FW_FOISCSI_AUTH_METHOD_NONE = 0, 1845 FW_FOISCSI_AUTH_METHOD_CHAP, 1846 FW_FOISCSI_AUTH_METHOD_CHAP_FST, 1847 FW_FOISCSI_AUTH_METHOD_CHAP_SEC, 1848 }; 1849 1850 enum fw_foiscsi_digest_type { 1851 FW_FOISCSI_DIGEST_TYPE_NONE = 0, 1852 FW_FOISCSI_DIGEST_TYPE_CRC32, 1853 FW_FOISCSI_DIGEST_TYPE_CRC32_FST, 1854 FW_FOISCSI_DIGEST_TYPE_CRC32_SEC, 1855 }; 1856 1857 enum fw_foiscsi_wr_subop { 1858 FW_FOISCSI_WR_SUBOP_ADD = 1, 1859 FW_FOISCSI_WR_SUBOP_DEL = 2, 1860 FW_FOISCSI_WR_SUBOP_MOD = 4, 1861 }; 1862 1863 enum fw_foiscsi_ctrl_state { 1864 FW_FOISCSI_CTRL_STATE_FREE = 0, 1865 FW_FOISCSI_CTRL_STATE_ONLINE = 1, 1866 FW_FOISCSI_CTRL_STATE_FAILED, 1867 FW_FOISCSI_CTRL_STATE_IN_RECOVERY, 1868 FW_FOISCSI_CTRL_STATE_REDIRECT, 1869 }; 1870 1871 struct fw_rdev_wr { 1872 __be32 op_to_immdlen; 1873 __be32 alloc_to_len16; 1874 __be64 cookie; 1875 __u8 protocol; 1876 __u8 event_cause; 1877 __u8 cur_state; 1878 __u8 prev_state; 1879 __be32 flags_to_assoc_flowid; 1880 union rdev_entry { 1881 struct fcoe_rdev_entry { 1882 __be32 flowid; 1883 __u8 protocol; 1884 __u8 event_cause; 1885 __u8 flags; 1886 __u8 rjt_reason; 1887 __u8 cur_login_st; 1888 __u8 prev_login_st; 1889 __be16 rcv_fr_sz; 1890 __u8 rd_xfer_rdy_to_rport_type; 1891 __u8 vft_to_qos; 1892 __u8 org_proc_assoc_to_acc_rsp_code; 1893 __u8 enh_disc_to_tgt; 1894 __u8 wwnn[8]; 1895 __u8 wwpn[8]; 1896 __be16 iqid; 1897 __u8 fc_oui[3]; 1898 __u8 r_id[3]; 1899 } fcoe_rdev; 1900 struct iscsi_rdev_entry { 1901 __be32 flowid; 1902 __u8 protocol; 1903 __u8 event_cause; 1904 __u8 flags; 1905 __u8 r3; 1906 __be16 iscsi_opts; 1907 __be16 tcp_opts; 1908 __be16 ip_opts; 1909 __be16 max_rcv_len; 1910 __be16 max_snd_len; 1911 __be16 first_brst_len; 1912 __be16 max_brst_len; 1913 __be16 r4; 1914 __be16 def_time2wait; 1915 __be16 def_time2ret; 1916 __be16 nop_out_intrvl; 1917 __be16 non_scsi_to; 1918 __be16 isid; 1919 __be16 tsid; 1920 __be16 port; 1921 __be16 tpgt; 1922 __u8 r5[6]; 1923 __be16 iqid; 1924 } iscsi_rdev; 1925 } u; 1926 }; 1927 1928 #define S_FW_RDEV_WR_IMMDLEN 0 1929 #define M_FW_RDEV_WR_IMMDLEN 0xff 1930 #define V_FW_RDEV_WR_IMMDLEN(x) ((x) << S_FW_RDEV_WR_IMMDLEN) 1931 #define G_FW_RDEV_WR_IMMDLEN(x) \ 1932 (((x) >> S_FW_RDEV_WR_IMMDLEN) & M_FW_RDEV_WR_IMMDLEN) 1933 1934 #define S_FW_RDEV_WR_ALLOC 31 1935 #define M_FW_RDEV_WR_ALLOC 0x1 1936 #define V_FW_RDEV_WR_ALLOC(x) ((x) << S_FW_RDEV_WR_ALLOC) 1937 #define G_FW_RDEV_WR_ALLOC(x) \ 1938 (((x) >> S_FW_RDEV_WR_ALLOC) & M_FW_RDEV_WR_ALLOC) 1939 #define F_FW_RDEV_WR_ALLOC V_FW_RDEV_WR_ALLOC(1U) 1940 1941 #define S_FW_RDEV_WR_FREE 30 1942 #define M_FW_RDEV_WR_FREE 0x1 1943 #define V_FW_RDEV_WR_FREE(x) ((x) << S_FW_RDEV_WR_FREE) 1944 #define G_FW_RDEV_WR_FREE(x) \ 1945 (((x) >> S_FW_RDEV_WR_FREE) & M_FW_RDEV_WR_FREE) 1946 #define F_FW_RDEV_WR_FREE V_FW_RDEV_WR_FREE(1U) 1947 1948 #define S_FW_RDEV_WR_MODIFY 29 1949 #define M_FW_RDEV_WR_MODIFY 0x1 1950 #define V_FW_RDEV_WR_MODIFY(x) ((x) << S_FW_RDEV_WR_MODIFY) 1951 #define G_FW_RDEV_WR_MODIFY(x) \ 1952 (((x) >> S_FW_RDEV_WR_MODIFY) & M_FW_RDEV_WR_MODIFY) 1953 #define F_FW_RDEV_WR_MODIFY V_FW_RDEV_WR_MODIFY(1U) 1954 1955 #define S_FW_RDEV_WR_FLOWID 8 1956 #define M_FW_RDEV_WR_FLOWID 0xfffff 1957 #define V_FW_RDEV_WR_FLOWID(x) ((x) << S_FW_RDEV_WR_FLOWID) 1958 #define G_FW_RDEV_WR_FLOWID(x) \ 1959 (((x) >> S_FW_RDEV_WR_FLOWID) & M_FW_RDEV_WR_FLOWID) 1960 1961 #define S_FW_RDEV_WR_LEN16 0 1962 #define M_FW_RDEV_WR_LEN16 0xff 1963 #define V_FW_RDEV_WR_LEN16(x) ((x) << S_FW_RDEV_WR_LEN16) 1964 #define G_FW_RDEV_WR_LEN16(x) \ 1965 (((x) >> S_FW_RDEV_WR_LEN16) & M_FW_RDEV_WR_LEN16) 1966 1967 #define S_FW_RDEV_WR_FLAGS 24 1968 #define M_FW_RDEV_WR_FLAGS 0xff 1969 #define V_FW_RDEV_WR_FLAGS(x) ((x) << S_FW_RDEV_WR_FLAGS) 1970 #define G_FW_RDEV_WR_FLAGS(x) \ 1971 (((x) >> S_FW_RDEV_WR_FLAGS) & M_FW_RDEV_WR_FLAGS) 1972 1973 #define S_FW_RDEV_WR_GET_NEXT 20 1974 #define M_FW_RDEV_WR_GET_NEXT 0xf 1975 #define V_FW_RDEV_WR_GET_NEXT(x) ((x) << S_FW_RDEV_WR_GET_NEXT) 1976 #define G_FW_RDEV_WR_GET_NEXT(x) \ 1977 (((x) >> S_FW_RDEV_WR_GET_NEXT) & M_FW_RDEV_WR_GET_NEXT) 1978 1979 #define S_FW_RDEV_WR_ASSOC_FLOWID 0 1980 #define M_FW_RDEV_WR_ASSOC_FLOWID 0xfffff 1981 #define V_FW_RDEV_WR_ASSOC_FLOWID(x) ((x) << S_FW_RDEV_WR_ASSOC_FLOWID) 1982 #define G_FW_RDEV_WR_ASSOC_FLOWID(x) \ 1983 (((x) >> S_FW_RDEV_WR_ASSOC_FLOWID) & M_FW_RDEV_WR_ASSOC_FLOWID) 1984 1985 #define S_FW_RDEV_WR_RJT 7 1986 #define M_FW_RDEV_WR_RJT 0x1 1987 #define V_FW_RDEV_WR_RJT(x) ((x) << S_FW_RDEV_WR_RJT) 1988 #define G_FW_RDEV_WR_RJT(x) (((x) >> S_FW_RDEV_WR_RJT) & M_FW_RDEV_WR_RJT) 1989 #define F_FW_RDEV_WR_RJT V_FW_RDEV_WR_RJT(1U) 1990 1991 #define S_FW_RDEV_WR_REASON 0 1992 #define M_FW_RDEV_WR_REASON 0x7f 1993 #define V_FW_RDEV_WR_REASON(x) ((x) << S_FW_RDEV_WR_REASON) 1994 #define G_FW_RDEV_WR_REASON(x) \ 1995 (((x) >> S_FW_RDEV_WR_REASON) & M_FW_RDEV_WR_REASON) 1996 1997 #define S_FW_RDEV_WR_RD_XFER_RDY 7 1998 #define M_FW_RDEV_WR_RD_XFER_RDY 0x1 1999 #define V_FW_RDEV_WR_RD_XFER_RDY(x) ((x) << S_FW_RDEV_WR_RD_XFER_RDY) 2000 #define G_FW_RDEV_WR_RD_XFER_RDY(x) \ 2001 (((x) >> S_FW_RDEV_WR_RD_XFER_RDY) & M_FW_RDEV_WR_RD_XFER_RDY) 2002 #define F_FW_RDEV_WR_RD_XFER_RDY V_FW_RDEV_WR_RD_XFER_RDY(1U) 2003 2004 #define S_FW_RDEV_WR_WR_XFER_RDY 6 2005 #define M_FW_RDEV_WR_WR_XFER_RDY 0x1 2006 #define V_FW_RDEV_WR_WR_XFER_RDY(x) ((x) << S_FW_RDEV_WR_WR_XFER_RDY) 2007 #define G_FW_RDEV_WR_WR_XFER_RDY(x) \ 2008 (((x) >> S_FW_RDEV_WR_WR_XFER_RDY) & M_FW_RDEV_WR_WR_XFER_RDY) 2009 #define F_FW_RDEV_WR_WR_XFER_RDY V_FW_RDEV_WR_WR_XFER_RDY(1U) 2010 2011 #define S_FW_RDEV_WR_FC_SP 5 2012 #define M_FW_RDEV_WR_FC_SP 0x1 2013 #define V_FW_RDEV_WR_FC_SP(x) ((x) << S_FW_RDEV_WR_FC_SP) 2014 #define G_FW_RDEV_WR_FC_SP(x) \ 2015 (((x) >> S_FW_RDEV_WR_FC_SP) & M_FW_RDEV_WR_FC_SP) 2016 #define F_FW_RDEV_WR_FC_SP V_FW_RDEV_WR_FC_SP(1U) 2017 2018 #define S_FW_RDEV_WR_RPORT_TYPE 0 2019 #define M_FW_RDEV_WR_RPORT_TYPE 0x1f 2020 #define V_FW_RDEV_WR_RPORT_TYPE(x) ((x) << S_FW_RDEV_WR_RPORT_TYPE) 2021 #define G_FW_RDEV_WR_RPORT_TYPE(x) \ 2022 (((x) >> S_FW_RDEV_WR_RPORT_TYPE) & M_FW_RDEV_WR_RPORT_TYPE) 2023 2024 #define S_FW_RDEV_WR_VFT 7 2025 #define M_FW_RDEV_WR_VFT 0x1 2026 #define V_FW_RDEV_WR_VFT(x) ((x) << S_FW_RDEV_WR_VFT) 2027 #define G_FW_RDEV_WR_VFT(x) (((x) >> S_FW_RDEV_WR_VFT) & M_FW_RDEV_WR_VFT) 2028 #define F_FW_RDEV_WR_VFT V_FW_RDEV_WR_VFT(1U) 2029 2030 #define S_FW_RDEV_WR_NPIV 6 2031 #define M_FW_RDEV_WR_NPIV 0x1 2032 #define V_FW_RDEV_WR_NPIV(x) ((x) << S_FW_RDEV_WR_NPIV) 2033 #define G_FW_RDEV_WR_NPIV(x) \ 2034 (((x) >> S_FW_RDEV_WR_NPIV) & M_FW_RDEV_WR_NPIV) 2035 #define F_FW_RDEV_WR_NPIV V_FW_RDEV_WR_NPIV(1U) 2036 2037 #define S_FW_RDEV_WR_CLASS 4 2038 #define M_FW_RDEV_WR_CLASS 0x3 2039 #define V_FW_RDEV_WR_CLASS(x) ((x) << S_FW_RDEV_WR_CLASS) 2040 #define G_FW_RDEV_WR_CLASS(x) \ 2041 (((x) >> S_FW_RDEV_WR_CLASS) & M_FW_RDEV_WR_CLASS) 2042 2043 #define S_FW_RDEV_WR_SEQ_DEL 3 2044 #define M_FW_RDEV_WR_SEQ_DEL 0x1 2045 #define V_FW_RDEV_WR_SEQ_DEL(x) ((x) << S_FW_RDEV_WR_SEQ_DEL) 2046 #define G_FW_RDEV_WR_SEQ_DEL(x) \ 2047 (((x) >> S_FW_RDEV_WR_SEQ_DEL) & M_FW_RDEV_WR_SEQ_DEL) 2048 #define F_FW_RDEV_WR_SEQ_DEL V_FW_RDEV_WR_SEQ_DEL(1U) 2049 2050 #define S_FW_RDEV_WR_PRIO_PREEMP 2 2051 #define M_FW_RDEV_WR_PRIO_PREEMP 0x1 2052 #define V_FW_RDEV_WR_PRIO_PREEMP(x) ((x) << S_FW_RDEV_WR_PRIO_PREEMP) 2053 #define G_FW_RDEV_WR_PRIO_PREEMP(x) \ 2054 (((x) >> S_FW_RDEV_WR_PRIO_PREEMP) & M_FW_RDEV_WR_PRIO_PREEMP) 2055 #define F_FW_RDEV_WR_PRIO_PREEMP V_FW_RDEV_WR_PRIO_PREEMP(1U) 2056 2057 #define S_FW_RDEV_WR_PREF 1 2058 #define M_FW_RDEV_WR_PREF 0x1 2059 #define V_FW_RDEV_WR_PREF(x) ((x) << S_FW_RDEV_WR_PREF) 2060 #define G_FW_RDEV_WR_PREF(x) \ 2061 (((x) >> S_FW_RDEV_WR_PREF) & M_FW_RDEV_WR_PREF) 2062 #define F_FW_RDEV_WR_PREF V_FW_RDEV_WR_PREF(1U) 2063 2064 #define S_FW_RDEV_WR_QOS 0 2065 #define M_FW_RDEV_WR_QOS 0x1 2066 #define V_FW_RDEV_WR_QOS(x) ((x) << S_FW_RDEV_WR_QOS) 2067 #define G_FW_RDEV_WR_QOS(x) (((x) >> S_FW_RDEV_WR_QOS) & M_FW_RDEV_WR_QOS) 2068 #define F_FW_RDEV_WR_QOS V_FW_RDEV_WR_QOS(1U) 2069 2070 #define S_FW_RDEV_WR_ORG_PROC_ASSOC 7 2071 #define M_FW_RDEV_WR_ORG_PROC_ASSOC 0x1 2072 #define V_FW_RDEV_WR_ORG_PROC_ASSOC(x) ((x) << S_FW_RDEV_WR_ORG_PROC_ASSOC) 2073 #define G_FW_RDEV_WR_ORG_PROC_ASSOC(x) \ 2074 (((x) >> S_FW_RDEV_WR_ORG_PROC_ASSOC) & M_FW_RDEV_WR_ORG_PROC_ASSOC) 2075 #define F_FW_RDEV_WR_ORG_PROC_ASSOC V_FW_RDEV_WR_ORG_PROC_ASSOC(1U) 2076 2077 #define S_FW_RDEV_WR_RSP_PROC_ASSOC 6 2078 #define M_FW_RDEV_WR_RSP_PROC_ASSOC 0x1 2079 #define V_FW_RDEV_WR_RSP_PROC_ASSOC(x) ((x) << S_FW_RDEV_WR_RSP_PROC_ASSOC) 2080 #define G_FW_RDEV_WR_RSP_PROC_ASSOC(x) \ 2081 (((x) >> S_FW_RDEV_WR_RSP_PROC_ASSOC) & M_FW_RDEV_WR_RSP_PROC_ASSOC) 2082 #define F_FW_RDEV_WR_RSP_PROC_ASSOC V_FW_RDEV_WR_RSP_PROC_ASSOC(1U) 2083 2084 #define S_FW_RDEV_WR_IMAGE_PAIR 5 2085 #define M_FW_RDEV_WR_IMAGE_PAIR 0x1 2086 #define V_FW_RDEV_WR_IMAGE_PAIR(x) ((x) << S_FW_RDEV_WR_IMAGE_PAIR) 2087 #define G_FW_RDEV_WR_IMAGE_PAIR(x) \ 2088 (((x) >> S_FW_RDEV_WR_IMAGE_PAIR) & M_FW_RDEV_WR_IMAGE_PAIR) 2089 #define F_FW_RDEV_WR_IMAGE_PAIR V_FW_RDEV_WR_IMAGE_PAIR(1U) 2090 2091 #define S_FW_RDEV_WR_ACC_RSP_CODE 0 2092 #define M_FW_RDEV_WR_ACC_RSP_CODE 0x1f 2093 #define V_FW_RDEV_WR_ACC_RSP_CODE(x) ((x) << S_FW_RDEV_WR_ACC_RSP_CODE) 2094 #define G_FW_RDEV_WR_ACC_RSP_CODE(x) \ 2095 (((x) >> S_FW_RDEV_WR_ACC_RSP_CODE) & M_FW_RDEV_WR_ACC_RSP_CODE) 2096 2097 #define S_FW_RDEV_WR_ENH_DISC 7 2098 #define M_FW_RDEV_WR_ENH_DISC 0x1 2099 #define V_FW_RDEV_WR_ENH_DISC(x) ((x) << S_FW_RDEV_WR_ENH_DISC) 2100 #define G_FW_RDEV_WR_ENH_DISC(x) \ 2101 (((x) >> S_FW_RDEV_WR_ENH_DISC) & M_FW_RDEV_WR_ENH_DISC) 2102 #define F_FW_RDEV_WR_ENH_DISC V_FW_RDEV_WR_ENH_DISC(1U) 2103 2104 #define S_FW_RDEV_WR_REC 6 2105 #define M_FW_RDEV_WR_REC 0x1 2106 #define V_FW_RDEV_WR_REC(x) ((x) << S_FW_RDEV_WR_REC) 2107 #define G_FW_RDEV_WR_REC(x) (((x) >> S_FW_RDEV_WR_REC) & M_FW_RDEV_WR_REC) 2108 #define F_FW_RDEV_WR_REC V_FW_RDEV_WR_REC(1U) 2109 2110 #define S_FW_RDEV_WR_TASK_RETRY_ID 5 2111 #define M_FW_RDEV_WR_TASK_RETRY_ID 0x1 2112 #define V_FW_RDEV_WR_TASK_RETRY_ID(x) ((x) << S_FW_RDEV_WR_TASK_RETRY_ID) 2113 #define G_FW_RDEV_WR_TASK_RETRY_ID(x) \ 2114 (((x) >> S_FW_RDEV_WR_TASK_RETRY_ID) & M_FW_RDEV_WR_TASK_RETRY_ID) 2115 #define F_FW_RDEV_WR_TASK_RETRY_ID V_FW_RDEV_WR_TASK_RETRY_ID(1U) 2116 2117 #define S_FW_RDEV_WR_RETRY 4 2118 #define M_FW_RDEV_WR_RETRY 0x1 2119 #define V_FW_RDEV_WR_RETRY(x) ((x) << S_FW_RDEV_WR_RETRY) 2120 #define G_FW_RDEV_WR_RETRY(x) \ 2121 (((x) >> S_FW_RDEV_WR_RETRY) & M_FW_RDEV_WR_RETRY) 2122 #define F_FW_RDEV_WR_RETRY V_FW_RDEV_WR_RETRY(1U) 2123 2124 #define S_FW_RDEV_WR_CONF_CMPL 3 2125 #define M_FW_RDEV_WR_CONF_CMPL 0x1 2126 #define V_FW_RDEV_WR_CONF_CMPL(x) ((x) << S_FW_RDEV_WR_CONF_CMPL) 2127 #define G_FW_RDEV_WR_CONF_CMPL(x) \ 2128 (((x) >> S_FW_RDEV_WR_CONF_CMPL) & M_FW_RDEV_WR_CONF_CMPL) 2129 #define F_FW_RDEV_WR_CONF_CMPL V_FW_RDEV_WR_CONF_CMPL(1U) 2130 2131 #define S_FW_RDEV_WR_DATA_OVLY 2 2132 #define M_FW_RDEV_WR_DATA_OVLY 0x1 2133 #define V_FW_RDEV_WR_DATA_OVLY(x) ((x) << S_FW_RDEV_WR_DATA_OVLY) 2134 #define G_FW_RDEV_WR_DATA_OVLY(x) \ 2135 (((x) >> S_FW_RDEV_WR_DATA_OVLY) & M_FW_RDEV_WR_DATA_OVLY) 2136 #define F_FW_RDEV_WR_DATA_OVLY V_FW_RDEV_WR_DATA_OVLY(1U) 2137 2138 #define S_FW_RDEV_WR_INI 1 2139 #define M_FW_RDEV_WR_INI 0x1 2140 #define V_FW_RDEV_WR_INI(x) ((x) << S_FW_RDEV_WR_INI) 2141 #define G_FW_RDEV_WR_INI(x) (((x) >> S_FW_RDEV_WR_INI) & M_FW_RDEV_WR_INI) 2142 #define F_FW_RDEV_WR_INI V_FW_RDEV_WR_INI(1U) 2143 2144 #define S_FW_RDEV_WR_TGT 0 2145 #define M_FW_RDEV_WR_TGT 0x1 2146 #define V_FW_RDEV_WR_TGT(x) ((x) << S_FW_RDEV_WR_TGT) 2147 #define G_FW_RDEV_WR_TGT(x) (((x) >> S_FW_RDEV_WR_TGT) & M_FW_RDEV_WR_TGT) 2148 #define F_FW_RDEV_WR_TGT V_FW_RDEV_WR_TGT(1U) 2149 2150 struct fw_foiscsi_node_wr { 2151 __be32 op_to_immdlen; 2152 __be32 flowid_len16; 2153 __u64 cookie; 2154 __u8 subop; 2155 __u8 status; 2156 __u8 alias_len; 2157 __u8 iqn_len; 2158 __be32 node_flowid; 2159 __be16 nodeid; 2160 __be16 login_retry; 2161 __be16 retry_timeout; 2162 __be16 r3; 2163 __u8 iqn[224]; 2164 __u8 alias[224]; 2165 }; 2166 2167 #define S_FW_FOISCSI_NODE_WR_IMMDLEN 0 2168 #define M_FW_FOISCSI_NODE_WR_IMMDLEN 0xffff 2169 #define V_FW_FOISCSI_NODE_WR_IMMDLEN(x) ((x) << S_FW_FOISCSI_NODE_WR_IMMDLEN) 2170 #define G_FW_FOISCSI_NODE_WR_IMMDLEN(x) \ 2171 (((x) >> S_FW_FOISCSI_NODE_WR_IMMDLEN) & M_FW_FOISCSI_NODE_WR_IMMDLEN) 2172 2173 struct fw_foiscsi_ctrl_wr { 2174 __be32 op_compl; 2175 __be32 flowid_len16; 2176 __u64 cookie; 2177 __u8 subop; 2178 __u8 status; 2179 __u8 ctrl_state; 2180 __u8 io_state; 2181 __be32 node_id; 2182 __be32 ctrl_id; 2183 __be32 io_id; 2184 struct fw_foiscsi_sess_attr { 2185 __be32 sess_type_to_erl; 2186 __be16 max_conn; 2187 __be16 max_r2t; 2188 __be16 time2wait; 2189 __be16 time2retain; 2190 __be32 max_burst; 2191 __be32 first_burst; 2192 __be32 r1; 2193 } sess_attr; 2194 struct fw_foiscsi_conn_attr { 2195 __be32 hdigest_to_ddp_pgsz; 2196 __be32 max_rcv_dsl; 2197 __be32 ping_tmo; 2198 __be16 dst_port; 2199 __be16 src_port; 2200 union fw_foiscsi_conn_attr_addr { 2201 struct fw_foiscsi_conn_attr_ipv6 { 2202 __be64 dst_addr[2]; 2203 __be64 src_addr[2]; 2204 } ipv6_addr; 2205 struct fw_foiscsi_conn_attr_ipv4 { 2206 __be32 dst_addr; 2207 __be32 src_addr; 2208 } ipv4_addr; 2209 } u; 2210 } conn_attr; 2211 __u8 tgt_name_len; 2212 __u8 r3[7]; 2213 __u8 tgt_name[FW_FOISCSI_NAME_MAX_LEN]; 2214 }; 2215 2216 #define S_FW_FOISCSI_CTRL_WR_SESS_TYPE 30 2217 #define M_FW_FOISCSI_CTRL_WR_SESS_TYPE 0x3 2218 #define V_FW_FOISCSI_CTRL_WR_SESS_TYPE(x) \ 2219 ((x) << S_FW_FOISCSI_CTRL_WR_SESS_TYPE) 2220 #define G_FW_FOISCSI_CTRL_WR_SESS_TYPE(x) \ 2221 (((x) >> S_FW_FOISCSI_CTRL_WR_SESS_TYPE) & M_FW_FOISCSI_CTRL_WR_SESS_TYPE) 2222 2223 #define S_FW_FOISCSI_CTRL_WR_SEQ_INORDER 29 2224 #define M_FW_FOISCSI_CTRL_WR_SEQ_INORDER 0x1 2225 #define V_FW_FOISCSI_CTRL_WR_SEQ_INORDER(x) \ 2226 ((x) << S_FW_FOISCSI_CTRL_WR_SEQ_INORDER) 2227 #define G_FW_FOISCSI_CTRL_WR_SEQ_INORDER(x) \ 2228 (((x) >> S_FW_FOISCSI_CTRL_WR_SEQ_INORDER) & \ 2229 M_FW_FOISCSI_CTRL_WR_SEQ_INORDER) 2230 #define F_FW_FOISCSI_CTRL_WR_SEQ_INORDER \ 2231 V_FW_FOISCSI_CTRL_WR_SEQ_INORDER(1U) 2232 2233 #define S_FW_FOISCSI_CTRL_WR_PDU_INORDER 28 2234 #define M_FW_FOISCSI_CTRL_WR_PDU_INORDER 0x1 2235 #define V_FW_FOISCSI_CTRL_WR_PDU_INORDER(x) \ 2236 ((x) << S_FW_FOISCSI_CTRL_WR_PDU_INORDER) 2237 #define G_FW_FOISCSI_CTRL_WR_PDU_INORDER(x) \ 2238 (((x) >> S_FW_FOISCSI_CTRL_WR_PDU_INORDER) & \ 2239 M_FW_FOISCSI_CTRL_WR_PDU_INORDER) 2240 #define F_FW_FOISCSI_CTRL_WR_PDU_INORDER \ 2241 V_FW_FOISCSI_CTRL_WR_PDU_INORDER(1U) 2242 2243 #define S_FW_FOISCSI_CTRL_WR_IMMD_DATA_EN 27 2244 #define M_FW_FOISCSI_CTRL_WR_IMMD_DATA_EN 0x1 2245 #define V_FW_FOISCSI_CTRL_WR_IMMD_DATA_EN(x) \ 2246 ((x) << S_FW_FOISCSI_CTRL_WR_IMMD_DATA_EN) 2247 #define G_FW_FOISCSI_CTRL_WR_IMMD_DATA_EN(x) \ 2248 (((x) >> S_FW_FOISCSI_CTRL_WR_IMMD_DATA_EN) & \ 2249 M_FW_FOISCSI_CTRL_WR_IMMD_DATA_EN) 2250 #define F_FW_FOISCSI_CTRL_WR_IMMD_DATA_EN \ 2251 V_FW_FOISCSI_CTRL_WR_IMMD_DATA_EN(1U) 2252 2253 #define S_FW_FOISCSI_CTRL_WR_INIT_R2T_EN 26 2254 #define M_FW_FOISCSI_CTRL_WR_INIT_R2T_EN 0x1 2255 #define V_FW_FOISCSI_CTRL_WR_INIT_R2T_EN(x) \ 2256 ((x) << S_FW_FOISCSI_CTRL_WR_INIT_R2T_EN) 2257 #define G_FW_FOISCSI_CTRL_WR_INIT_R2T_EN(x) \ 2258 (((x) >> S_FW_FOISCSI_CTRL_WR_INIT_R2T_EN) & \ 2259 M_FW_FOISCSI_CTRL_WR_INIT_R2T_EN) 2260 #define F_FW_FOISCSI_CTRL_WR_INIT_R2T_EN \ 2261 V_FW_FOISCSI_CTRL_WR_INIT_R2T_EN(1U) 2262 2263 #define S_FW_FOISCSI_CTRL_WR_ERL 24 2264 #define M_FW_FOISCSI_CTRL_WR_ERL 0x3 2265 #define V_FW_FOISCSI_CTRL_WR_ERL(x) ((x) << S_FW_FOISCSI_CTRL_WR_ERL) 2266 #define G_FW_FOISCSI_CTRL_WR_ERL(x) \ 2267 (((x) >> S_FW_FOISCSI_CTRL_WR_ERL) & M_FW_FOISCSI_CTRL_WR_ERL) 2268 2269 #define S_FW_FOISCSI_CTRL_WR_HDIGEST 30 2270 #define M_FW_FOISCSI_CTRL_WR_HDIGEST 0x3 2271 #define V_FW_FOISCSI_CTRL_WR_HDIGEST(x) ((x) << S_FW_FOISCSI_CTRL_WR_HDIGEST) 2272 #define G_FW_FOISCSI_CTRL_WR_HDIGEST(x) \ 2273 (((x) >> S_FW_FOISCSI_CTRL_WR_HDIGEST) & M_FW_FOISCSI_CTRL_WR_HDIGEST) 2274 2275 #define S_FW_FOISCSI_CTRL_WR_DDIGEST 28 2276 #define M_FW_FOISCSI_CTRL_WR_DDIGEST 0x3 2277 #define V_FW_FOISCSI_CTRL_WR_DDIGEST(x) ((x) << S_FW_FOISCSI_CTRL_WR_DDIGEST) 2278 #define G_FW_FOISCSI_CTRL_WR_DDIGEST(x) \ 2279 (((x) >> S_FW_FOISCSI_CTRL_WR_DDIGEST) & M_FW_FOISCSI_CTRL_WR_DDIGEST) 2280 2281 #define S_FW_FOISCSI_CTRL_WR_AUTH_METHOD 25 2282 #define M_FW_FOISCSI_CTRL_WR_AUTH_METHOD 0x7 2283 #define V_FW_FOISCSI_CTRL_WR_AUTH_METHOD(x) \ 2284 ((x) << S_FW_FOISCSI_CTRL_WR_AUTH_METHOD) 2285 #define G_FW_FOISCSI_CTRL_WR_AUTH_METHOD(x) \ 2286 (((x) >> S_FW_FOISCSI_CTRL_WR_AUTH_METHOD) & \ 2287 M_FW_FOISCSI_CTRL_WR_AUTH_METHOD) 2288 2289 #define S_FW_FOISCSI_CTRL_WR_AUTH_POLICY 23 2290 #define M_FW_FOISCSI_CTRL_WR_AUTH_POLICY 0x3 2291 #define V_FW_FOISCSI_CTRL_WR_AUTH_POLICY(x) \ 2292 ((x) << S_FW_FOISCSI_CTRL_WR_AUTH_POLICY) 2293 #define G_FW_FOISCSI_CTRL_WR_AUTH_POLICY(x) \ 2294 (((x) >> S_FW_FOISCSI_CTRL_WR_AUTH_POLICY) & \ 2295 M_FW_FOISCSI_CTRL_WR_AUTH_POLICY) 2296 2297 #define S_FW_FOISCSI_CTRL_WR_DDP_PGSZ 21 2298 #define M_FW_FOISCSI_CTRL_WR_DDP_PGSZ 0x3 2299 #define V_FW_FOISCSI_CTRL_WR_DDP_PGSZ(x) \ 2300 ((x) << S_FW_FOISCSI_CTRL_WR_DDP_PGSZ) 2301 #define G_FW_FOISCSI_CTRL_WR_DDP_PGSZ(x) \ 2302 (((x) >> S_FW_FOISCSI_CTRL_WR_DDP_PGSZ) & M_FW_FOISCSI_CTRL_WR_DDP_PGSZ) 2303 2304 struct fw_foiscsi_chap_wr { 2305 __be32 op_compl; 2306 __be32 flowid_len16; 2307 __u64 cookie; 2308 __u8 status; 2309 __u8 id_len; 2310 __u8 sec_len; 2311 __u8 node_type; 2312 __be16 node_id; 2313 __u8 r3[2]; 2314 __u8 chap_id[FW_FOISCSI_NAME_MAX_LEN]; 2315 __u8 chap_sec[FW_FOISCSI_CHAP_SEC_MAX_LEN]; 2316 }; 2317 2318 /****************************************************************************** 2319 * F O F C O E W O R K R E Q U E S T s 2320 *******************************************/ 2321 2322 struct fw_fcoe_els_ct_wr { 2323 __be32 op_immdlen; 2324 __be32 flowid_len16; 2325 __be64 cookie; 2326 __be16 iqid; 2327 __u8 tmo_val; 2328 __u8 els_ct_type; 2329 __u8 ctl_pri; 2330 __u8 cp_en_class; 2331 __be16 xfer_cnt; 2332 __u8 fl_to_sp; 2333 __u8 l_id[3]; 2334 __u8 r5; 2335 __u8 r_id[3]; 2336 __be64 rsp_dmaaddr; 2337 __be32 rsp_dmalen; 2338 __be32 r6; 2339 }; 2340 2341 #define S_FW_FCOE_ELS_CT_WR_OPCODE 24 2342 #define M_FW_FCOE_ELS_CT_WR_OPCODE 0xff 2343 #define V_FW_FCOE_ELS_CT_WR_OPCODE(x) ((x) << S_FW_FCOE_ELS_CT_WR_OPCODE) 2344 #define G_FW_FCOE_ELS_CT_WR_OPCODE(x) \ 2345 (((x) >> S_FW_FCOE_ELS_CT_WR_OPCODE) & M_FW_FCOE_ELS_CT_WR_OPCODE) 2346 2347 #define S_FW_FCOE_ELS_CT_WR_IMMDLEN 0 2348 #define M_FW_FCOE_ELS_CT_WR_IMMDLEN 0xff 2349 #define V_FW_FCOE_ELS_CT_WR_IMMDLEN(x) ((x) << S_FW_FCOE_ELS_CT_WR_IMMDLEN) 2350 #define G_FW_FCOE_ELS_CT_WR_IMMDLEN(x) \ 2351 (((x) >> S_FW_FCOE_ELS_CT_WR_IMMDLEN) & M_FW_FCOE_ELS_CT_WR_IMMDLEN) 2352 2353 #define S_FW_FCOE_ELS_CT_WR_FLOWID 8 2354 #define M_FW_FCOE_ELS_CT_WR_FLOWID 0xfffff 2355 #define V_FW_FCOE_ELS_CT_WR_FLOWID(x) ((x) << S_FW_FCOE_ELS_CT_WR_FLOWID) 2356 #define G_FW_FCOE_ELS_CT_WR_FLOWID(x) \ 2357 (((x) >> S_FW_FCOE_ELS_CT_WR_FLOWID) & M_FW_FCOE_ELS_CT_WR_FLOWID) 2358 2359 #define S_FW_FCOE_ELS_CT_WR_LEN16 0 2360 #define M_FW_FCOE_ELS_CT_WR_LEN16 0xff 2361 #define V_FW_FCOE_ELS_CT_WR_LEN16(x) ((x) << S_FW_FCOE_ELS_CT_WR_LEN16) 2362 #define G_FW_FCOE_ELS_CT_WR_LEN16(x) \ 2363 (((x) >> S_FW_FCOE_ELS_CT_WR_LEN16) & M_FW_FCOE_ELS_CT_WR_LEN16) 2364 2365 #define S_FW_FCOE_ELS_CT_WR_CP_EN 6 2366 #define M_FW_FCOE_ELS_CT_WR_CP_EN 0x3 2367 #define V_FW_FCOE_ELS_CT_WR_CP_EN(x) ((x) << S_FW_FCOE_ELS_CT_WR_CP_EN) 2368 #define G_FW_FCOE_ELS_CT_WR_CP_EN(x) \ 2369 (((x) >> S_FW_FCOE_ELS_CT_WR_CP_EN) & M_FW_FCOE_ELS_CT_WR_CP_EN) 2370 2371 #define S_FW_FCOE_ELS_CT_WR_CLASS 4 2372 #define M_FW_FCOE_ELS_CT_WR_CLASS 0x3 2373 #define V_FW_FCOE_ELS_CT_WR_CLASS(x) ((x) << S_FW_FCOE_ELS_CT_WR_CLASS) 2374 #define G_FW_FCOE_ELS_CT_WR_CLASS(x) \ 2375 (((x) >> S_FW_FCOE_ELS_CT_WR_CLASS) & M_FW_FCOE_ELS_CT_WR_CLASS) 2376 2377 #define S_FW_FCOE_ELS_CT_WR_FL 2 2378 #define M_FW_FCOE_ELS_CT_WR_FL 0x1 2379 #define V_FW_FCOE_ELS_CT_WR_FL(x) ((x) << S_FW_FCOE_ELS_CT_WR_FL) 2380 #define G_FW_FCOE_ELS_CT_WR_FL(x) \ 2381 (((x) >> S_FW_FCOE_ELS_CT_WR_FL) & M_FW_FCOE_ELS_CT_WR_FL) 2382 #define F_FW_FCOE_ELS_CT_WR_FL V_FW_FCOE_ELS_CT_WR_FL(1U) 2383 2384 #define S_FW_FCOE_ELS_CT_WR_NPIV 1 2385 #define M_FW_FCOE_ELS_CT_WR_NPIV 0x1 2386 #define V_FW_FCOE_ELS_CT_WR_NPIV(x) ((x) << S_FW_FCOE_ELS_CT_WR_NPIV) 2387 #define G_FW_FCOE_ELS_CT_WR_NPIV(x) \ 2388 (((x) >> S_FW_FCOE_ELS_CT_WR_NPIV) & M_FW_FCOE_ELS_CT_WR_NPIV) 2389 #define F_FW_FCOE_ELS_CT_WR_NPIV V_FW_FCOE_ELS_CT_WR_NPIV(1U) 2390 2391 #define S_FW_FCOE_ELS_CT_WR_SP 0 2392 #define M_FW_FCOE_ELS_CT_WR_SP 0x1 2393 #define V_FW_FCOE_ELS_CT_WR_SP(x) ((x) << S_FW_FCOE_ELS_CT_WR_SP) 2394 #define G_FW_FCOE_ELS_CT_WR_SP(x) \ 2395 (((x) >> S_FW_FCOE_ELS_CT_WR_SP) & M_FW_FCOE_ELS_CT_WR_SP) 2396 #define F_FW_FCOE_ELS_CT_WR_SP V_FW_FCOE_ELS_CT_WR_SP(1U) 2397 2398 /****************************************************************************** 2399 * S C S I W O R K R E Q U E S T s (FOiSCSI and FCOE unified data path) 2400 *****************************************************************************/ 2401 2402 struct fw_scsi_write_wr { 2403 __be32 op_immdlen; 2404 __be32 flowid_len16; 2405 __be64 cookie; 2406 __be16 iqid; 2407 __u8 tmo_val; 2408 __u8 use_xfer_cnt; 2409 union fw_scsi_write_priv { 2410 struct fcoe_write_priv { 2411 __u8 ctl_pri; 2412 __u8 cp_en_class; 2413 __u8 r3_lo[2]; 2414 } fcoe; 2415 struct iscsi_write_priv { 2416 __u8 r3[4]; 2417 } iscsi; 2418 } u; 2419 __be32 xfer_cnt; 2420 __be32 ini_xfer_cnt; 2421 __be64 rsp_dmaaddr; 2422 __be32 rsp_dmalen; 2423 __be32 r4; 2424 }; 2425 2426 #define S_FW_SCSI_WRITE_WR_OPCODE 24 2427 #define M_FW_SCSI_WRITE_WR_OPCODE 0xff 2428 #define V_FW_SCSI_WRITE_WR_OPCODE(x) ((x) << S_FW_SCSI_WRITE_WR_OPCODE) 2429 #define G_FW_SCSI_WRITE_WR_OPCODE(x) \ 2430 (((x) >> S_FW_SCSI_WRITE_WR_OPCODE) & M_FW_SCSI_WRITE_WR_OPCODE) 2431 2432 #define S_FW_SCSI_WRITE_WR_IMMDLEN 0 2433 #define M_FW_SCSI_WRITE_WR_IMMDLEN 0xff 2434 #define V_FW_SCSI_WRITE_WR_IMMDLEN(x) ((x) << S_FW_SCSI_WRITE_WR_IMMDLEN) 2435 #define G_FW_SCSI_WRITE_WR_IMMDLEN(x) \ 2436 (((x) >> S_FW_SCSI_WRITE_WR_IMMDLEN) & M_FW_SCSI_WRITE_WR_IMMDLEN) 2437 2438 #define S_FW_SCSI_WRITE_WR_FLOWID 8 2439 #define M_FW_SCSI_WRITE_WR_FLOWID 0xfffff 2440 #define V_FW_SCSI_WRITE_WR_FLOWID(x) ((x) << S_FW_SCSI_WRITE_WR_FLOWID) 2441 #define G_FW_SCSI_WRITE_WR_FLOWID(x) \ 2442 (((x) >> S_FW_SCSI_WRITE_WR_FLOWID) & M_FW_SCSI_WRITE_WR_FLOWID) 2443 2444 #define S_FW_SCSI_WRITE_WR_LEN16 0 2445 #define M_FW_SCSI_WRITE_WR_LEN16 0xff 2446 #define V_FW_SCSI_WRITE_WR_LEN16(x) ((x) << S_FW_SCSI_WRITE_WR_LEN16) 2447 #define G_FW_SCSI_WRITE_WR_LEN16(x) \ 2448 (((x) >> S_FW_SCSI_WRITE_WR_LEN16) & M_FW_SCSI_WRITE_WR_LEN16) 2449 2450 #define S_FW_SCSI_WRITE_WR_CP_EN 6 2451 #define M_FW_SCSI_WRITE_WR_CP_EN 0x3 2452 #define V_FW_SCSI_WRITE_WR_CP_EN(x) ((x) << S_FW_SCSI_WRITE_WR_CP_EN) 2453 #define G_FW_SCSI_WRITE_WR_CP_EN(x) \ 2454 (((x) >> S_FW_SCSI_WRITE_WR_CP_EN) & M_FW_SCSI_WRITE_WR_CP_EN) 2455 2456 #define S_FW_SCSI_WRITE_WR_CLASS 4 2457 #define M_FW_SCSI_WRITE_WR_CLASS 0x3 2458 #define V_FW_SCSI_WRITE_WR_CLASS(x) ((x) << S_FW_SCSI_WRITE_WR_CLASS) 2459 #define G_FW_SCSI_WRITE_WR_CLASS(x) \ 2460 (((x) >> S_FW_SCSI_WRITE_WR_CLASS) & M_FW_SCSI_WRITE_WR_CLASS) 2461 2462 struct fw_scsi_read_wr { 2463 __be32 op_immdlen; 2464 __be32 flowid_len16; 2465 __be64 cookie; 2466 __be16 iqid; 2467 __u8 tmo_val; 2468 __u8 use_xfer_cnt; 2469 union fw_scsi_read_priv { 2470 struct fcoe_read_priv { 2471 __u8 ctl_pri; 2472 __u8 cp_en_class; 2473 __u8 r3_lo[2]; 2474 } fcoe; 2475 struct iscsi_read_priv { 2476 __u8 r3[4]; 2477 } iscsi; 2478 } u; 2479 __be32 xfer_cnt; 2480 __be32 ini_xfer_cnt; 2481 __be64 rsp_dmaaddr; 2482 __be32 rsp_dmalen; 2483 __be32 r4; 2484 }; 2485 2486 #define S_FW_SCSI_READ_WR_OPCODE 24 2487 #define M_FW_SCSI_READ_WR_OPCODE 0xff 2488 #define V_FW_SCSI_READ_WR_OPCODE(x) ((x) << S_FW_SCSI_READ_WR_OPCODE) 2489 #define G_FW_SCSI_READ_WR_OPCODE(x) \ 2490 (((x) >> S_FW_SCSI_READ_WR_OPCODE) & M_FW_SCSI_READ_WR_OPCODE) 2491 2492 #define S_FW_SCSI_READ_WR_IMMDLEN 0 2493 #define M_FW_SCSI_READ_WR_IMMDLEN 0xff 2494 #define V_FW_SCSI_READ_WR_IMMDLEN(x) ((x) << S_FW_SCSI_READ_WR_IMMDLEN) 2495 #define G_FW_SCSI_READ_WR_IMMDLEN(x) \ 2496 (((x) >> S_FW_SCSI_READ_WR_IMMDLEN) & M_FW_SCSI_READ_WR_IMMDLEN) 2497 2498 #define S_FW_SCSI_READ_WR_FLOWID 8 2499 #define M_FW_SCSI_READ_WR_FLOWID 0xfffff 2500 #define V_FW_SCSI_READ_WR_FLOWID(x) ((x) << S_FW_SCSI_READ_WR_FLOWID) 2501 #define G_FW_SCSI_READ_WR_FLOWID(x) \ 2502 (((x) >> S_FW_SCSI_READ_WR_FLOWID) & M_FW_SCSI_READ_WR_FLOWID) 2503 2504 #define S_FW_SCSI_READ_WR_LEN16 0 2505 #define M_FW_SCSI_READ_WR_LEN16 0xff 2506 #define V_FW_SCSI_READ_WR_LEN16(x) ((x) << S_FW_SCSI_READ_WR_LEN16) 2507 #define G_FW_SCSI_READ_WR_LEN16(x) \ 2508 (((x) >> S_FW_SCSI_READ_WR_LEN16) & M_FW_SCSI_READ_WR_LEN16) 2509 2510 #define S_FW_SCSI_READ_WR_CP_EN 6 2511 #define M_FW_SCSI_READ_WR_CP_EN 0x3 2512 #define V_FW_SCSI_READ_WR_CP_EN(x) ((x) << S_FW_SCSI_READ_WR_CP_EN) 2513 #define G_FW_SCSI_READ_WR_CP_EN(x) \ 2514 (((x) >> S_FW_SCSI_READ_WR_CP_EN) & M_FW_SCSI_READ_WR_CP_EN) 2515 2516 #define S_FW_SCSI_READ_WR_CLASS 4 2517 #define M_FW_SCSI_READ_WR_CLASS 0x3 2518 #define V_FW_SCSI_READ_WR_CLASS(x) ((x) << S_FW_SCSI_READ_WR_CLASS) 2519 #define G_FW_SCSI_READ_WR_CLASS(x) \ 2520 (((x) >> S_FW_SCSI_READ_WR_CLASS) & M_FW_SCSI_READ_WR_CLASS) 2521 2522 struct fw_scsi_cmd_wr { 2523 __be32 op_immdlen; 2524 __be32 flowid_len16; 2525 __be64 cookie; 2526 __be16 iqid; 2527 __u8 tmo_val; 2528 __u8 r3; 2529 union fw_scsi_cmd_priv { 2530 struct fcoe_cmd_priv { 2531 __u8 ctl_pri; 2532 __u8 cp_en_class; 2533 __u8 r4_lo[2]; 2534 } fcoe; 2535 struct iscsi_cmd_priv { 2536 __u8 r4[4]; 2537 } iscsi; 2538 } u; 2539 __u8 r5[8]; 2540 __be64 rsp_dmaaddr; 2541 __be32 rsp_dmalen; 2542 __be32 r6; 2543 }; 2544 2545 #define S_FW_SCSI_CMD_WR_OPCODE 24 2546 #define M_FW_SCSI_CMD_WR_OPCODE 0xff 2547 #define V_FW_SCSI_CMD_WR_OPCODE(x) ((x) << S_FW_SCSI_CMD_WR_OPCODE) 2548 #define G_FW_SCSI_CMD_WR_OPCODE(x) \ 2549 (((x) >> S_FW_SCSI_CMD_WR_OPCODE) & M_FW_SCSI_CMD_WR_OPCODE) 2550 2551 #define S_FW_SCSI_CMD_WR_IMMDLEN 0 2552 #define M_FW_SCSI_CMD_WR_IMMDLEN 0xff 2553 #define V_FW_SCSI_CMD_WR_IMMDLEN(x) ((x) << S_FW_SCSI_CMD_WR_IMMDLEN) 2554 #define G_FW_SCSI_CMD_WR_IMMDLEN(x) \ 2555 (((x) >> S_FW_SCSI_CMD_WR_IMMDLEN) & M_FW_SCSI_CMD_WR_IMMDLEN) 2556 2557 #define S_FW_SCSI_CMD_WR_FLOWID 8 2558 #define M_FW_SCSI_CMD_WR_FLOWID 0xfffff 2559 #define V_FW_SCSI_CMD_WR_FLOWID(x) ((x) << S_FW_SCSI_CMD_WR_FLOWID) 2560 #define G_FW_SCSI_CMD_WR_FLOWID(x) \ 2561 (((x) >> S_FW_SCSI_CMD_WR_FLOWID) & M_FW_SCSI_CMD_WR_FLOWID) 2562 2563 #define S_FW_SCSI_CMD_WR_LEN16 0 2564 #define M_FW_SCSI_CMD_WR_LEN16 0xff 2565 #define V_FW_SCSI_CMD_WR_LEN16(x) ((x) << S_FW_SCSI_CMD_WR_LEN16) 2566 #define G_FW_SCSI_CMD_WR_LEN16(x) \ 2567 (((x) >> S_FW_SCSI_CMD_WR_LEN16) & M_FW_SCSI_CMD_WR_LEN16) 2568 2569 #define S_FW_SCSI_CMD_WR_CP_EN 6 2570 #define M_FW_SCSI_CMD_WR_CP_EN 0x3 2571 #define V_FW_SCSI_CMD_WR_CP_EN(x) ((x) << S_FW_SCSI_CMD_WR_CP_EN) 2572 #define G_FW_SCSI_CMD_WR_CP_EN(x) \ 2573 (((x) >> S_FW_SCSI_CMD_WR_CP_EN) & M_FW_SCSI_CMD_WR_CP_EN) 2574 2575 #define S_FW_SCSI_CMD_WR_CLASS 4 2576 #define M_FW_SCSI_CMD_WR_CLASS 0x3 2577 #define V_FW_SCSI_CMD_WR_CLASS(x) ((x) << S_FW_SCSI_CMD_WR_CLASS) 2578 #define G_FW_SCSI_CMD_WR_CLASS(x) \ 2579 (((x) >> S_FW_SCSI_CMD_WR_CLASS) & M_FW_SCSI_CMD_WR_CLASS) 2580 2581 struct fw_scsi_abrt_cls_wr { 2582 __be32 op_immdlen; 2583 __be32 flowid_len16; 2584 __be64 cookie; 2585 __be16 iqid; 2586 __u8 tmo_val; 2587 __u8 sub_opcode_to_chk_all_io; 2588 __u8 r3[4]; 2589 __be64 t_cookie; 2590 }; 2591 2592 #define S_FW_SCSI_ABRT_CLS_WR_OPCODE 24 2593 #define M_FW_SCSI_ABRT_CLS_WR_OPCODE 0xff 2594 #define V_FW_SCSI_ABRT_CLS_WR_OPCODE(x) ((x) << S_FW_SCSI_ABRT_CLS_WR_OPCODE) 2595 #define G_FW_SCSI_ABRT_CLS_WR_OPCODE(x) \ 2596 (((x) >> S_FW_SCSI_ABRT_CLS_WR_OPCODE) & M_FW_SCSI_ABRT_CLS_WR_OPCODE) 2597 2598 #define S_FW_SCSI_ABRT_CLS_WR_IMMDLEN 0 2599 #define M_FW_SCSI_ABRT_CLS_WR_IMMDLEN 0xff 2600 #define V_FW_SCSI_ABRT_CLS_WR_IMMDLEN(x) \ 2601 ((x) << S_FW_SCSI_ABRT_CLS_WR_IMMDLEN) 2602 #define G_FW_SCSI_ABRT_CLS_WR_IMMDLEN(x) \ 2603 (((x) >> S_FW_SCSI_ABRT_CLS_WR_IMMDLEN) & M_FW_SCSI_ABRT_CLS_WR_IMMDLEN) 2604 2605 #define S_FW_SCSI_ABRT_CLS_WR_FLOWID 8 2606 #define M_FW_SCSI_ABRT_CLS_WR_FLOWID 0xfffff 2607 #define V_FW_SCSI_ABRT_CLS_WR_FLOWID(x) ((x) << S_FW_SCSI_ABRT_CLS_WR_FLOWID) 2608 #define G_FW_SCSI_ABRT_CLS_WR_FLOWID(x) \ 2609 (((x) >> S_FW_SCSI_ABRT_CLS_WR_FLOWID) & M_FW_SCSI_ABRT_CLS_WR_FLOWID) 2610 2611 #define S_FW_SCSI_ABRT_CLS_WR_LEN16 0 2612 #define M_FW_SCSI_ABRT_CLS_WR_LEN16 0xff 2613 #define V_FW_SCSI_ABRT_CLS_WR_LEN16(x) ((x) << S_FW_SCSI_ABRT_CLS_WR_LEN16) 2614 #define G_FW_SCSI_ABRT_CLS_WR_LEN16(x) \ 2615 (((x) >> S_FW_SCSI_ABRT_CLS_WR_LEN16) & M_FW_SCSI_ABRT_CLS_WR_LEN16) 2616 2617 #define S_FW_SCSI_ABRT_CLS_WR_SUB_OPCODE 2 2618 #define M_FW_SCSI_ABRT_CLS_WR_SUB_OPCODE 0x3f 2619 #define V_FW_SCSI_ABRT_CLS_WR_SUB_OPCODE(x) \ 2620 ((x) << S_FW_SCSI_ABRT_CLS_WR_SUB_OPCODE) 2621 #define G_FW_SCSI_ABRT_CLS_WR_SUB_OPCODE(x) \ 2622 (((x) >> S_FW_SCSI_ABRT_CLS_WR_SUB_OPCODE) & \ 2623 M_FW_SCSI_ABRT_CLS_WR_SUB_OPCODE) 2624 2625 #define S_FW_SCSI_ABRT_CLS_WR_UNSOL 1 2626 #define M_FW_SCSI_ABRT_CLS_WR_UNSOL 0x1 2627 #define V_FW_SCSI_ABRT_CLS_WR_UNSOL(x) ((x) << S_FW_SCSI_ABRT_CLS_WR_UNSOL) 2628 #define G_FW_SCSI_ABRT_CLS_WR_UNSOL(x) \ 2629 (((x) >> S_FW_SCSI_ABRT_CLS_WR_UNSOL) & M_FW_SCSI_ABRT_CLS_WR_UNSOL) 2630 #define F_FW_SCSI_ABRT_CLS_WR_UNSOL V_FW_SCSI_ABRT_CLS_WR_UNSOL(1U) 2631 2632 #define S_FW_SCSI_ABRT_CLS_WR_CHK_ALL_IO 0 2633 #define M_FW_SCSI_ABRT_CLS_WR_CHK_ALL_IO 0x1 2634 #define V_FW_SCSI_ABRT_CLS_WR_CHK_ALL_IO(x) \ 2635 ((x) << S_FW_SCSI_ABRT_CLS_WR_CHK_ALL_IO) 2636 #define G_FW_SCSI_ABRT_CLS_WR_CHK_ALL_IO(x) \ 2637 (((x) >> S_FW_SCSI_ABRT_CLS_WR_CHK_ALL_IO) & \ 2638 M_FW_SCSI_ABRT_CLS_WR_CHK_ALL_IO) 2639 #define F_FW_SCSI_ABRT_CLS_WR_CHK_ALL_IO \ 2640 V_FW_SCSI_ABRT_CLS_WR_CHK_ALL_IO(1U) 2641 2642 struct fw_scsi_tgt_acc_wr { 2643 __be32 op_immdlen; 2644 __be32 flowid_len16; 2645 __be64 cookie; 2646 __be16 iqid; 2647 __u8 r3; 2648 __u8 use_burst_len; 2649 union fw_scsi_tgt_acc_priv { 2650 struct fcoe_tgt_acc_priv { 2651 __u8 ctl_pri; 2652 __u8 cp_en_class; 2653 __u8 r4_lo[2]; 2654 } fcoe; 2655 struct iscsi_tgt_acc_priv { 2656 __u8 r4[4]; 2657 } iscsi; 2658 } u; 2659 __be32 burst_len; 2660 __be32 rel_off; 2661 __be64 r5; 2662 __be32 r6; 2663 __be32 tot_xfer_len; 2664 }; 2665 2666 #define S_FW_SCSI_TGT_ACC_WR_OPCODE 24 2667 #define M_FW_SCSI_TGT_ACC_WR_OPCODE 0xff 2668 #define V_FW_SCSI_TGT_ACC_WR_OPCODE(x) ((x) << S_FW_SCSI_TGT_ACC_WR_OPCODE) 2669 #define G_FW_SCSI_TGT_ACC_WR_OPCODE(x) \ 2670 (((x) >> S_FW_SCSI_TGT_ACC_WR_OPCODE) & M_FW_SCSI_TGT_ACC_WR_OPCODE) 2671 2672 #define S_FW_SCSI_TGT_ACC_WR_IMMDLEN 0 2673 #define M_FW_SCSI_TGT_ACC_WR_IMMDLEN 0xff 2674 #define V_FW_SCSI_TGT_ACC_WR_IMMDLEN(x) ((x) << S_FW_SCSI_TGT_ACC_WR_IMMDLEN) 2675 #define G_FW_SCSI_TGT_ACC_WR_IMMDLEN(x) \ 2676 (((x) >> S_FW_SCSI_TGT_ACC_WR_IMMDLEN) & M_FW_SCSI_TGT_ACC_WR_IMMDLEN) 2677 2678 #define S_FW_SCSI_TGT_ACC_WR_FLOWID 8 2679 #define M_FW_SCSI_TGT_ACC_WR_FLOWID 0xfffff 2680 #define V_FW_SCSI_TGT_ACC_WR_FLOWID(x) ((x) << S_FW_SCSI_TGT_ACC_WR_FLOWID) 2681 #define G_FW_SCSI_TGT_ACC_WR_FLOWID(x) \ 2682 (((x) >> S_FW_SCSI_TGT_ACC_WR_FLOWID) & M_FW_SCSI_TGT_ACC_WR_FLOWID) 2683 2684 #define S_FW_SCSI_TGT_ACC_WR_LEN16 0 2685 #define M_FW_SCSI_TGT_ACC_WR_LEN16 0xff 2686 #define V_FW_SCSI_TGT_ACC_WR_LEN16(x) ((x) << S_FW_SCSI_TGT_ACC_WR_LEN16) 2687 #define G_FW_SCSI_TGT_ACC_WR_LEN16(x) \ 2688 (((x) >> S_FW_SCSI_TGT_ACC_WR_LEN16) & M_FW_SCSI_TGT_ACC_WR_LEN16) 2689 2690 #define S_FW_SCSI_TGT_ACC_WR_CP_EN 6 2691 #define M_FW_SCSI_TGT_ACC_WR_CP_EN 0x3 2692 #define V_FW_SCSI_TGT_ACC_WR_CP_EN(x) ((x) << S_FW_SCSI_TGT_ACC_WR_CP_EN) 2693 #define G_FW_SCSI_TGT_ACC_WR_CP_EN(x) \ 2694 (((x) >> S_FW_SCSI_TGT_ACC_WR_CP_EN) & M_FW_SCSI_TGT_ACC_WR_CP_EN) 2695 2696 #define S_FW_SCSI_TGT_ACC_WR_CLASS 4 2697 #define M_FW_SCSI_TGT_ACC_WR_CLASS 0x3 2698 #define V_FW_SCSI_TGT_ACC_WR_CLASS(x) ((x) << S_FW_SCSI_TGT_ACC_WR_CLASS) 2699 #define G_FW_SCSI_TGT_ACC_WR_CLASS(x) \ 2700 (((x) >> S_FW_SCSI_TGT_ACC_WR_CLASS) & M_FW_SCSI_TGT_ACC_WR_CLASS) 2701 2702 struct fw_scsi_tgt_xmit_wr { 2703 __be32 op_immdlen; 2704 __be32 flowid_len16; 2705 __be64 cookie; 2706 __be16 iqid; 2707 __u8 auto_rsp; 2708 __u8 use_xfer_cnt; 2709 union fw_scsi_tgt_xmit_priv { 2710 struct fcoe_tgt_xmit_priv { 2711 __u8 ctl_pri; 2712 __u8 cp_en_class; 2713 __u8 r3_lo[2]; 2714 } fcoe; 2715 struct iscsi_tgt_xmit_priv { 2716 __u8 r3[4]; 2717 } iscsi; 2718 } u; 2719 __be32 xfer_cnt; 2720 __be32 r4; 2721 __be64 r5; 2722 __be32 r6; 2723 __be32 tot_xfer_len; 2724 }; 2725 2726 #define S_FW_SCSI_TGT_XMIT_WR_OPCODE 24 2727 #define M_FW_SCSI_TGT_XMIT_WR_OPCODE 0xff 2728 #define V_FW_SCSI_TGT_XMIT_WR_OPCODE(x) ((x) << S_FW_SCSI_TGT_XMIT_WR_OPCODE) 2729 #define G_FW_SCSI_TGT_XMIT_WR_OPCODE(x) \ 2730 (((x) >> S_FW_SCSI_TGT_XMIT_WR_OPCODE) & M_FW_SCSI_TGT_XMIT_WR_OPCODE) 2731 2732 #define S_FW_SCSI_TGT_XMIT_WR_IMMDLEN 0 2733 #define M_FW_SCSI_TGT_XMIT_WR_IMMDLEN 0xff 2734 #define V_FW_SCSI_TGT_XMIT_WR_IMMDLEN(x) \ 2735 ((x) << S_FW_SCSI_TGT_XMIT_WR_IMMDLEN) 2736 #define G_FW_SCSI_TGT_XMIT_WR_IMMDLEN(x) \ 2737 (((x) >> S_FW_SCSI_TGT_XMIT_WR_IMMDLEN) & M_FW_SCSI_TGT_XMIT_WR_IMMDLEN) 2738 2739 #define S_FW_SCSI_TGT_XMIT_WR_FLOWID 8 2740 #define M_FW_SCSI_TGT_XMIT_WR_FLOWID 0xfffff 2741 #define V_FW_SCSI_TGT_XMIT_WR_FLOWID(x) ((x) << S_FW_SCSI_TGT_XMIT_WR_FLOWID) 2742 #define G_FW_SCSI_TGT_XMIT_WR_FLOWID(x) \ 2743 (((x) >> S_FW_SCSI_TGT_XMIT_WR_FLOWID) & M_FW_SCSI_TGT_XMIT_WR_FLOWID) 2744 2745 #define S_FW_SCSI_TGT_XMIT_WR_LEN16 0 2746 #define M_FW_SCSI_TGT_XMIT_WR_LEN16 0xff 2747 #define V_FW_SCSI_TGT_XMIT_WR_LEN16(x) ((x) << S_FW_SCSI_TGT_XMIT_WR_LEN16) 2748 #define G_FW_SCSI_TGT_XMIT_WR_LEN16(x) \ 2749 (((x) >> S_FW_SCSI_TGT_XMIT_WR_LEN16) & M_FW_SCSI_TGT_XMIT_WR_LEN16) 2750 2751 #define S_FW_SCSI_TGT_XMIT_WR_CP_EN 6 2752 #define M_FW_SCSI_TGT_XMIT_WR_CP_EN 0x3 2753 #define V_FW_SCSI_TGT_XMIT_WR_CP_EN(x) ((x) << S_FW_SCSI_TGT_XMIT_WR_CP_EN) 2754 #define G_FW_SCSI_TGT_XMIT_WR_CP_EN(x) \ 2755 (((x) >> S_FW_SCSI_TGT_XMIT_WR_CP_EN) & M_FW_SCSI_TGT_XMIT_WR_CP_EN) 2756 2757 #define S_FW_SCSI_TGT_XMIT_WR_CLASS 4 2758 #define M_FW_SCSI_TGT_XMIT_WR_CLASS 0x3 2759 #define V_FW_SCSI_TGT_XMIT_WR_CLASS(x) ((x) << S_FW_SCSI_TGT_XMIT_WR_CLASS) 2760 #define G_FW_SCSI_TGT_XMIT_WR_CLASS(x) \ 2761 (((x) >> S_FW_SCSI_TGT_XMIT_WR_CLASS) & M_FW_SCSI_TGT_XMIT_WR_CLASS) 2762 2763 struct fw_scsi_tgt_rsp_wr { 2764 __be32 op_immdlen; 2765 __be32 flowid_len16; 2766 __be64 cookie; 2767 __be16 iqid; 2768 __u8 r3[2]; 2769 union fw_scsi_tgt_rsp_priv { 2770 struct fcoe_tgt_rsp_priv { 2771 __u8 ctl_pri; 2772 __u8 cp_en_class; 2773 __u8 r4_lo[2]; 2774 } fcoe; 2775 struct iscsi_tgt_rsp_priv { 2776 __u8 r4[4]; 2777 } iscsi; 2778 } u; 2779 __u8 r5[8]; 2780 }; 2781 2782 #define S_FW_SCSI_TGT_RSP_WR_OPCODE 24 2783 #define M_FW_SCSI_TGT_RSP_WR_OPCODE 0xff 2784 #define V_FW_SCSI_TGT_RSP_WR_OPCODE(x) ((x) << S_FW_SCSI_TGT_RSP_WR_OPCODE) 2785 #define G_FW_SCSI_TGT_RSP_WR_OPCODE(x) \ 2786 (((x) >> S_FW_SCSI_TGT_RSP_WR_OPCODE) & M_FW_SCSI_TGT_RSP_WR_OPCODE) 2787 2788 #define S_FW_SCSI_TGT_RSP_WR_IMMDLEN 0 2789 #define M_FW_SCSI_TGT_RSP_WR_IMMDLEN 0xff 2790 #define V_FW_SCSI_TGT_RSP_WR_IMMDLEN(x) ((x) << S_FW_SCSI_TGT_RSP_WR_IMMDLEN) 2791 #define G_FW_SCSI_TGT_RSP_WR_IMMDLEN(x) \ 2792 (((x) >> S_FW_SCSI_TGT_RSP_WR_IMMDLEN) & M_FW_SCSI_TGT_RSP_WR_IMMDLEN) 2793 2794 #define S_FW_SCSI_TGT_RSP_WR_FLOWID 8 2795 #define M_FW_SCSI_TGT_RSP_WR_FLOWID 0xfffff 2796 #define V_FW_SCSI_TGT_RSP_WR_FLOWID(x) ((x) << S_FW_SCSI_TGT_RSP_WR_FLOWID) 2797 #define G_FW_SCSI_TGT_RSP_WR_FLOWID(x) \ 2798 (((x) >> S_FW_SCSI_TGT_RSP_WR_FLOWID) & M_FW_SCSI_TGT_RSP_WR_FLOWID) 2799 2800 #define S_FW_SCSI_TGT_RSP_WR_LEN16 0 2801 #define M_FW_SCSI_TGT_RSP_WR_LEN16 0xff 2802 #define V_FW_SCSI_TGT_RSP_WR_LEN16(x) ((x) << S_FW_SCSI_TGT_RSP_WR_LEN16) 2803 #define G_FW_SCSI_TGT_RSP_WR_LEN16(x) \ 2804 (((x) >> S_FW_SCSI_TGT_RSP_WR_LEN16) & M_FW_SCSI_TGT_RSP_WR_LEN16) 2805 2806 #define S_FW_SCSI_TGT_RSP_WR_CP_EN 6 2807 #define M_FW_SCSI_TGT_RSP_WR_CP_EN 0x3 2808 #define V_FW_SCSI_TGT_RSP_WR_CP_EN(x) ((x) << S_FW_SCSI_TGT_RSP_WR_CP_EN) 2809 #define G_FW_SCSI_TGT_RSP_WR_CP_EN(x) \ 2810 (((x) >> S_FW_SCSI_TGT_RSP_WR_CP_EN) & M_FW_SCSI_TGT_RSP_WR_CP_EN) 2811 2812 #define S_FW_SCSI_TGT_RSP_WR_CLASS 4 2813 #define M_FW_SCSI_TGT_RSP_WR_CLASS 0x3 2814 #define V_FW_SCSI_TGT_RSP_WR_CLASS(x) ((x) << S_FW_SCSI_TGT_RSP_WR_CLASS) 2815 #define G_FW_SCSI_TGT_RSP_WR_CLASS(x) \ 2816 (((x) >> S_FW_SCSI_TGT_RSP_WR_CLASS) & M_FW_SCSI_TGT_RSP_WR_CLASS) 2817 2818 struct fw_pofcoe_tcb_wr { 2819 __be32 op_compl; 2820 __be32 equiq_to_len16; 2821 __be64 cookie; 2822 __be32 tid_to_port; 2823 __be16 x_id; 2824 __be16 vlan_id; 2825 __be32 s_id; 2826 __be32 d_id; 2827 __be32 tag; 2828 __be32 xfer_len; 2829 __be32 r4; 2830 __be16 r5; 2831 __be16 iqid; 2832 }; 2833 2834 #define S_FW_POFCOE_TCB_WR_TID 12 2835 #define M_FW_POFCOE_TCB_WR_TID 0xfffff 2836 #define V_FW_POFCOE_TCB_WR_TID(x) ((x) << S_FW_POFCOE_TCB_WR_TID) 2837 #define G_FW_POFCOE_TCB_WR_TID(x) \ 2838 (((x) >> S_FW_POFCOE_TCB_WR_TID) & M_FW_POFCOE_TCB_WR_TID) 2839 2840 #define S_FW_POFCOE_TCB_WR_ALLOC 4 2841 #define M_FW_POFCOE_TCB_WR_ALLOC 0x1 2842 #define V_FW_POFCOE_TCB_WR_ALLOC(x) ((x) << S_FW_POFCOE_TCB_WR_ALLOC) 2843 #define G_FW_POFCOE_TCB_WR_ALLOC(x) \ 2844 (((x) >> S_FW_POFCOE_TCB_WR_ALLOC) & M_FW_POFCOE_TCB_WR_ALLOC) 2845 #define F_FW_POFCOE_TCB_WR_ALLOC V_FW_POFCOE_TCB_WR_ALLOC(1U) 2846 2847 #define S_FW_POFCOE_TCB_WR_FREE 3 2848 #define M_FW_POFCOE_TCB_WR_FREE 0x1 2849 #define V_FW_POFCOE_TCB_WR_FREE(x) ((x) << S_FW_POFCOE_TCB_WR_FREE) 2850 #define G_FW_POFCOE_TCB_WR_FREE(x) \ 2851 (((x) >> S_FW_POFCOE_TCB_WR_FREE) & M_FW_POFCOE_TCB_WR_FREE) 2852 #define F_FW_POFCOE_TCB_WR_FREE V_FW_POFCOE_TCB_WR_FREE(1U) 2853 2854 #define S_FW_POFCOE_TCB_WR_PORT 0 2855 #define M_FW_POFCOE_TCB_WR_PORT 0x7 2856 #define V_FW_POFCOE_TCB_WR_PORT(x) ((x) << S_FW_POFCOE_TCB_WR_PORT) 2857 #define G_FW_POFCOE_TCB_WR_PORT(x) \ 2858 (((x) >> S_FW_POFCOE_TCB_WR_PORT) & M_FW_POFCOE_TCB_WR_PORT) 2859 2860 struct fw_pofcoe_ulptx_wr { 2861 __be32 op_pkd; 2862 __be32 equiq_to_len16; 2863 __u64 cookie; 2864 }; 2865 2866 2867 /****************************************************************************** 2868 * C O M M A N D s 2869 *********************/ 2870 2871 /* 2872 * The maximum length of time, in miliseconds, that we expect any firmware 2873 * command to take to execute and return a reply to the host. The RESET 2874 * and INITIALIZE commands can take a fair amount of time to execute but 2875 * most execute in far less time than this maximum. This constant is used 2876 * by host software to determine how long to wait for a firmware command 2877 * reply before declaring the firmware as dead/unreachable ... 2878 */ 2879 #define FW_CMD_MAX_TIMEOUT 10000 2880 2881 /* 2882 * If a host driver does a HELLO and discovers that there's already a MASTER 2883 * selected, we may have to wait for that MASTER to finish issuing RESET, 2884 * configuration and INITIALIZE commands. Also, there's a possibility that 2885 * our own HELLO may get lost if it happens right as the MASTER is issuign a 2886 * RESET command, so we need to be willing to make a few retries of our HELLO. 2887 */ 2888 #define FW_CMD_HELLO_TIMEOUT (3 * FW_CMD_MAX_TIMEOUT) 2889 #define FW_CMD_HELLO_RETRIES 3 2890 2891 enum fw_cmd_opcodes { 2892 FW_LDST_CMD = 0x01, 2893 FW_RESET_CMD = 0x03, 2894 FW_HELLO_CMD = 0x04, 2895 FW_BYE_CMD = 0x05, 2896 FW_INITIALIZE_CMD = 0x06, 2897 FW_CAPS_CONFIG_CMD = 0x07, 2898 FW_PARAMS_CMD = 0x08, 2899 FW_PFVF_CMD = 0x09, 2900 FW_IQ_CMD = 0x10, 2901 FW_EQ_MNGT_CMD = 0x11, 2902 FW_EQ_ETH_CMD = 0x12, 2903 FW_EQ_CTRL_CMD = 0x13, 2904 FW_EQ_OFLD_CMD = 0x21, 2905 FW_VI_CMD = 0x14, 2906 FW_VI_MAC_CMD = 0x15, 2907 FW_VI_RXMODE_CMD = 0x16, 2908 FW_VI_ENABLE_CMD = 0x17, 2909 FW_VI_STATS_CMD = 0x1a, 2910 FW_ACL_MAC_CMD = 0x18, 2911 FW_ACL_VLAN_CMD = 0x19, 2912 FW_PORT_CMD = 0x1b, 2913 FW_PORT_STATS_CMD = 0x1c, 2914 FW_PORT_LB_STATS_CMD = 0x1d, 2915 FW_PORT_TRACE_CMD = 0x1e, 2916 FW_PORT_TRACE_MMAP_CMD = 0x1f, 2917 FW_RSS_IND_TBL_CMD = 0x20, 2918 FW_RSS_GLB_CONFIG_CMD = 0x22, 2919 FW_RSS_VI_CONFIG_CMD = 0x23, 2920 FW_SCHED_CMD = 0x24, 2921 FW_DEVLOG_CMD = 0x25, 2922 FW_WATCHDOG_CMD = 0x27, 2923 FW_CLIP_CMD = 0x28, 2924 FW_CHNET_IFACE_CMD = 0x26, 2925 FW_FCOE_RES_INFO_CMD = 0x31, 2926 FW_FCOE_LINK_CMD = 0x32, 2927 FW_FCOE_VNP_CMD = 0x33, 2928 FW_FCOE_SPARAMS_CMD = 0x35, 2929 FW_FCOE_STATS_CMD = 0x37, 2930 FW_FCOE_FCF_CMD = 0x38, 2931 FW_LASTC2E_CMD = 0x40, 2932 FW_ERROR_CMD = 0x80, 2933 FW_DEBUG_CMD = 0x81, 2934 }; 2935 2936 enum fw_cmd_cap { 2937 FW_CMD_CAP_PF = 0x01, 2938 FW_CMD_CAP_DMAQ = 0x02, 2939 FW_CMD_CAP_PORT = 0x04, 2940 FW_CMD_CAP_PORTPROMISC = 0x08, 2941 FW_CMD_CAP_PORTSTATS = 0x10, 2942 FW_CMD_CAP_VF = 0x80, 2943 }; 2944 2945 /* 2946 * Generic command header flit0 2947 */ 2948 struct fw_cmd_hdr { 2949 __be32 hi; 2950 __be32 lo; 2951 }; 2952 2953 #define S_FW_CMD_OP 24 2954 #define M_FW_CMD_OP 0xff 2955 #define V_FW_CMD_OP(x) ((x) << S_FW_CMD_OP) 2956 #define G_FW_CMD_OP(x) (((x) >> S_FW_CMD_OP) & M_FW_CMD_OP) 2957 2958 #define S_FW_CMD_REQUEST 23 2959 #define M_FW_CMD_REQUEST 0x1 2960 #define V_FW_CMD_REQUEST(x) ((x) << S_FW_CMD_REQUEST) 2961 #define G_FW_CMD_REQUEST(x) (((x) >> S_FW_CMD_REQUEST) & M_FW_CMD_REQUEST) 2962 #define F_FW_CMD_REQUEST V_FW_CMD_REQUEST(1U) 2963 2964 #define S_FW_CMD_READ 22 2965 #define M_FW_CMD_READ 0x1 2966 #define V_FW_CMD_READ(x) ((x) << S_FW_CMD_READ) 2967 #define G_FW_CMD_READ(x) (((x) >> S_FW_CMD_READ) & M_FW_CMD_READ) 2968 #define F_FW_CMD_READ V_FW_CMD_READ(1U) 2969 2970 #define S_FW_CMD_WRITE 21 2971 #define M_FW_CMD_WRITE 0x1 2972 #define V_FW_CMD_WRITE(x) ((x) << S_FW_CMD_WRITE) 2973 #define G_FW_CMD_WRITE(x) (((x) >> S_FW_CMD_WRITE) & M_FW_CMD_WRITE) 2974 #define F_FW_CMD_WRITE V_FW_CMD_WRITE(1U) 2975 2976 #define S_FW_CMD_EXEC 20 2977 #define M_FW_CMD_EXEC 0x1 2978 #define V_FW_CMD_EXEC(x) ((x) << S_FW_CMD_EXEC) 2979 #define G_FW_CMD_EXEC(x) (((x) >> S_FW_CMD_EXEC) & M_FW_CMD_EXEC) 2980 #define F_FW_CMD_EXEC V_FW_CMD_EXEC(1U) 2981 2982 #define S_FW_CMD_RAMASK 20 2983 #define M_FW_CMD_RAMASK 0xf 2984 #define V_FW_CMD_RAMASK(x) ((x) << S_FW_CMD_RAMASK) 2985 #define G_FW_CMD_RAMASK(x) (((x) >> S_FW_CMD_RAMASK) & M_FW_CMD_RAMASK) 2986 2987 #define S_FW_CMD_RETVAL 8 2988 #define M_FW_CMD_RETVAL 0xff 2989 #define V_FW_CMD_RETVAL(x) ((x) << S_FW_CMD_RETVAL) 2990 #define G_FW_CMD_RETVAL(x) (((x) >> S_FW_CMD_RETVAL) & M_FW_CMD_RETVAL) 2991 2992 #define S_FW_CMD_LEN16 0 2993 #define M_FW_CMD_LEN16 0xff 2994 #define V_FW_CMD_LEN16(x) ((x) << S_FW_CMD_LEN16) 2995 #define G_FW_CMD_LEN16(x) (((x) >> S_FW_CMD_LEN16) & M_FW_CMD_LEN16) 2996 2997 #define FW_LEN16(fw_struct) V_FW_CMD_LEN16(sizeof(fw_struct) / 16) 2998 2999 /* 3000 * address spaces 3001 */ 3002 enum fw_ldst_addrspc { 3003 FW_LDST_ADDRSPC_FIRMWARE = 0x0001, 3004 FW_LDST_ADDRSPC_SGE_EGRC = 0x0008, 3005 FW_LDST_ADDRSPC_SGE_INGC = 0x0009, 3006 FW_LDST_ADDRSPC_SGE_FLMC = 0x000a, 3007 FW_LDST_ADDRSPC_SGE_CONMC = 0x000b, 3008 FW_LDST_ADDRSPC_TP_PIO = 0x0010, 3009 FW_LDST_ADDRSPC_TP_TM_PIO = 0x0011, 3010 FW_LDST_ADDRSPC_TP_MIB = 0x0012, 3011 FW_LDST_ADDRSPC_MDIO = 0x0018, 3012 FW_LDST_ADDRSPC_MPS = 0x0020, 3013 FW_LDST_ADDRSPC_FUNC = 0x0028, 3014 FW_LDST_ADDRSPC_FUNC_PCIE = 0x0029, 3015 FW_LDST_ADDRSPC_FUNC_I2C = 0x002A, /* legacy */ 3016 FW_LDST_ADDRSPC_LE = 0x0030, 3017 FW_LDST_ADDRSPC_I2C = 0x0038, 3018 FW_LDST_ADDRSPC_PCIE_CFGS = 0x0040, 3019 FW_LDST_ADDRSPC_PCIE_DBG = 0x0041, 3020 FW_LDST_ADDRSPC_PCIE_PHY = 0x0042, 3021 }; 3022 3023 /* 3024 * MDIO VSC8634 register access control field 3025 */ 3026 enum fw_ldst_mdio_vsc8634_aid { 3027 FW_LDST_MDIO_VS_STANDARD, 3028 FW_LDST_MDIO_VS_EXTENDED, 3029 FW_LDST_MDIO_VS_GPIO 3030 }; 3031 3032 enum fw_ldst_mps_fid { 3033 FW_LDST_MPS_ATRB, 3034 FW_LDST_MPS_RPLC 3035 }; 3036 3037 enum fw_ldst_func_access_ctl { 3038 FW_LDST_FUNC_ACC_CTL_VIID, 3039 FW_LDST_FUNC_ACC_CTL_FID 3040 }; 3041 3042 enum fw_ldst_func_mod_index { 3043 FW_LDST_FUNC_MPS 3044 }; 3045 3046 struct fw_ldst_cmd { 3047 __be32 op_to_addrspace; 3048 __be32 cycles_to_len16; 3049 union fw_ldst { 3050 struct fw_ldst_addrval { 3051 __be32 addr; 3052 __be32 val; 3053 } addrval; 3054 struct fw_ldst_idctxt { 3055 __be32 physid; 3056 __be32 msg_ctxtflush; 3057 __be32 ctxt_data7; 3058 __be32 ctxt_data6; 3059 __be32 ctxt_data5; 3060 __be32 ctxt_data4; 3061 __be32 ctxt_data3; 3062 __be32 ctxt_data2; 3063 __be32 ctxt_data1; 3064 __be32 ctxt_data0; 3065 } idctxt; 3066 struct fw_ldst_mdio { 3067 __be16 paddr_mmd; 3068 __be16 raddr; 3069 __be16 vctl; 3070 __be16 rval; 3071 } mdio; 3072 struct fw_ldst_mps { 3073 __be16 fid_ctl; 3074 __be16 rplcpf_pkd; 3075 __be32 rplc127_96; 3076 __be32 rplc95_64; 3077 __be32 rplc63_32; 3078 __be32 rplc31_0; 3079 __be32 atrb; 3080 __be16 vlan[16]; 3081 } mps; 3082 struct fw_ldst_func { 3083 __u8 access_ctl; 3084 __u8 mod_index; 3085 __be16 ctl_id; 3086 __be32 offset; 3087 __be64 data0; 3088 __be64 data1; 3089 } func; 3090 struct fw_ldst_pcie { 3091 __u8 ctrl_to_fn; 3092 __u8 bnum; 3093 __u8 r; 3094 __u8 ext_r; 3095 __u8 select_naccess; 3096 __u8 pcie_fn; 3097 __be16 nset_pkd; 3098 __be32 data[12]; 3099 } pcie; 3100 struct fw_ldst_i2c_deprecated { 3101 __u8 pid_pkd; 3102 __u8 base; 3103 __u8 boffset; 3104 __u8 data; 3105 __be32 r9; 3106 } i2c_deprecated; 3107 struct fw_ldst_i2c { 3108 __u8 pid; 3109 __u8 did; 3110 __u8 boffset; 3111 __u8 blen; 3112 __be32 r9; 3113 __u8 data[48]; 3114 } i2c; 3115 struct fw_ldst_le { 3116 __be32 index; 3117 __be32 r9; 3118 __u8 val[33]; 3119 __u8 r11[7]; 3120 } le; 3121 } u; 3122 }; 3123 3124 #define S_FW_LDST_CMD_ADDRSPACE 0 3125 #define M_FW_LDST_CMD_ADDRSPACE 0xff 3126 #define V_FW_LDST_CMD_ADDRSPACE(x) ((x) << S_FW_LDST_CMD_ADDRSPACE) 3127 #define G_FW_LDST_CMD_ADDRSPACE(x) \ 3128 (((x) >> S_FW_LDST_CMD_ADDRSPACE) & M_FW_LDST_CMD_ADDRSPACE) 3129 3130 #define S_FW_LDST_CMD_CYCLES 16 3131 #define M_FW_LDST_CMD_CYCLES 0xffff 3132 #define V_FW_LDST_CMD_CYCLES(x) ((x) << S_FW_LDST_CMD_CYCLES) 3133 #define G_FW_LDST_CMD_CYCLES(x) \ 3134 (((x) >> S_FW_LDST_CMD_CYCLES) & M_FW_LDST_CMD_CYCLES) 3135 3136 #define S_FW_LDST_CMD_MSG 31 3137 #define M_FW_LDST_CMD_MSG 0x1 3138 #define V_FW_LDST_CMD_MSG(x) ((x) << S_FW_LDST_CMD_MSG) 3139 #define G_FW_LDST_CMD_MSG(x) \ 3140 (((x) >> S_FW_LDST_CMD_MSG) & M_FW_LDST_CMD_MSG) 3141 #define F_FW_LDST_CMD_MSG V_FW_LDST_CMD_MSG(1U) 3142 3143 #define S_FW_LDST_CMD_CTXTFLUSH 30 3144 #define M_FW_LDST_CMD_CTXTFLUSH 0x1 3145 #define V_FW_LDST_CMD_CTXTFLUSH(x) ((x) << S_FW_LDST_CMD_CTXTFLUSH) 3146 #define G_FW_LDST_CMD_CTXTFLUSH(x) \ 3147 (((x) >> S_FW_LDST_CMD_CTXTFLUSH) & M_FW_LDST_CMD_CTXTFLUSH) 3148 #define F_FW_LDST_CMD_CTXTFLUSH V_FW_LDST_CMD_CTXTFLUSH(1U) 3149 3150 #define S_FW_LDST_CMD_PADDR 8 3151 #define M_FW_LDST_CMD_PADDR 0x1f 3152 #define V_FW_LDST_CMD_PADDR(x) ((x) << S_FW_LDST_CMD_PADDR) 3153 #define G_FW_LDST_CMD_PADDR(x) \ 3154 (((x) >> S_FW_LDST_CMD_PADDR) & M_FW_LDST_CMD_PADDR) 3155 3156 #define S_FW_LDST_CMD_MMD 0 3157 #define M_FW_LDST_CMD_MMD 0x1f 3158 #define V_FW_LDST_CMD_MMD(x) ((x) << S_FW_LDST_CMD_MMD) 3159 #define G_FW_LDST_CMD_MMD(x) \ 3160 (((x) >> S_FW_LDST_CMD_MMD) & M_FW_LDST_CMD_MMD) 3161 3162 #define S_FW_LDST_CMD_FID 15 3163 #define M_FW_LDST_CMD_FID 0x1 3164 #define V_FW_LDST_CMD_FID(x) ((x) << S_FW_LDST_CMD_FID) 3165 #define G_FW_LDST_CMD_FID(x) \ 3166 (((x) >> S_FW_LDST_CMD_FID) & M_FW_LDST_CMD_FID) 3167 #define F_FW_LDST_CMD_FID V_FW_LDST_CMD_FID(1U) 3168 3169 #define S_FW_LDST_CMD_CTL 0 3170 #define M_FW_LDST_CMD_CTL 0x7fff 3171 #define V_FW_LDST_CMD_CTL(x) ((x) << S_FW_LDST_CMD_CTL) 3172 #define G_FW_LDST_CMD_CTL(x) \ 3173 (((x) >> S_FW_LDST_CMD_CTL) & M_FW_LDST_CMD_CTL) 3174 3175 #define S_FW_LDST_CMD_RPLCPF 0 3176 #define M_FW_LDST_CMD_RPLCPF 0xff 3177 #define V_FW_LDST_CMD_RPLCPF(x) ((x) << S_FW_LDST_CMD_RPLCPF) 3178 #define G_FW_LDST_CMD_RPLCPF(x) \ 3179 (((x) >> S_FW_LDST_CMD_RPLCPF) & M_FW_LDST_CMD_RPLCPF) 3180 3181 #define S_FW_LDST_CMD_CTRL 7 3182 #define M_FW_LDST_CMD_CTRL 0x1 3183 #define V_FW_LDST_CMD_CTRL(x) ((x) << S_FW_LDST_CMD_CTRL) 3184 #define G_FW_LDST_CMD_CTRL(x) \ 3185 (((x) >> S_FW_LDST_CMD_CTRL) & M_FW_LDST_CMD_CTRL) 3186 #define F_FW_LDST_CMD_CTRL V_FW_LDST_CMD_CTRL(1U) 3187 3188 #define S_FW_LDST_CMD_LC 4 3189 #define M_FW_LDST_CMD_LC 0x1 3190 #define V_FW_LDST_CMD_LC(x) ((x) << S_FW_LDST_CMD_LC) 3191 #define G_FW_LDST_CMD_LC(x) (((x) >> S_FW_LDST_CMD_LC) & M_FW_LDST_CMD_LC) 3192 #define F_FW_LDST_CMD_LC V_FW_LDST_CMD_LC(1U) 3193 3194 #define S_FW_LDST_CMD_AI 3 3195 #define M_FW_LDST_CMD_AI 0x1 3196 #define V_FW_LDST_CMD_AI(x) ((x) << S_FW_LDST_CMD_AI) 3197 #define G_FW_LDST_CMD_AI(x) (((x) >> S_FW_LDST_CMD_AI) & M_FW_LDST_CMD_AI) 3198 #define F_FW_LDST_CMD_AI V_FW_LDST_CMD_AI(1U) 3199 3200 #define S_FW_LDST_CMD_FN 0 3201 #define M_FW_LDST_CMD_FN 0x7 3202 #define V_FW_LDST_CMD_FN(x) ((x) << S_FW_LDST_CMD_FN) 3203 #define G_FW_LDST_CMD_FN(x) (((x) >> S_FW_LDST_CMD_FN) & M_FW_LDST_CMD_FN) 3204 3205 #define S_FW_LDST_CMD_SELECT 4 3206 #define M_FW_LDST_CMD_SELECT 0xf 3207 #define V_FW_LDST_CMD_SELECT(x) ((x) << S_FW_LDST_CMD_SELECT) 3208 #define G_FW_LDST_CMD_SELECT(x) \ 3209 (((x) >> S_FW_LDST_CMD_SELECT) & M_FW_LDST_CMD_SELECT) 3210 3211 #define S_FW_LDST_CMD_NACCESS 0 3212 #define M_FW_LDST_CMD_NACCESS 0xf 3213 #define V_FW_LDST_CMD_NACCESS(x) ((x) << S_FW_LDST_CMD_NACCESS) 3214 #define G_FW_LDST_CMD_NACCESS(x) \ 3215 (((x) >> S_FW_LDST_CMD_NACCESS) & M_FW_LDST_CMD_NACCESS) 3216 3217 #define S_FW_LDST_CMD_NSET 14 3218 #define M_FW_LDST_CMD_NSET 0x3 3219 #define V_FW_LDST_CMD_NSET(x) ((x) << S_FW_LDST_CMD_NSET) 3220 #define G_FW_LDST_CMD_NSET(x) \ 3221 (((x) >> S_FW_LDST_CMD_NSET) & M_FW_LDST_CMD_NSET) 3222 3223 #define S_FW_LDST_CMD_PID 6 3224 #define M_FW_LDST_CMD_PID 0x3 3225 #define V_FW_LDST_CMD_PID(x) ((x) << S_FW_LDST_CMD_PID) 3226 #define G_FW_LDST_CMD_PID(x) \ 3227 (((x) >> S_FW_LDST_CMD_PID) & M_FW_LDST_CMD_PID) 3228 3229 struct fw_reset_cmd { 3230 __be32 op_to_write; 3231 __be32 retval_len16; 3232 __be32 val; 3233 __be32 halt_pkd; 3234 }; 3235 3236 #define S_FW_RESET_CMD_HALT 31 3237 #define M_FW_RESET_CMD_HALT 0x1 3238 #define V_FW_RESET_CMD_HALT(x) ((x) << S_FW_RESET_CMD_HALT) 3239 #define G_FW_RESET_CMD_HALT(x) \ 3240 (((x) >> S_FW_RESET_CMD_HALT) & M_FW_RESET_CMD_HALT) 3241 #define F_FW_RESET_CMD_HALT V_FW_RESET_CMD_HALT(1U) 3242 3243 enum { 3244 FW_HELLO_CMD_STAGE_OS = 0, 3245 FW_HELLO_CMD_STAGE_PREOS0 = 1, 3246 FW_HELLO_CMD_STAGE_PREOS1 = 2, 3247 FW_HELLO_CMD_STAGE_POSTOS = 3, 3248 }; 3249 3250 struct fw_hello_cmd { 3251 __be32 op_to_write; 3252 __be32 retval_len16; 3253 __be32 err_to_clearinit; 3254 __be32 fwrev; 3255 }; 3256 3257 #define S_FW_HELLO_CMD_ERR 31 3258 #define M_FW_HELLO_CMD_ERR 0x1 3259 #define V_FW_HELLO_CMD_ERR(x) ((x) << S_FW_HELLO_CMD_ERR) 3260 #define G_FW_HELLO_CMD_ERR(x) \ 3261 (((x) >> S_FW_HELLO_CMD_ERR) & M_FW_HELLO_CMD_ERR) 3262 #define F_FW_HELLO_CMD_ERR V_FW_HELLO_CMD_ERR(1U) 3263 3264 #define S_FW_HELLO_CMD_INIT 30 3265 #define M_FW_HELLO_CMD_INIT 0x1 3266 #define V_FW_HELLO_CMD_INIT(x) ((x) << S_FW_HELLO_CMD_INIT) 3267 #define G_FW_HELLO_CMD_INIT(x) \ 3268 (((x) >> S_FW_HELLO_CMD_INIT) & M_FW_HELLO_CMD_INIT) 3269 #define F_FW_HELLO_CMD_INIT V_FW_HELLO_CMD_INIT(1U) 3270 3271 #define S_FW_HELLO_CMD_MASTERDIS 29 3272 #define M_FW_HELLO_CMD_MASTERDIS 0x1 3273 #define V_FW_HELLO_CMD_MASTERDIS(x) ((x) << S_FW_HELLO_CMD_MASTERDIS) 3274 #define G_FW_HELLO_CMD_MASTERDIS(x) \ 3275 (((x) >> S_FW_HELLO_CMD_MASTERDIS) & M_FW_HELLO_CMD_MASTERDIS) 3276 #define F_FW_HELLO_CMD_MASTERDIS V_FW_HELLO_CMD_MASTERDIS(1U) 3277 3278 #define S_FW_HELLO_CMD_MASTERFORCE 28 3279 #define M_FW_HELLO_CMD_MASTERFORCE 0x1 3280 #define V_FW_HELLO_CMD_MASTERFORCE(x) ((x) << S_FW_HELLO_CMD_MASTERFORCE) 3281 #define G_FW_HELLO_CMD_MASTERFORCE(x) \ 3282 (((x) >> S_FW_HELLO_CMD_MASTERFORCE) & M_FW_HELLO_CMD_MASTERFORCE) 3283 #define F_FW_HELLO_CMD_MASTERFORCE V_FW_HELLO_CMD_MASTERFORCE(1U) 3284 3285 #define S_FW_HELLO_CMD_MBMASTER 24 3286 #define M_FW_HELLO_CMD_MBMASTER 0xf 3287 #define V_FW_HELLO_CMD_MBMASTER(x) ((x) << S_FW_HELLO_CMD_MBMASTER) 3288 #define G_FW_HELLO_CMD_MBMASTER(x) \ 3289 (((x) >> S_FW_HELLO_CMD_MBMASTER) & M_FW_HELLO_CMD_MBMASTER) 3290 3291 #define S_FW_HELLO_CMD_MBASYNCNOTINT 23 3292 #define M_FW_HELLO_CMD_MBASYNCNOTINT 0x1 3293 #define V_FW_HELLO_CMD_MBASYNCNOTINT(x) ((x) << S_FW_HELLO_CMD_MBASYNCNOTINT) 3294 #define G_FW_HELLO_CMD_MBASYNCNOTINT(x) \ 3295 (((x) >> S_FW_HELLO_CMD_MBASYNCNOTINT) & M_FW_HELLO_CMD_MBASYNCNOTINT) 3296 #define F_FW_HELLO_CMD_MBASYNCNOTINT V_FW_HELLO_CMD_MBASYNCNOTINT(1U) 3297 3298 #define S_FW_HELLO_CMD_MBASYNCNOT 20 3299 #define M_FW_HELLO_CMD_MBASYNCNOT 0x7 3300 #define V_FW_HELLO_CMD_MBASYNCNOT(x) ((x) << S_FW_HELLO_CMD_MBASYNCNOT) 3301 #define G_FW_HELLO_CMD_MBASYNCNOT(x) \ 3302 (((x) >> S_FW_HELLO_CMD_MBASYNCNOT) & M_FW_HELLO_CMD_MBASYNCNOT) 3303 3304 #define S_FW_HELLO_CMD_STAGE 17 3305 #define M_FW_HELLO_CMD_STAGE 0x7 3306 #define V_FW_HELLO_CMD_STAGE(x) ((x) << S_FW_HELLO_CMD_STAGE) 3307 #define G_FW_HELLO_CMD_STAGE(x) \ 3308 (((x) >> S_FW_HELLO_CMD_STAGE) & M_FW_HELLO_CMD_STAGE) 3309 3310 #define S_FW_HELLO_CMD_CLEARINIT 16 3311 #define M_FW_HELLO_CMD_CLEARINIT 0x1 3312 #define V_FW_HELLO_CMD_CLEARINIT(x) ((x) << S_FW_HELLO_CMD_CLEARINIT) 3313 #define G_FW_HELLO_CMD_CLEARINIT(x) \ 3314 (((x) >> S_FW_HELLO_CMD_CLEARINIT) & M_FW_HELLO_CMD_CLEARINIT) 3315 #define F_FW_HELLO_CMD_CLEARINIT V_FW_HELLO_CMD_CLEARINIT(1U) 3316 3317 struct fw_bye_cmd { 3318 __be32 op_to_write; 3319 __be32 retval_len16; 3320 __be64 r3; 3321 }; 3322 3323 struct fw_initialize_cmd { 3324 __be32 op_to_write; 3325 __be32 retval_len16; 3326 __be64 r3; 3327 }; 3328 3329 enum fw_caps_config_hm { 3330 FW_CAPS_CONFIG_HM_PCIE = 0x00000001, 3331 FW_CAPS_CONFIG_HM_PL = 0x00000002, 3332 FW_CAPS_CONFIG_HM_SGE = 0x00000004, 3333 FW_CAPS_CONFIG_HM_CIM = 0x00000008, 3334 FW_CAPS_CONFIG_HM_ULPTX = 0x00000010, 3335 FW_CAPS_CONFIG_HM_TP = 0x00000020, 3336 FW_CAPS_CONFIG_HM_ULPRX = 0x00000040, 3337 FW_CAPS_CONFIG_HM_PMRX = 0x00000080, 3338 FW_CAPS_CONFIG_HM_PMTX = 0x00000100, 3339 FW_CAPS_CONFIG_HM_MC = 0x00000200, 3340 FW_CAPS_CONFIG_HM_LE = 0x00000400, 3341 FW_CAPS_CONFIG_HM_MPS = 0x00000800, 3342 FW_CAPS_CONFIG_HM_XGMAC = 0x00001000, 3343 FW_CAPS_CONFIG_HM_CPLSWITCH = 0x00002000, 3344 FW_CAPS_CONFIG_HM_T4DBG = 0x00004000, 3345 FW_CAPS_CONFIG_HM_MI = 0x00008000, 3346 FW_CAPS_CONFIG_HM_I2CM = 0x00010000, 3347 FW_CAPS_CONFIG_HM_NCSI = 0x00020000, 3348 FW_CAPS_CONFIG_HM_SMB = 0x00040000, 3349 FW_CAPS_CONFIG_HM_MA = 0x00080000, 3350 FW_CAPS_CONFIG_HM_EDRAM = 0x00100000, 3351 FW_CAPS_CONFIG_HM_PMU = 0x00200000, 3352 FW_CAPS_CONFIG_HM_UART = 0x00400000, 3353 FW_CAPS_CONFIG_HM_SF = 0x00800000, 3354 }; 3355 3356 /* 3357 * The VF Register Map. 3358 * 3359 * The Scatter Gather Engine (SGE), Multiport Support module (MPS), PIO Local 3360 * bus module (PL) and CPU Interface Module (CIM) components are mapped via 3361 * the Slice to Module Map Table (see below) in the Physical Function Register 3362 * Map. The Mail Box Data (MBDATA) range is mapped via the PCI-E Mailbox Base 3363 * and Offset registers in the PF Register Map. The MBDATA base address is 3364 * quite constrained as it determines the Mailbox Data addresses for both PFs 3365 * and VFs, and therefore must fit in both the VF and PF Register Maps without 3366 * overlapping other registers. 3367 */ 3368 #define FW_T4VF_SGE_BASE_ADDR 0x0000 3369 #define FW_T4VF_MPS_BASE_ADDR 0x0100 3370 #define FW_T4VF_PL_BASE_ADDR 0x0200 3371 #define FW_T4VF_MBDATA_BASE_ADDR 0x0240 3372 #define FW_T4VF_CIM_BASE_ADDR 0x0300 3373 3374 #define FW_T4VF_REGMAP_START 0x0000 3375 #define FW_T4VF_REGMAP_SIZE 0x0400 3376 3377 enum fw_caps_config_nbm { 3378 FW_CAPS_CONFIG_NBM_IPMI = 0x00000001, 3379 FW_CAPS_CONFIG_NBM_NCSI = 0x00000002, 3380 }; 3381 3382 enum fw_caps_config_link { 3383 FW_CAPS_CONFIG_LINK_PPP = 0x00000001, 3384 FW_CAPS_CONFIG_LINK_QFC = 0x00000002, 3385 FW_CAPS_CONFIG_LINK_DCBX = 0x00000004, 3386 }; 3387 3388 enum fw_caps_config_switch { 3389 FW_CAPS_CONFIG_SWITCH_INGRESS = 0x00000001, 3390 FW_CAPS_CONFIG_SWITCH_EGRESS = 0x00000002, 3391 }; 3392 3393 enum fw_caps_config_nic { 3394 FW_CAPS_CONFIG_NIC = 0x00000001, 3395 FW_CAPS_CONFIG_NIC_VM = 0x00000002, 3396 FW_CAPS_CONFIG_NIC_IDS = 0x00000004, 3397 FW_CAPS_CONFIG_NIC_UM = 0x00000008, 3398 FW_CAPS_CONFIG_NIC_UM_ISGL = 0x00000010, 3399 }; 3400 3401 enum fw_caps_config_toe { 3402 FW_CAPS_CONFIG_TOE = 0x00000001, 3403 }; 3404 3405 enum fw_caps_config_rdma { 3406 FW_CAPS_CONFIG_RDMA_RDDP = 0x00000001, 3407 FW_CAPS_CONFIG_RDMA_RDMAC = 0x00000002, 3408 }; 3409 3410 enum fw_caps_config_iscsi { 3411 FW_CAPS_CONFIG_ISCSI_INITIATOR_PDU = 0x00000001, 3412 FW_CAPS_CONFIG_ISCSI_TARGET_PDU = 0x00000002, 3413 FW_CAPS_CONFIG_ISCSI_INITIATOR_CNXOFLD = 0x00000004, 3414 FW_CAPS_CONFIG_ISCSI_TARGET_CNXOFLD = 0x00000008, 3415 FW_CAPS_CONFIG_ISCSI_INITIATOR_SSNOFLD = 0x00000010, 3416 FW_CAPS_CONFIG_ISCSI_TARGET_SSNOFLD = 0x00000020, 3417 }; 3418 3419 enum fw_caps_config_fcoe { 3420 FW_CAPS_CONFIG_FCOE_INITIATOR = 0x00000001, 3421 FW_CAPS_CONFIG_FCOE_TARGET = 0x00000002, 3422 FW_CAPS_CONFIG_FCOE_CTRL_OFLD = 0x00000004, 3423 FW_CAPS_CONFIG_POFCOE_INITIATOR = 0x00000008, 3424 FW_CAPS_CONFIG_POFCOE_TARGET = 0x00000010, 3425 }; 3426 3427 enum fw_memtype_cf { 3428 FW_MEMTYPE_CF_EDC0 = 0x0, 3429 FW_MEMTYPE_CF_EDC1 = 0x1, 3430 FW_MEMTYPE_CF_EXTMEM = 0x2, 3431 FW_MEMTYPE_CF_FLASH = 0x4, 3432 FW_MEMTYPE_CF_INTERNAL = 0x5, 3433 FW_MEMTYPE_CF_EXTMEM1 = 0x6, 3434 }; 3435 3436 struct fw_caps_config_cmd { 3437 __be32 op_to_write; 3438 __be32 cfvalid_to_len16; 3439 __be32 r2; 3440 __be32 hwmbitmap; 3441 __be16 nbmcaps; 3442 __be16 linkcaps; 3443 __be16 switchcaps; 3444 __be16 r3; 3445 __be16 niccaps; 3446 __be16 toecaps; 3447 __be16 rdmacaps; 3448 __be16 r4; 3449 __be16 iscsicaps; 3450 __be16 fcoecaps; 3451 __be32 cfcsum; 3452 __be32 finiver; 3453 __be32 finicsum; 3454 }; 3455 3456 #define S_FW_CAPS_CONFIG_CMD_CFVALID 27 3457 #define M_FW_CAPS_CONFIG_CMD_CFVALID 0x1 3458 #define V_FW_CAPS_CONFIG_CMD_CFVALID(x) ((x) << S_FW_CAPS_CONFIG_CMD_CFVALID) 3459 #define G_FW_CAPS_CONFIG_CMD_CFVALID(x) \ 3460 (((x) >> S_FW_CAPS_CONFIG_CMD_CFVALID) & M_FW_CAPS_CONFIG_CMD_CFVALID) 3461 #define F_FW_CAPS_CONFIG_CMD_CFVALID V_FW_CAPS_CONFIG_CMD_CFVALID(1U) 3462 3463 #define S_FW_CAPS_CONFIG_CMD_MEMTYPE_CF 24 3464 #define M_FW_CAPS_CONFIG_CMD_MEMTYPE_CF 0x7 3465 #define V_FW_CAPS_CONFIG_CMD_MEMTYPE_CF(x) \ 3466 ((x) << S_FW_CAPS_CONFIG_CMD_MEMTYPE_CF) 3467 #define G_FW_CAPS_CONFIG_CMD_MEMTYPE_CF(x) \ 3468 (((x) >> S_FW_CAPS_CONFIG_CMD_MEMTYPE_CF) & \ 3469 M_FW_CAPS_CONFIG_CMD_MEMTYPE_CF) 3470 3471 #define S_FW_CAPS_CONFIG_CMD_MEMADDR64K_CF 16 3472 #define M_FW_CAPS_CONFIG_CMD_MEMADDR64K_CF 0xff 3473 #define V_FW_CAPS_CONFIG_CMD_MEMADDR64K_CF(x) \ 3474 ((x) << S_FW_CAPS_CONFIG_CMD_MEMADDR64K_CF) 3475 #define G_FW_CAPS_CONFIG_CMD_MEMADDR64K_CF(x) \ 3476 (((x) >> S_FW_CAPS_CONFIG_CMD_MEMADDR64K_CF) & \ 3477 M_FW_CAPS_CONFIG_CMD_MEMADDR64K_CF) 3478 3479 /* 3480 * params command mnemonics 3481 */ 3482 enum fw_params_mnem { 3483 FW_PARAMS_MNEM_DEV = 1, /* device params */ 3484 FW_PARAMS_MNEM_PFVF = 2, /* function params */ 3485 FW_PARAMS_MNEM_REG = 3, /* limited register access */ 3486 FW_PARAMS_MNEM_DMAQ = 4, /* dma queue params */ 3487 FW_PARAMS_MNEM_LAST 3488 }; 3489 3490 /* 3491 * device parameters 3492 */ 3493 enum fw_params_param_dev { 3494 FW_PARAMS_PARAM_DEV_CCLK = 0x00, /* chip core clock in khz */ 3495 FW_PARAMS_PARAM_DEV_PORTVEC = 0x01, /* the port vector */ 3496 FW_PARAMS_PARAM_DEV_NTID = 0x02, /* reads the number of TIDs 3497 * allocated by the device's 3498 * Lookup Engine 3499 */ 3500 FW_PARAMS_PARAM_DEV_FLOWC_BUFFIFO_SZ = 0x03, 3501 FW_PARAMS_PARAM_DEV_INTFVER_NIC = 0x04, 3502 FW_PARAMS_PARAM_DEV_INTFVER_VNIC = 0x05, 3503 FW_PARAMS_PARAM_DEV_INTFVER_OFLD = 0x06, 3504 FW_PARAMS_PARAM_DEV_INTFVER_RI = 0x07, 3505 FW_PARAMS_PARAM_DEV_INTFVER_ISCSIPDU = 0x08, 3506 FW_PARAMS_PARAM_DEV_INTFVER_ISCSI = 0x09, 3507 FW_PARAMS_PARAM_DEV_INTFVER_FCOE = 0x0A, 3508 FW_PARAMS_PARAM_DEV_FWREV = 0x0B, 3509 FW_PARAMS_PARAM_DEV_TPREV = 0x0C, 3510 FW_PARAMS_PARAM_DEV_CF = 0x0D, 3511 FW_PARAMS_PARAM_DEV_BYPASS = 0x0E, 3512 FW_PARAMS_PARAM_DEV_PHYFW = 0x0F, 3513 FW_PARAMS_PARAM_DEV_LOAD = 0x10, 3514 FW_PARAMS_PARAM_DEV_DIAG = 0x11, 3515 FW_PARAMS_PARAM_DEV_UCLK = 0x12, /* uP clock in khz */ 3516 FW_PARAMS_PARAM_DEV_MAXORDIRD_QP = 0x13, /* max supported QP IRD/ORD 3517 */ 3518 FW_PARAMS_PARAM_DEV_MAXIRD_ADAPTER= 0x14,/* max supported ADAPTER IRD 3519 */ 3520 FW_PARAMS_PARAM_DEV_INTFVER_FCOEPDU = 0x15, 3521 FW_PARAMS_PARAM_DEV_MCINIT = 0x16, 3522 FW_PARAMS_PARAM_DEV_ULPTX_MEMWRITE_DSGL = 0x17, 3523 }; 3524 3525 /* 3526 * physical and virtual function parameters 3527 */ 3528 enum fw_params_param_pfvf { 3529 FW_PARAMS_PARAM_PFVF_RWXCAPS = 0x00, 3530 FW_PARAMS_PARAM_PFVF_ROUTE_START = 0x01, 3531 FW_PARAMS_PARAM_PFVF_ROUTE_END = 0x02, 3532 FW_PARAMS_PARAM_PFVF_CLIP_START = 0x03, 3533 FW_PARAMS_PARAM_PFVF_CLIP_END = 0x04, 3534 FW_PARAMS_PARAM_PFVF_FILTER_START = 0x05, 3535 FW_PARAMS_PARAM_PFVF_FILTER_END = 0x06, 3536 FW_PARAMS_PARAM_PFVF_SERVER_START = 0x07, 3537 FW_PARAMS_PARAM_PFVF_SERVER_END = 0x08, 3538 FW_PARAMS_PARAM_PFVF_TDDP_START = 0x09, 3539 FW_PARAMS_PARAM_PFVF_TDDP_END = 0x0A, 3540 FW_PARAMS_PARAM_PFVF_ISCSI_START = 0x0B, 3541 FW_PARAMS_PARAM_PFVF_ISCSI_END = 0x0C, 3542 FW_PARAMS_PARAM_PFVF_STAG_START = 0x0D, 3543 FW_PARAMS_PARAM_PFVF_STAG_END = 0x0E, 3544 FW_PARAMS_PARAM_PFVF_RQ_START = 0x1F, 3545 FW_PARAMS_PARAM_PFVF_RQ_END = 0x10, 3546 FW_PARAMS_PARAM_PFVF_PBL_START = 0x11, 3547 FW_PARAMS_PARAM_PFVF_PBL_END = 0x12, 3548 FW_PARAMS_PARAM_PFVF_L2T_START = 0x13, 3549 FW_PARAMS_PARAM_PFVF_L2T_END = 0x14, 3550 FW_PARAMS_PARAM_PFVF_SQRQ_START = 0x15, 3551 FW_PARAMS_PARAM_PFVF_SQRQ_END = 0x16, 3552 FW_PARAMS_PARAM_PFVF_CQ_START = 0x17, 3553 FW_PARAMS_PARAM_PFVF_CQ_END = 0x18, 3554 FW_PARAMS_PARAM_PFVF_SCHEDCLASS_ETH = 0x20, 3555 FW_PARAMS_PARAM_PFVF_VIID = 0x24, 3556 FW_PARAMS_PARAM_PFVF_CPMASK = 0x25, 3557 FW_PARAMS_PARAM_PFVF_OCQ_START = 0x26, 3558 FW_PARAMS_PARAM_PFVF_OCQ_END = 0x27, 3559 FW_PARAMS_PARAM_PFVF_CONM_MAP = 0x28, 3560 FW_PARAMS_PARAM_PFVF_IQFLINT_START = 0x29, 3561 FW_PARAMS_PARAM_PFVF_IQFLINT_END = 0x2A, 3562 FW_PARAMS_PARAM_PFVF_EQ_START = 0x2B, 3563 FW_PARAMS_PARAM_PFVF_EQ_END = 0x2C, 3564 FW_PARAMS_PARAM_PFVF_ACTIVE_FILTER_START = 0x2D, 3565 FW_PARAMS_PARAM_PFVF_ACTIVE_FILTER_END = 0x2E, 3566 FW_PARAMS_PARAM_PFVF_ETHOFLD_START = 0x2F, 3567 FW_PARAMS_PARAM_PFVF_ETHOFLD_END = 0x30, 3568 FW_PARAMS_PARAM_PFVF_CPLFW4MSG_ENCAP = 0x31 3569 }; 3570 3571 /* 3572 * dma queue parameters 3573 */ 3574 enum fw_params_param_dmaq { 3575 FW_PARAMS_PARAM_DMAQ_IQ_DCAEN_DCACPU = 0x00, 3576 FW_PARAMS_PARAM_DMAQ_IQ_INTCNTTHRESH = 0x01, 3577 FW_PARAMS_PARAM_DMAQ_IQ_INTIDX = 0x02, 3578 FW_PARAMS_PARAM_DMAQ_EQ_CMPLIQID_MNGT = 0x10, 3579 FW_PARAMS_PARAM_DMAQ_EQ_CMPLIQID_CTRL = 0x11, 3580 FW_PARAMS_PARAM_DMAQ_EQ_SCHEDCLASS_ETH = 0x12, 3581 FW_PARAMS_PARAM_DMAQ_EQ_DCBPRIO_ETH = 0x13, 3582 FW_PARAMS_PARAM_DMAQ_CONM_CTXT = 0x20, 3583 }; 3584 3585 /* 3586 * dev bypass parameters; actions and modes 3587 */ 3588 enum fw_params_param_dev_bypass { 3589 3590 /* actions 3591 */ 3592 FW_PARAMS_PARAM_DEV_BYPASS_PFAIL = 0x00, 3593 FW_PARAMS_PARAM_DEV_BYPASS_CURRENT = 0x01, 3594 3595 /* modes 3596 */ 3597 FW_PARAMS_PARAM_DEV_BYPASS_NORMAL = 0x00, 3598 FW_PARAMS_PARAM_DEV_BYPASS_DROP = 0x1, 3599 FW_PARAMS_PARAM_DEV_BYPASS_BYPASS = 0x2, 3600 }; 3601 3602 enum fw_params_phyfw_actions { 3603 FW_PARAMS_PARAM_PHYFW_DOWNLOAD = 0x00, 3604 FW_PARAMS_PARAM_PHYFW_VERSION = 0x01, 3605 }; 3606 3607 enum fw_params_param_dev_diag { 3608 FW_PARAM_DEV_DIAG_TMP = 0x00, 3609 FW_PARAM_DEV_DIAG_VDD = 0x01, 3610 }; 3611 3612 #define S_FW_PARAMS_MNEM 24 3613 #define M_FW_PARAMS_MNEM 0xff 3614 #define V_FW_PARAMS_MNEM(x) ((x) << S_FW_PARAMS_MNEM) 3615 #define G_FW_PARAMS_MNEM(x) \ 3616 (((x) >> S_FW_PARAMS_MNEM) & M_FW_PARAMS_MNEM) 3617 3618 #define S_FW_PARAMS_PARAM_X 16 3619 #define M_FW_PARAMS_PARAM_X 0xff 3620 #define V_FW_PARAMS_PARAM_X(x) ((x) << S_FW_PARAMS_PARAM_X) 3621 #define G_FW_PARAMS_PARAM_X(x) \ 3622 (((x) >> S_FW_PARAMS_PARAM_X) & M_FW_PARAMS_PARAM_X) 3623 3624 #define S_FW_PARAMS_PARAM_Y 8 3625 #define M_FW_PARAMS_PARAM_Y 0xff 3626 #define V_FW_PARAMS_PARAM_Y(x) ((x) << S_FW_PARAMS_PARAM_Y) 3627 #define G_FW_PARAMS_PARAM_Y(x) \ 3628 (((x) >> S_FW_PARAMS_PARAM_Y) & M_FW_PARAMS_PARAM_Y) 3629 3630 #define S_FW_PARAMS_PARAM_Z 0 3631 #define M_FW_PARAMS_PARAM_Z 0xff 3632 #define V_FW_PARAMS_PARAM_Z(x) ((x) << S_FW_PARAMS_PARAM_Z) 3633 #define G_FW_PARAMS_PARAM_Z(x) \ 3634 (((x) >> S_FW_PARAMS_PARAM_Z) & M_FW_PARAMS_PARAM_Z) 3635 3636 #define S_FW_PARAMS_PARAM_XYZ 0 3637 #define M_FW_PARAMS_PARAM_XYZ 0xffffff 3638 #define V_FW_PARAMS_PARAM_XYZ(x) ((x) << S_FW_PARAMS_PARAM_XYZ) 3639 #define G_FW_PARAMS_PARAM_XYZ(x) \ 3640 (((x) >> S_FW_PARAMS_PARAM_XYZ) & M_FW_PARAMS_PARAM_XYZ) 3641 3642 #define S_FW_PARAMS_PARAM_YZ 0 3643 #define M_FW_PARAMS_PARAM_YZ 0xffff 3644 #define V_FW_PARAMS_PARAM_YZ(x) ((x) << S_FW_PARAMS_PARAM_YZ) 3645 #define G_FW_PARAMS_PARAM_YZ(x) \ 3646 (((x) >> S_FW_PARAMS_PARAM_YZ) & M_FW_PARAMS_PARAM_YZ) 3647 3648 struct fw_params_cmd { 3649 __be32 op_to_vfn; 3650 __be32 retval_len16; 3651 struct fw_params_param { 3652 __be32 mnem; 3653 __be32 val; 3654 } param[7]; 3655 }; 3656 3657 #define S_FW_PARAMS_CMD_PFN 8 3658 #define M_FW_PARAMS_CMD_PFN 0x7 3659 #define V_FW_PARAMS_CMD_PFN(x) ((x) << S_FW_PARAMS_CMD_PFN) 3660 #define G_FW_PARAMS_CMD_PFN(x) \ 3661 (((x) >> S_FW_PARAMS_CMD_PFN) & M_FW_PARAMS_CMD_PFN) 3662 3663 #define S_FW_PARAMS_CMD_VFN 0 3664 #define M_FW_PARAMS_CMD_VFN 0xff 3665 #define V_FW_PARAMS_CMD_VFN(x) ((x) << S_FW_PARAMS_CMD_VFN) 3666 #define G_FW_PARAMS_CMD_VFN(x) \ 3667 (((x) >> S_FW_PARAMS_CMD_VFN) & M_FW_PARAMS_CMD_VFN) 3668 3669 struct fw_pfvf_cmd { 3670 __be32 op_to_vfn; 3671 __be32 retval_len16; 3672 __be32 niqflint_niq; 3673 __be32 type_to_neq; 3674 __be32 tc_to_nexactf; 3675 __be32 r_caps_to_nethctrl; 3676 __be16 nricq; 3677 __be16 nriqp; 3678 __be32 r4; 3679 }; 3680 3681 #define S_FW_PFVF_CMD_PFN 8 3682 #define M_FW_PFVF_CMD_PFN 0x7 3683 #define V_FW_PFVF_CMD_PFN(x) ((x) << S_FW_PFVF_CMD_PFN) 3684 #define G_FW_PFVF_CMD_PFN(x) \ 3685 (((x) >> S_FW_PFVF_CMD_PFN) & M_FW_PFVF_CMD_PFN) 3686 3687 #define S_FW_PFVF_CMD_VFN 0 3688 #define M_FW_PFVF_CMD_VFN 0xff 3689 #define V_FW_PFVF_CMD_VFN(x) ((x) << S_FW_PFVF_CMD_VFN) 3690 #define G_FW_PFVF_CMD_VFN(x) \ 3691 (((x) >> S_FW_PFVF_CMD_VFN) & M_FW_PFVF_CMD_VFN) 3692 3693 #define S_FW_PFVF_CMD_NIQFLINT 20 3694 #define M_FW_PFVF_CMD_NIQFLINT 0xfff 3695 #define V_FW_PFVF_CMD_NIQFLINT(x) ((x) << S_FW_PFVF_CMD_NIQFLINT) 3696 #define G_FW_PFVF_CMD_NIQFLINT(x) \ 3697 (((x) >> S_FW_PFVF_CMD_NIQFLINT) & M_FW_PFVF_CMD_NIQFLINT) 3698 3699 #define S_FW_PFVF_CMD_NIQ 0 3700 #define M_FW_PFVF_CMD_NIQ 0xfffff 3701 #define V_FW_PFVF_CMD_NIQ(x) ((x) << S_FW_PFVF_CMD_NIQ) 3702 #define G_FW_PFVF_CMD_NIQ(x) \ 3703 (((x) >> S_FW_PFVF_CMD_NIQ) & M_FW_PFVF_CMD_NIQ) 3704 3705 #define S_FW_PFVF_CMD_TYPE 31 3706 #define M_FW_PFVF_CMD_TYPE 0x1 3707 #define V_FW_PFVF_CMD_TYPE(x) ((x) << S_FW_PFVF_CMD_TYPE) 3708 #define G_FW_PFVF_CMD_TYPE(x) \ 3709 (((x) >> S_FW_PFVF_CMD_TYPE) & M_FW_PFVF_CMD_TYPE) 3710 #define F_FW_PFVF_CMD_TYPE V_FW_PFVF_CMD_TYPE(1U) 3711 3712 #define S_FW_PFVF_CMD_CMASK 24 3713 #define M_FW_PFVF_CMD_CMASK 0xf 3714 #define V_FW_PFVF_CMD_CMASK(x) ((x) << S_FW_PFVF_CMD_CMASK) 3715 #define G_FW_PFVF_CMD_CMASK(x) \ 3716 (((x) >> S_FW_PFVF_CMD_CMASK) & M_FW_PFVF_CMD_CMASK) 3717 3718 #define S_FW_PFVF_CMD_PMASK 20 3719 #define M_FW_PFVF_CMD_PMASK 0xf 3720 #define V_FW_PFVF_CMD_PMASK(x) ((x) << S_FW_PFVF_CMD_PMASK) 3721 #define G_FW_PFVF_CMD_PMASK(x) \ 3722 (((x) >> S_FW_PFVF_CMD_PMASK) & M_FW_PFVF_CMD_PMASK) 3723 3724 #define S_FW_PFVF_CMD_NEQ 0 3725 #define M_FW_PFVF_CMD_NEQ 0xfffff 3726 #define V_FW_PFVF_CMD_NEQ(x) ((x) << S_FW_PFVF_CMD_NEQ) 3727 #define G_FW_PFVF_CMD_NEQ(x) \ 3728 (((x) >> S_FW_PFVF_CMD_NEQ) & M_FW_PFVF_CMD_NEQ) 3729 3730 #define S_FW_PFVF_CMD_TC 24 3731 #define M_FW_PFVF_CMD_TC 0xff 3732 #define V_FW_PFVF_CMD_TC(x) ((x) << S_FW_PFVF_CMD_TC) 3733 #define G_FW_PFVF_CMD_TC(x) (((x) >> S_FW_PFVF_CMD_TC) & M_FW_PFVF_CMD_TC) 3734 3735 #define S_FW_PFVF_CMD_NVI 16 3736 #define M_FW_PFVF_CMD_NVI 0xff 3737 #define V_FW_PFVF_CMD_NVI(x) ((x) << S_FW_PFVF_CMD_NVI) 3738 #define G_FW_PFVF_CMD_NVI(x) \ 3739 (((x) >> S_FW_PFVF_CMD_NVI) & M_FW_PFVF_CMD_NVI) 3740 3741 #define S_FW_PFVF_CMD_NEXACTF 0 3742 #define M_FW_PFVF_CMD_NEXACTF 0xffff 3743 #define V_FW_PFVF_CMD_NEXACTF(x) ((x) << S_FW_PFVF_CMD_NEXACTF) 3744 #define G_FW_PFVF_CMD_NEXACTF(x) \ 3745 (((x) >> S_FW_PFVF_CMD_NEXACTF) & M_FW_PFVF_CMD_NEXACTF) 3746 3747 #define S_FW_PFVF_CMD_R_CAPS 24 3748 #define M_FW_PFVF_CMD_R_CAPS 0xff 3749 #define V_FW_PFVF_CMD_R_CAPS(x) ((x) << S_FW_PFVF_CMD_R_CAPS) 3750 #define G_FW_PFVF_CMD_R_CAPS(x) \ 3751 (((x) >> S_FW_PFVF_CMD_R_CAPS) & M_FW_PFVF_CMD_R_CAPS) 3752 3753 #define S_FW_PFVF_CMD_WX_CAPS 16 3754 #define M_FW_PFVF_CMD_WX_CAPS 0xff 3755 #define V_FW_PFVF_CMD_WX_CAPS(x) ((x) << S_FW_PFVF_CMD_WX_CAPS) 3756 #define G_FW_PFVF_CMD_WX_CAPS(x) \ 3757 (((x) >> S_FW_PFVF_CMD_WX_CAPS) & M_FW_PFVF_CMD_WX_CAPS) 3758 3759 #define S_FW_PFVF_CMD_NETHCTRL 0 3760 #define M_FW_PFVF_CMD_NETHCTRL 0xffff 3761 #define V_FW_PFVF_CMD_NETHCTRL(x) ((x) << S_FW_PFVF_CMD_NETHCTRL) 3762 #define G_FW_PFVF_CMD_NETHCTRL(x) \ 3763 (((x) >> S_FW_PFVF_CMD_NETHCTRL) & M_FW_PFVF_CMD_NETHCTRL) 3764 3765 /* 3766 * ingress queue type; the first 1K ingress queues can have associated 0, 3767 * 1 or 2 free lists and an interrupt, all other ingress queues lack these 3768 * capabilities 3769 */ 3770 enum fw_iq_type { 3771 FW_IQ_TYPE_FL_INT_CAP, 3772 FW_IQ_TYPE_NO_FL_INT_CAP 3773 }; 3774 3775 struct fw_iq_cmd { 3776 __be32 op_to_vfn; 3777 __be32 alloc_to_len16; 3778 __be16 physiqid; 3779 __be16 iqid; 3780 __be16 fl0id; 3781 __be16 fl1id; 3782 __be32 type_to_iqandstindex; 3783 __be16 iqdroprss_to_iqesize; 3784 __be16 iqsize; 3785 __be64 iqaddr; 3786 __be32 iqns_to_fl0congen; 3787 __be16 fl0dcaen_to_fl0cidxfthresh; 3788 __be16 fl0size; 3789 __be64 fl0addr; 3790 __be32 fl1cngchmap_to_fl1congen; 3791 __be16 fl1dcaen_to_fl1cidxfthresh; 3792 __be16 fl1size; 3793 __be64 fl1addr; 3794 }; 3795 3796 #define S_FW_IQ_CMD_PFN 8 3797 #define M_FW_IQ_CMD_PFN 0x7 3798 #define V_FW_IQ_CMD_PFN(x) ((x) << S_FW_IQ_CMD_PFN) 3799 #define G_FW_IQ_CMD_PFN(x) (((x) >> S_FW_IQ_CMD_PFN) & M_FW_IQ_CMD_PFN) 3800 3801 #define S_FW_IQ_CMD_VFN 0 3802 #define M_FW_IQ_CMD_VFN 0xff 3803 #define V_FW_IQ_CMD_VFN(x) ((x) << S_FW_IQ_CMD_VFN) 3804 #define G_FW_IQ_CMD_VFN(x) (((x) >> S_FW_IQ_CMD_VFN) & M_FW_IQ_CMD_VFN) 3805 3806 #define S_FW_IQ_CMD_ALLOC 31 3807 #define M_FW_IQ_CMD_ALLOC 0x1 3808 #define V_FW_IQ_CMD_ALLOC(x) ((x) << S_FW_IQ_CMD_ALLOC) 3809 #define G_FW_IQ_CMD_ALLOC(x) \ 3810 (((x) >> S_FW_IQ_CMD_ALLOC) & M_FW_IQ_CMD_ALLOC) 3811 #define F_FW_IQ_CMD_ALLOC V_FW_IQ_CMD_ALLOC(1U) 3812 3813 #define S_FW_IQ_CMD_FREE 30 3814 #define M_FW_IQ_CMD_FREE 0x1 3815 #define V_FW_IQ_CMD_FREE(x) ((x) << S_FW_IQ_CMD_FREE) 3816 #define G_FW_IQ_CMD_FREE(x) (((x) >> S_FW_IQ_CMD_FREE) & M_FW_IQ_CMD_FREE) 3817 #define F_FW_IQ_CMD_FREE V_FW_IQ_CMD_FREE(1U) 3818 3819 #define S_FW_IQ_CMD_MODIFY 29 3820 #define M_FW_IQ_CMD_MODIFY 0x1 3821 #define V_FW_IQ_CMD_MODIFY(x) ((x) << S_FW_IQ_CMD_MODIFY) 3822 #define G_FW_IQ_CMD_MODIFY(x) \ 3823 (((x) >> S_FW_IQ_CMD_MODIFY) & M_FW_IQ_CMD_MODIFY) 3824 #define F_FW_IQ_CMD_MODIFY V_FW_IQ_CMD_MODIFY(1U) 3825 3826 #define S_FW_IQ_CMD_IQSTART 28 3827 #define M_FW_IQ_CMD_IQSTART 0x1 3828 #define V_FW_IQ_CMD_IQSTART(x) ((x) << S_FW_IQ_CMD_IQSTART) 3829 #define G_FW_IQ_CMD_IQSTART(x) \ 3830 (((x) >> S_FW_IQ_CMD_IQSTART) & M_FW_IQ_CMD_IQSTART) 3831 #define F_FW_IQ_CMD_IQSTART V_FW_IQ_CMD_IQSTART(1U) 3832 3833 #define S_FW_IQ_CMD_IQSTOP 27 3834 #define M_FW_IQ_CMD_IQSTOP 0x1 3835 #define V_FW_IQ_CMD_IQSTOP(x) ((x) << S_FW_IQ_CMD_IQSTOP) 3836 #define G_FW_IQ_CMD_IQSTOP(x) \ 3837 (((x) >> S_FW_IQ_CMD_IQSTOP) & M_FW_IQ_CMD_IQSTOP) 3838 #define F_FW_IQ_CMD_IQSTOP V_FW_IQ_CMD_IQSTOP(1U) 3839 3840 #define S_FW_IQ_CMD_TYPE 29 3841 #define M_FW_IQ_CMD_TYPE 0x7 3842 #define V_FW_IQ_CMD_TYPE(x) ((x) << S_FW_IQ_CMD_TYPE) 3843 #define G_FW_IQ_CMD_TYPE(x) (((x) >> S_FW_IQ_CMD_TYPE) & M_FW_IQ_CMD_TYPE) 3844 3845 #define S_FW_IQ_CMD_IQASYNCH 28 3846 #define M_FW_IQ_CMD_IQASYNCH 0x1 3847 #define V_FW_IQ_CMD_IQASYNCH(x) ((x) << S_FW_IQ_CMD_IQASYNCH) 3848 #define G_FW_IQ_CMD_IQASYNCH(x) \ 3849 (((x) >> S_FW_IQ_CMD_IQASYNCH) & M_FW_IQ_CMD_IQASYNCH) 3850 #define F_FW_IQ_CMD_IQASYNCH V_FW_IQ_CMD_IQASYNCH(1U) 3851 3852 #define S_FW_IQ_CMD_VIID 16 3853 #define M_FW_IQ_CMD_VIID 0xfff 3854 #define V_FW_IQ_CMD_VIID(x) ((x) << S_FW_IQ_CMD_VIID) 3855 #define G_FW_IQ_CMD_VIID(x) (((x) >> S_FW_IQ_CMD_VIID) & M_FW_IQ_CMD_VIID) 3856 3857 #define S_FW_IQ_CMD_IQANDST 15 3858 #define M_FW_IQ_CMD_IQANDST 0x1 3859 #define V_FW_IQ_CMD_IQANDST(x) ((x) << S_FW_IQ_CMD_IQANDST) 3860 #define G_FW_IQ_CMD_IQANDST(x) \ 3861 (((x) >> S_FW_IQ_CMD_IQANDST) & M_FW_IQ_CMD_IQANDST) 3862 #define F_FW_IQ_CMD_IQANDST V_FW_IQ_CMD_IQANDST(1U) 3863 3864 #define S_FW_IQ_CMD_IQANUS 14 3865 #define M_FW_IQ_CMD_IQANUS 0x1 3866 #define V_FW_IQ_CMD_IQANUS(x) ((x) << S_FW_IQ_CMD_IQANUS) 3867 #define G_FW_IQ_CMD_IQANUS(x) \ 3868 (((x) >> S_FW_IQ_CMD_IQANUS) & M_FW_IQ_CMD_IQANUS) 3869 #define F_FW_IQ_CMD_IQANUS V_FW_IQ_CMD_IQANUS(1U) 3870 3871 #define S_FW_IQ_CMD_IQANUD 12 3872 #define M_FW_IQ_CMD_IQANUD 0x3 3873 #define V_FW_IQ_CMD_IQANUD(x) ((x) << S_FW_IQ_CMD_IQANUD) 3874 #define G_FW_IQ_CMD_IQANUD(x) \ 3875 (((x) >> S_FW_IQ_CMD_IQANUD) & M_FW_IQ_CMD_IQANUD) 3876 3877 #define S_FW_IQ_CMD_IQANDSTINDEX 0 3878 #define M_FW_IQ_CMD_IQANDSTINDEX 0xfff 3879 #define V_FW_IQ_CMD_IQANDSTINDEX(x) ((x) << S_FW_IQ_CMD_IQANDSTINDEX) 3880 #define G_FW_IQ_CMD_IQANDSTINDEX(x) \ 3881 (((x) >> S_FW_IQ_CMD_IQANDSTINDEX) & M_FW_IQ_CMD_IQANDSTINDEX) 3882 3883 #define S_FW_IQ_CMD_IQDROPRSS 15 3884 #define M_FW_IQ_CMD_IQDROPRSS 0x1 3885 #define V_FW_IQ_CMD_IQDROPRSS(x) ((x) << S_FW_IQ_CMD_IQDROPRSS) 3886 #define G_FW_IQ_CMD_IQDROPRSS(x) \ 3887 (((x) >> S_FW_IQ_CMD_IQDROPRSS) & M_FW_IQ_CMD_IQDROPRSS) 3888 #define F_FW_IQ_CMD_IQDROPRSS V_FW_IQ_CMD_IQDROPRSS(1U) 3889 3890 #define S_FW_IQ_CMD_IQGTSMODE 14 3891 #define M_FW_IQ_CMD_IQGTSMODE 0x1 3892 #define V_FW_IQ_CMD_IQGTSMODE(x) ((x) << S_FW_IQ_CMD_IQGTSMODE) 3893 #define G_FW_IQ_CMD_IQGTSMODE(x) \ 3894 (((x) >> S_FW_IQ_CMD_IQGTSMODE) & M_FW_IQ_CMD_IQGTSMODE) 3895 #define F_FW_IQ_CMD_IQGTSMODE V_FW_IQ_CMD_IQGTSMODE(1U) 3896 3897 #define S_FW_IQ_CMD_IQPCIECH 12 3898 #define M_FW_IQ_CMD_IQPCIECH 0x3 3899 #define V_FW_IQ_CMD_IQPCIECH(x) ((x) << S_FW_IQ_CMD_IQPCIECH) 3900 #define G_FW_IQ_CMD_IQPCIECH(x) \ 3901 (((x) >> S_FW_IQ_CMD_IQPCIECH) & M_FW_IQ_CMD_IQPCIECH) 3902 3903 #define S_FW_IQ_CMD_IQDCAEN 11 3904 #define M_FW_IQ_CMD_IQDCAEN 0x1 3905 #define V_FW_IQ_CMD_IQDCAEN(x) ((x) << S_FW_IQ_CMD_IQDCAEN) 3906 #define G_FW_IQ_CMD_IQDCAEN(x) \ 3907 (((x) >> S_FW_IQ_CMD_IQDCAEN) & M_FW_IQ_CMD_IQDCAEN) 3908 #define F_FW_IQ_CMD_IQDCAEN V_FW_IQ_CMD_IQDCAEN(1U) 3909 3910 #define S_FW_IQ_CMD_IQDCACPU 6 3911 #define M_FW_IQ_CMD_IQDCACPU 0x1f 3912 #define V_FW_IQ_CMD_IQDCACPU(x) ((x) << S_FW_IQ_CMD_IQDCACPU) 3913 #define G_FW_IQ_CMD_IQDCACPU(x) \ 3914 (((x) >> S_FW_IQ_CMD_IQDCACPU) & M_FW_IQ_CMD_IQDCACPU) 3915 3916 #define S_FW_IQ_CMD_IQINTCNTTHRESH 4 3917 #define M_FW_IQ_CMD_IQINTCNTTHRESH 0x3 3918 #define V_FW_IQ_CMD_IQINTCNTTHRESH(x) ((x) << S_FW_IQ_CMD_IQINTCNTTHRESH) 3919 #define G_FW_IQ_CMD_IQINTCNTTHRESH(x) \ 3920 (((x) >> S_FW_IQ_CMD_IQINTCNTTHRESH) & M_FW_IQ_CMD_IQINTCNTTHRESH) 3921 3922 #define S_FW_IQ_CMD_IQO 3 3923 #define M_FW_IQ_CMD_IQO 0x1 3924 #define V_FW_IQ_CMD_IQO(x) ((x) << S_FW_IQ_CMD_IQO) 3925 #define G_FW_IQ_CMD_IQO(x) (((x) >> S_FW_IQ_CMD_IQO) & M_FW_IQ_CMD_IQO) 3926 #define F_FW_IQ_CMD_IQO V_FW_IQ_CMD_IQO(1U) 3927 3928 #define S_FW_IQ_CMD_IQCPRIO 2 3929 #define M_FW_IQ_CMD_IQCPRIO 0x1 3930 #define V_FW_IQ_CMD_IQCPRIO(x) ((x) << S_FW_IQ_CMD_IQCPRIO) 3931 #define G_FW_IQ_CMD_IQCPRIO(x) \ 3932 (((x) >> S_FW_IQ_CMD_IQCPRIO) & M_FW_IQ_CMD_IQCPRIO) 3933 #define F_FW_IQ_CMD_IQCPRIO V_FW_IQ_CMD_IQCPRIO(1U) 3934 3935 #define S_FW_IQ_CMD_IQESIZE 0 3936 #define M_FW_IQ_CMD_IQESIZE 0x3 3937 #define V_FW_IQ_CMD_IQESIZE(x) ((x) << S_FW_IQ_CMD_IQESIZE) 3938 #define G_FW_IQ_CMD_IQESIZE(x) \ 3939 (((x) >> S_FW_IQ_CMD_IQESIZE) & M_FW_IQ_CMD_IQESIZE) 3940 3941 #define S_FW_IQ_CMD_IQNS 31 3942 #define M_FW_IQ_CMD_IQNS 0x1 3943 #define V_FW_IQ_CMD_IQNS(x) ((x) << S_FW_IQ_CMD_IQNS) 3944 #define G_FW_IQ_CMD_IQNS(x) (((x) >> S_FW_IQ_CMD_IQNS) & M_FW_IQ_CMD_IQNS) 3945 #define F_FW_IQ_CMD_IQNS V_FW_IQ_CMD_IQNS(1U) 3946 3947 #define S_FW_IQ_CMD_IQRO 30 3948 #define M_FW_IQ_CMD_IQRO 0x1 3949 #define V_FW_IQ_CMD_IQRO(x) ((x) << S_FW_IQ_CMD_IQRO) 3950 #define G_FW_IQ_CMD_IQRO(x) (((x) >> S_FW_IQ_CMD_IQRO) & M_FW_IQ_CMD_IQRO) 3951 #define F_FW_IQ_CMD_IQRO V_FW_IQ_CMD_IQRO(1U) 3952 3953 #define S_FW_IQ_CMD_IQFLINTIQHSEN 28 3954 #define M_FW_IQ_CMD_IQFLINTIQHSEN 0x3 3955 #define V_FW_IQ_CMD_IQFLINTIQHSEN(x) ((x) << S_FW_IQ_CMD_IQFLINTIQHSEN) 3956 #define G_FW_IQ_CMD_IQFLINTIQHSEN(x) \ 3957 (((x) >> S_FW_IQ_CMD_IQFLINTIQHSEN) & M_FW_IQ_CMD_IQFLINTIQHSEN) 3958 3959 #define S_FW_IQ_CMD_IQFLINTCONGEN 27 3960 #define M_FW_IQ_CMD_IQFLINTCONGEN 0x1 3961 #define V_FW_IQ_CMD_IQFLINTCONGEN(x) ((x) << S_FW_IQ_CMD_IQFLINTCONGEN) 3962 #define G_FW_IQ_CMD_IQFLINTCONGEN(x) \ 3963 (((x) >> S_FW_IQ_CMD_IQFLINTCONGEN) & M_FW_IQ_CMD_IQFLINTCONGEN) 3964 #define F_FW_IQ_CMD_IQFLINTCONGEN V_FW_IQ_CMD_IQFLINTCONGEN(1U) 3965 3966 #define S_FW_IQ_CMD_IQFLINTISCSIC 26 3967 #define M_FW_IQ_CMD_IQFLINTISCSIC 0x1 3968 #define V_FW_IQ_CMD_IQFLINTISCSIC(x) ((x) << S_FW_IQ_CMD_IQFLINTISCSIC) 3969 #define G_FW_IQ_CMD_IQFLINTISCSIC(x) \ 3970 (((x) >> S_FW_IQ_CMD_IQFLINTISCSIC) & M_FW_IQ_CMD_IQFLINTISCSIC) 3971 #define F_FW_IQ_CMD_IQFLINTISCSIC V_FW_IQ_CMD_IQFLINTISCSIC(1U) 3972 3973 #define S_FW_IQ_CMD_FL0CNGCHMAP 20 3974 #define M_FW_IQ_CMD_FL0CNGCHMAP 0xf 3975 #define V_FW_IQ_CMD_FL0CNGCHMAP(x) ((x) << S_FW_IQ_CMD_FL0CNGCHMAP) 3976 #define G_FW_IQ_CMD_FL0CNGCHMAP(x) \ 3977 (((x) >> S_FW_IQ_CMD_FL0CNGCHMAP) & M_FW_IQ_CMD_FL0CNGCHMAP) 3978 3979 #define S_FW_IQ_CMD_FL0CACHELOCK 15 3980 #define M_FW_IQ_CMD_FL0CACHELOCK 0x1 3981 #define V_FW_IQ_CMD_FL0CACHELOCK(x) ((x) << S_FW_IQ_CMD_FL0CACHELOCK) 3982 #define G_FW_IQ_CMD_FL0CACHELOCK(x) \ 3983 (((x) >> S_FW_IQ_CMD_FL0CACHELOCK) & M_FW_IQ_CMD_FL0CACHELOCK) 3984 #define F_FW_IQ_CMD_FL0CACHELOCK V_FW_IQ_CMD_FL0CACHELOCK(1U) 3985 3986 #define S_FW_IQ_CMD_FL0DBP 14 3987 #define M_FW_IQ_CMD_FL0DBP 0x1 3988 #define V_FW_IQ_CMD_FL0DBP(x) ((x) << S_FW_IQ_CMD_FL0DBP) 3989 #define G_FW_IQ_CMD_FL0DBP(x) \ 3990 (((x) >> S_FW_IQ_CMD_FL0DBP) & M_FW_IQ_CMD_FL0DBP) 3991 #define F_FW_IQ_CMD_FL0DBP V_FW_IQ_CMD_FL0DBP(1U) 3992 3993 #define S_FW_IQ_CMD_FL0DATANS 13 3994 #define M_FW_IQ_CMD_FL0DATANS 0x1 3995 #define V_FW_IQ_CMD_FL0DATANS(x) ((x) << S_FW_IQ_CMD_FL0DATANS) 3996 #define G_FW_IQ_CMD_FL0DATANS(x) \ 3997 (((x) >> S_FW_IQ_CMD_FL0DATANS) & M_FW_IQ_CMD_FL0DATANS) 3998 #define F_FW_IQ_CMD_FL0DATANS V_FW_IQ_CMD_FL0DATANS(1U) 3999 4000 #define S_FW_IQ_CMD_FL0DATARO 12 4001 #define M_FW_IQ_CMD_FL0DATARO 0x1 4002 #define V_FW_IQ_CMD_FL0DATARO(x) ((x) << S_FW_IQ_CMD_FL0DATARO) 4003 #define G_FW_IQ_CMD_FL0DATARO(x) \ 4004 (((x) >> S_FW_IQ_CMD_FL0DATARO) & M_FW_IQ_CMD_FL0DATARO) 4005 #define F_FW_IQ_CMD_FL0DATARO V_FW_IQ_CMD_FL0DATARO(1U) 4006 4007 #define S_FW_IQ_CMD_FL0CONGCIF 11 4008 #define M_FW_IQ_CMD_FL0CONGCIF 0x1 4009 #define V_FW_IQ_CMD_FL0CONGCIF(x) ((x) << S_FW_IQ_CMD_FL0CONGCIF) 4010 #define G_FW_IQ_CMD_FL0CONGCIF(x) \ 4011 (((x) >> S_FW_IQ_CMD_FL0CONGCIF) & M_FW_IQ_CMD_FL0CONGCIF) 4012 #define F_FW_IQ_CMD_FL0CONGCIF V_FW_IQ_CMD_FL0CONGCIF(1U) 4013 4014 #define S_FW_IQ_CMD_FL0ONCHIP 10 4015 #define M_FW_IQ_CMD_FL0ONCHIP 0x1 4016 #define V_FW_IQ_CMD_FL0ONCHIP(x) ((x) << S_FW_IQ_CMD_FL0ONCHIP) 4017 #define G_FW_IQ_CMD_FL0ONCHIP(x) \ 4018 (((x) >> S_FW_IQ_CMD_FL0ONCHIP) & M_FW_IQ_CMD_FL0ONCHIP) 4019 #define F_FW_IQ_CMD_FL0ONCHIP V_FW_IQ_CMD_FL0ONCHIP(1U) 4020 4021 #define S_FW_IQ_CMD_FL0STATUSPGNS 9 4022 #define M_FW_IQ_CMD_FL0STATUSPGNS 0x1 4023 #define V_FW_IQ_CMD_FL0STATUSPGNS(x) ((x) << S_FW_IQ_CMD_FL0STATUSPGNS) 4024 #define G_FW_IQ_CMD_FL0STATUSPGNS(x) \ 4025 (((x) >> S_FW_IQ_CMD_FL0STATUSPGNS) & M_FW_IQ_CMD_FL0STATUSPGNS) 4026 #define F_FW_IQ_CMD_FL0STATUSPGNS V_FW_IQ_CMD_FL0STATUSPGNS(1U) 4027 4028 #define S_FW_IQ_CMD_FL0STATUSPGRO 8 4029 #define M_FW_IQ_CMD_FL0STATUSPGRO 0x1 4030 #define V_FW_IQ_CMD_FL0STATUSPGRO(x) ((x) << S_FW_IQ_CMD_FL0STATUSPGRO) 4031 #define G_FW_IQ_CMD_FL0STATUSPGRO(x) \ 4032 (((x) >> S_FW_IQ_CMD_FL0STATUSPGRO) & M_FW_IQ_CMD_FL0STATUSPGRO) 4033 #define F_FW_IQ_CMD_FL0STATUSPGRO V_FW_IQ_CMD_FL0STATUSPGRO(1U) 4034 4035 #define S_FW_IQ_CMD_FL0FETCHNS 7 4036 #define M_FW_IQ_CMD_FL0FETCHNS 0x1 4037 #define V_FW_IQ_CMD_FL0FETCHNS(x) ((x) << S_FW_IQ_CMD_FL0FETCHNS) 4038 #define G_FW_IQ_CMD_FL0FETCHNS(x) \ 4039 (((x) >> S_FW_IQ_CMD_FL0FETCHNS) & M_FW_IQ_CMD_FL0FETCHNS) 4040 #define F_FW_IQ_CMD_FL0FETCHNS V_FW_IQ_CMD_FL0FETCHNS(1U) 4041 4042 #define S_FW_IQ_CMD_FL0FETCHRO 6 4043 #define M_FW_IQ_CMD_FL0FETCHRO 0x1 4044 #define V_FW_IQ_CMD_FL0FETCHRO(x) ((x) << S_FW_IQ_CMD_FL0FETCHRO) 4045 #define G_FW_IQ_CMD_FL0FETCHRO(x) \ 4046 (((x) >> S_FW_IQ_CMD_FL0FETCHRO) & M_FW_IQ_CMD_FL0FETCHRO) 4047 #define F_FW_IQ_CMD_FL0FETCHRO V_FW_IQ_CMD_FL0FETCHRO(1U) 4048 4049 #define S_FW_IQ_CMD_FL0HOSTFCMODE 4 4050 #define M_FW_IQ_CMD_FL0HOSTFCMODE 0x3 4051 #define V_FW_IQ_CMD_FL0HOSTFCMODE(x) ((x) << S_FW_IQ_CMD_FL0HOSTFCMODE) 4052 #define G_FW_IQ_CMD_FL0HOSTFCMODE(x) \ 4053 (((x) >> S_FW_IQ_CMD_FL0HOSTFCMODE) & M_FW_IQ_CMD_FL0HOSTFCMODE) 4054 4055 #define S_FW_IQ_CMD_FL0CPRIO 3 4056 #define M_FW_IQ_CMD_FL0CPRIO 0x1 4057 #define V_FW_IQ_CMD_FL0CPRIO(x) ((x) << S_FW_IQ_CMD_FL0CPRIO) 4058 #define G_FW_IQ_CMD_FL0CPRIO(x) \ 4059 (((x) >> S_FW_IQ_CMD_FL0CPRIO) & M_FW_IQ_CMD_FL0CPRIO) 4060 #define F_FW_IQ_CMD_FL0CPRIO V_FW_IQ_CMD_FL0CPRIO(1U) 4061 4062 #define S_FW_IQ_CMD_FL0PADEN 2 4063 #define M_FW_IQ_CMD_FL0PADEN 0x1 4064 #define V_FW_IQ_CMD_FL0PADEN(x) ((x) << S_FW_IQ_CMD_FL0PADEN) 4065 #define G_FW_IQ_CMD_FL0PADEN(x) \ 4066 (((x) >> S_FW_IQ_CMD_FL0PADEN) & M_FW_IQ_CMD_FL0PADEN) 4067 #define F_FW_IQ_CMD_FL0PADEN V_FW_IQ_CMD_FL0PADEN(1U) 4068 4069 #define S_FW_IQ_CMD_FL0PACKEN 1 4070 #define M_FW_IQ_CMD_FL0PACKEN 0x1 4071 #define V_FW_IQ_CMD_FL0PACKEN(x) ((x) << S_FW_IQ_CMD_FL0PACKEN) 4072 #define G_FW_IQ_CMD_FL0PACKEN(x) \ 4073 (((x) >> S_FW_IQ_CMD_FL0PACKEN) & M_FW_IQ_CMD_FL0PACKEN) 4074 #define F_FW_IQ_CMD_FL0PACKEN V_FW_IQ_CMD_FL0PACKEN(1U) 4075 4076 #define S_FW_IQ_CMD_FL0CONGEN 0 4077 #define M_FW_IQ_CMD_FL0CONGEN 0x1 4078 #define V_FW_IQ_CMD_FL0CONGEN(x) ((x) << S_FW_IQ_CMD_FL0CONGEN) 4079 #define G_FW_IQ_CMD_FL0CONGEN(x) \ 4080 (((x) >> S_FW_IQ_CMD_FL0CONGEN) & M_FW_IQ_CMD_FL0CONGEN) 4081 #define F_FW_IQ_CMD_FL0CONGEN V_FW_IQ_CMD_FL0CONGEN(1U) 4082 4083 #define S_FW_IQ_CMD_FL0DCAEN 15 4084 #define M_FW_IQ_CMD_FL0DCAEN 0x1 4085 #define V_FW_IQ_CMD_FL0DCAEN(x) ((x) << S_FW_IQ_CMD_FL0DCAEN) 4086 #define G_FW_IQ_CMD_FL0DCAEN(x) \ 4087 (((x) >> S_FW_IQ_CMD_FL0DCAEN) & M_FW_IQ_CMD_FL0DCAEN) 4088 #define F_FW_IQ_CMD_FL0DCAEN V_FW_IQ_CMD_FL0DCAEN(1U) 4089 4090 #define S_FW_IQ_CMD_FL0DCACPU 10 4091 #define M_FW_IQ_CMD_FL0DCACPU 0x1f 4092 #define V_FW_IQ_CMD_FL0DCACPU(x) ((x) << S_FW_IQ_CMD_FL0DCACPU) 4093 #define G_FW_IQ_CMD_FL0DCACPU(x) \ 4094 (((x) >> S_FW_IQ_CMD_FL0DCACPU) & M_FW_IQ_CMD_FL0DCACPU) 4095 4096 #define S_FW_IQ_CMD_FL0FBMIN 7 4097 #define M_FW_IQ_CMD_FL0FBMIN 0x7 4098 #define V_FW_IQ_CMD_FL0FBMIN(x) ((x) << S_FW_IQ_CMD_FL0FBMIN) 4099 #define G_FW_IQ_CMD_FL0FBMIN(x) \ 4100 (((x) >> S_FW_IQ_CMD_FL0FBMIN) & M_FW_IQ_CMD_FL0FBMIN) 4101 4102 #define S_FW_IQ_CMD_FL0FBMAX 4 4103 #define M_FW_IQ_CMD_FL0FBMAX 0x7 4104 #define V_FW_IQ_CMD_FL0FBMAX(x) ((x) << S_FW_IQ_CMD_FL0FBMAX) 4105 #define G_FW_IQ_CMD_FL0FBMAX(x) \ 4106 (((x) >> S_FW_IQ_CMD_FL0FBMAX) & M_FW_IQ_CMD_FL0FBMAX) 4107 4108 #define S_FW_IQ_CMD_FL0CIDXFTHRESHO 3 4109 #define M_FW_IQ_CMD_FL0CIDXFTHRESHO 0x1 4110 #define V_FW_IQ_CMD_FL0CIDXFTHRESHO(x) ((x) << S_FW_IQ_CMD_FL0CIDXFTHRESHO) 4111 #define G_FW_IQ_CMD_FL0CIDXFTHRESHO(x) \ 4112 (((x) >> S_FW_IQ_CMD_FL0CIDXFTHRESHO) & M_FW_IQ_CMD_FL0CIDXFTHRESHO) 4113 #define F_FW_IQ_CMD_FL0CIDXFTHRESHO V_FW_IQ_CMD_FL0CIDXFTHRESHO(1U) 4114 4115 #define S_FW_IQ_CMD_FL0CIDXFTHRESH 0 4116 #define M_FW_IQ_CMD_FL0CIDXFTHRESH 0x7 4117 #define V_FW_IQ_CMD_FL0CIDXFTHRESH(x) ((x) << S_FW_IQ_CMD_FL0CIDXFTHRESH) 4118 #define G_FW_IQ_CMD_FL0CIDXFTHRESH(x) \ 4119 (((x) >> S_FW_IQ_CMD_FL0CIDXFTHRESH) & M_FW_IQ_CMD_FL0CIDXFTHRESH) 4120 4121 #define S_FW_IQ_CMD_FL1CNGCHMAP 20 4122 #define M_FW_IQ_CMD_FL1CNGCHMAP 0xf 4123 #define V_FW_IQ_CMD_FL1CNGCHMAP(x) ((x) << S_FW_IQ_CMD_FL1CNGCHMAP) 4124 #define G_FW_IQ_CMD_FL1CNGCHMAP(x) \ 4125 (((x) >> S_FW_IQ_CMD_FL1CNGCHMAP) & M_FW_IQ_CMD_FL1CNGCHMAP) 4126 4127 #define S_FW_IQ_CMD_FL1CACHELOCK 15 4128 #define M_FW_IQ_CMD_FL1CACHELOCK 0x1 4129 #define V_FW_IQ_CMD_FL1CACHELOCK(x) ((x) << S_FW_IQ_CMD_FL1CACHELOCK) 4130 #define G_FW_IQ_CMD_FL1CACHELOCK(x) \ 4131 (((x) >> S_FW_IQ_CMD_FL1CACHELOCK) & M_FW_IQ_CMD_FL1CACHELOCK) 4132 #define F_FW_IQ_CMD_FL1CACHELOCK V_FW_IQ_CMD_FL1CACHELOCK(1U) 4133 4134 #define S_FW_IQ_CMD_FL1DBP 14 4135 #define M_FW_IQ_CMD_FL1DBP 0x1 4136 #define V_FW_IQ_CMD_FL1DBP(x) ((x) << S_FW_IQ_CMD_FL1DBP) 4137 #define G_FW_IQ_CMD_FL1DBP(x) \ 4138 (((x) >> S_FW_IQ_CMD_FL1DBP) & M_FW_IQ_CMD_FL1DBP) 4139 #define F_FW_IQ_CMD_FL1DBP V_FW_IQ_CMD_FL1DBP(1U) 4140 4141 #define S_FW_IQ_CMD_FL1DATANS 13 4142 #define M_FW_IQ_CMD_FL1DATANS 0x1 4143 #define V_FW_IQ_CMD_FL1DATANS(x) ((x) << S_FW_IQ_CMD_FL1DATANS) 4144 #define G_FW_IQ_CMD_FL1DATANS(x) \ 4145 (((x) >> S_FW_IQ_CMD_FL1DATANS) & M_FW_IQ_CMD_FL1DATANS) 4146 #define F_FW_IQ_CMD_FL1DATANS V_FW_IQ_CMD_FL1DATANS(1U) 4147 4148 #define S_FW_IQ_CMD_FL1DATARO 12 4149 #define M_FW_IQ_CMD_FL1DATARO 0x1 4150 #define V_FW_IQ_CMD_FL1DATARO(x) ((x) << S_FW_IQ_CMD_FL1DATARO) 4151 #define G_FW_IQ_CMD_FL1DATARO(x) \ 4152 (((x) >> S_FW_IQ_CMD_FL1DATARO) & M_FW_IQ_CMD_FL1DATARO) 4153 #define F_FW_IQ_CMD_FL1DATARO V_FW_IQ_CMD_FL1DATARO(1U) 4154 4155 #define S_FW_IQ_CMD_FL1CONGCIF 11 4156 #define M_FW_IQ_CMD_FL1CONGCIF 0x1 4157 #define V_FW_IQ_CMD_FL1CONGCIF(x) ((x) << S_FW_IQ_CMD_FL1CONGCIF) 4158 #define G_FW_IQ_CMD_FL1CONGCIF(x) \ 4159 (((x) >> S_FW_IQ_CMD_FL1CONGCIF) & M_FW_IQ_CMD_FL1CONGCIF) 4160 #define F_FW_IQ_CMD_FL1CONGCIF V_FW_IQ_CMD_FL1CONGCIF(1U) 4161 4162 #define S_FW_IQ_CMD_FL1ONCHIP 10 4163 #define M_FW_IQ_CMD_FL1ONCHIP 0x1 4164 #define V_FW_IQ_CMD_FL1ONCHIP(x) ((x) << S_FW_IQ_CMD_FL1ONCHIP) 4165 #define G_FW_IQ_CMD_FL1ONCHIP(x) \ 4166 (((x) >> S_FW_IQ_CMD_FL1ONCHIP) & M_FW_IQ_CMD_FL1ONCHIP) 4167 #define F_FW_IQ_CMD_FL1ONCHIP V_FW_IQ_CMD_FL1ONCHIP(1U) 4168 4169 #define S_FW_IQ_CMD_FL1STATUSPGNS 9 4170 #define M_FW_IQ_CMD_FL1STATUSPGNS 0x1 4171 #define V_FW_IQ_CMD_FL1STATUSPGNS(x) ((x) << S_FW_IQ_CMD_FL1STATUSPGNS) 4172 #define G_FW_IQ_CMD_FL1STATUSPGNS(x) \ 4173 (((x) >> S_FW_IQ_CMD_FL1STATUSPGNS) & M_FW_IQ_CMD_FL1STATUSPGNS) 4174 #define F_FW_IQ_CMD_FL1STATUSPGNS V_FW_IQ_CMD_FL1STATUSPGNS(1U) 4175 4176 #define S_FW_IQ_CMD_FL1STATUSPGRO 8 4177 #define M_FW_IQ_CMD_FL1STATUSPGRO 0x1 4178 #define V_FW_IQ_CMD_FL1STATUSPGRO(x) ((x) << S_FW_IQ_CMD_FL1STATUSPGRO) 4179 #define G_FW_IQ_CMD_FL1STATUSPGRO(x) \ 4180 (((x) >> S_FW_IQ_CMD_FL1STATUSPGRO) & M_FW_IQ_CMD_FL1STATUSPGRO) 4181 #define F_FW_IQ_CMD_FL1STATUSPGRO V_FW_IQ_CMD_FL1STATUSPGRO(1U) 4182 4183 #define S_FW_IQ_CMD_FL1FETCHNS 7 4184 #define M_FW_IQ_CMD_FL1FETCHNS 0x1 4185 #define V_FW_IQ_CMD_FL1FETCHNS(x) ((x) << S_FW_IQ_CMD_FL1FETCHNS) 4186 #define G_FW_IQ_CMD_FL1FETCHNS(x) \ 4187 (((x) >> S_FW_IQ_CMD_FL1FETCHNS) & M_FW_IQ_CMD_FL1FETCHNS) 4188 #define F_FW_IQ_CMD_FL1FETCHNS V_FW_IQ_CMD_FL1FETCHNS(1U) 4189 4190 #define S_FW_IQ_CMD_FL1FETCHRO 6 4191 #define M_FW_IQ_CMD_FL1FETCHRO 0x1 4192 #define V_FW_IQ_CMD_FL1FETCHRO(x) ((x) << S_FW_IQ_CMD_FL1FETCHRO) 4193 #define G_FW_IQ_CMD_FL1FETCHRO(x) \ 4194 (((x) >> S_FW_IQ_CMD_FL1FETCHRO) & M_FW_IQ_CMD_FL1FETCHRO) 4195 #define F_FW_IQ_CMD_FL1FETCHRO V_FW_IQ_CMD_FL1FETCHRO(1U) 4196 4197 #define S_FW_IQ_CMD_FL1HOSTFCMODE 4 4198 #define M_FW_IQ_CMD_FL1HOSTFCMODE 0x3 4199 #define V_FW_IQ_CMD_FL1HOSTFCMODE(x) ((x) << S_FW_IQ_CMD_FL1HOSTFCMODE) 4200 #define G_FW_IQ_CMD_FL1HOSTFCMODE(x) \ 4201 (((x) >> S_FW_IQ_CMD_FL1HOSTFCMODE) & M_FW_IQ_CMD_FL1HOSTFCMODE) 4202 4203 #define S_FW_IQ_CMD_FL1CPRIO 3 4204 #define M_FW_IQ_CMD_FL1CPRIO 0x1 4205 #define V_FW_IQ_CMD_FL1CPRIO(x) ((x) << S_FW_IQ_CMD_FL1CPRIO) 4206 #define G_FW_IQ_CMD_FL1CPRIO(x) \ 4207 (((x) >> S_FW_IQ_CMD_FL1CPRIO) & M_FW_IQ_CMD_FL1CPRIO) 4208 #define F_FW_IQ_CMD_FL1CPRIO V_FW_IQ_CMD_FL1CPRIO(1U) 4209 4210 #define S_FW_IQ_CMD_FL1PADEN 2 4211 #define M_FW_IQ_CMD_FL1PADEN 0x1 4212 #define V_FW_IQ_CMD_FL1PADEN(x) ((x) << S_FW_IQ_CMD_FL1PADEN) 4213 #define G_FW_IQ_CMD_FL1PADEN(x) \ 4214 (((x) >> S_FW_IQ_CMD_FL1PADEN) & M_FW_IQ_CMD_FL1PADEN) 4215 #define F_FW_IQ_CMD_FL1PADEN V_FW_IQ_CMD_FL1PADEN(1U) 4216 4217 #define S_FW_IQ_CMD_FL1PACKEN 1 4218 #define M_FW_IQ_CMD_FL1PACKEN 0x1 4219 #define V_FW_IQ_CMD_FL1PACKEN(x) ((x) << S_FW_IQ_CMD_FL1PACKEN) 4220 #define G_FW_IQ_CMD_FL1PACKEN(x) \ 4221 (((x) >> S_FW_IQ_CMD_FL1PACKEN) & M_FW_IQ_CMD_FL1PACKEN) 4222 #define F_FW_IQ_CMD_FL1PACKEN V_FW_IQ_CMD_FL1PACKEN(1U) 4223 4224 #define S_FW_IQ_CMD_FL1CONGEN 0 4225 #define M_FW_IQ_CMD_FL1CONGEN 0x1 4226 #define V_FW_IQ_CMD_FL1CONGEN(x) ((x) << S_FW_IQ_CMD_FL1CONGEN) 4227 #define G_FW_IQ_CMD_FL1CONGEN(x) \ 4228 (((x) >> S_FW_IQ_CMD_FL1CONGEN) & M_FW_IQ_CMD_FL1CONGEN) 4229 #define F_FW_IQ_CMD_FL1CONGEN V_FW_IQ_CMD_FL1CONGEN(1U) 4230 4231 #define S_FW_IQ_CMD_FL1DCAEN 15 4232 #define M_FW_IQ_CMD_FL1DCAEN 0x1 4233 #define V_FW_IQ_CMD_FL1DCAEN(x) ((x) << S_FW_IQ_CMD_FL1DCAEN) 4234 #define G_FW_IQ_CMD_FL1DCAEN(x) \ 4235 (((x) >> S_FW_IQ_CMD_FL1DCAEN) & M_FW_IQ_CMD_FL1DCAEN) 4236 #define F_FW_IQ_CMD_FL1DCAEN V_FW_IQ_CMD_FL1DCAEN(1U) 4237 4238 #define S_FW_IQ_CMD_FL1DCACPU 10 4239 #define M_FW_IQ_CMD_FL1DCACPU 0x1f 4240 #define V_FW_IQ_CMD_FL1DCACPU(x) ((x) << S_FW_IQ_CMD_FL1DCACPU) 4241 #define G_FW_IQ_CMD_FL1DCACPU(x) \ 4242 (((x) >> S_FW_IQ_CMD_FL1DCACPU) & M_FW_IQ_CMD_FL1DCACPU) 4243 4244 #define S_FW_IQ_CMD_FL1FBMIN 7 4245 #define M_FW_IQ_CMD_FL1FBMIN 0x7 4246 #define V_FW_IQ_CMD_FL1FBMIN(x) ((x) << S_FW_IQ_CMD_FL1FBMIN) 4247 #define G_FW_IQ_CMD_FL1FBMIN(x) \ 4248 (((x) >> S_FW_IQ_CMD_FL1FBMIN) & M_FW_IQ_CMD_FL1FBMIN) 4249 4250 #define S_FW_IQ_CMD_FL1FBMAX 4 4251 #define M_FW_IQ_CMD_FL1FBMAX 0x7 4252 #define V_FW_IQ_CMD_FL1FBMAX(x) ((x) << S_FW_IQ_CMD_FL1FBMAX) 4253 #define G_FW_IQ_CMD_FL1FBMAX(x) \ 4254 (((x) >> S_FW_IQ_CMD_FL1FBMAX) & M_FW_IQ_CMD_FL1FBMAX) 4255 4256 #define S_FW_IQ_CMD_FL1CIDXFTHRESHO 3 4257 #define M_FW_IQ_CMD_FL1CIDXFTHRESHO 0x1 4258 #define V_FW_IQ_CMD_FL1CIDXFTHRESHO(x) ((x) << S_FW_IQ_CMD_FL1CIDXFTHRESHO) 4259 #define G_FW_IQ_CMD_FL1CIDXFTHRESHO(x) \ 4260 (((x) >> S_FW_IQ_CMD_FL1CIDXFTHRESHO) & M_FW_IQ_CMD_FL1CIDXFTHRESHO) 4261 #define F_FW_IQ_CMD_FL1CIDXFTHRESHO V_FW_IQ_CMD_FL1CIDXFTHRESHO(1U) 4262 4263 #define S_FW_IQ_CMD_FL1CIDXFTHRESH 0 4264 #define M_FW_IQ_CMD_FL1CIDXFTHRESH 0x7 4265 #define V_FW_IQ_CMD_FL1CIDXFTHRESH(x) ((x) << S_FW_IQ_CMD_FL1CIDXFTHRESH) 4266 #define G_FW_IQ_CMD_FL1CIDXFTHRESH(x) \ 4267 (((x) >> S_FW_IQ_CMD_FL1CIDXFTHRESH) & M_FW_IQ_CMD_FL1CIDXFTHRESH) 4268 4269 struct fw_eq_mngt_cmd { 4270 __be32 op_to_vfn; 4271 __be32 alloc_to_len16; 4272 __be32 cmpliqid_eqid; 4273 __be32 physeqid_pkd; 4274 __be32 fetchszm_to_iqid; 4275 __be32 dcaen_to_eqsize; 4276 __be64 eqaddr; 4277 }; 4278 4279 #define S_FW_EQ_MNGT_CMD_PFN 8 4280 #define M_FW_EQ_MNGT_CMD_PFN 0x7 4281 #define V_FW_EQ_MNGT_CMD_PFN(x) ((x) << S_FW_EQ_MNGT_CMD_PFN) 4282 #define G_FW_EQ_MNGT_CMD_PFN(x) \ 4283 (((x) >> S_FW_EQ_MNGT_CMD_PFN) & M_FW_EQ_MNGT_CMD_PFN) 4284 4285 #define S_FW_EQ_MNGT_CMD_VFN 0 4286 #define M_FW_EQ_MNGT_CMD_VFN 0xff 4287 #define V_FW_EQ_MNGT_CMD_VFN(x) ((x) << S_FW_EQ_MNGT_CMD_VFN) 4288 #define G_FW_EQ_MNGT_CMD_VFN(x) \ 4289 (((x) >> S_FW_EQ_MNGT_CMD_VFN) & M_FW_EQ_MNGT_CMD_VFN) 4290 4291 #define S_FW_EQ_MNGT_CMD_ALLOC 31 4292 #define M_FW_EQ_MNGT_CMD_ALLOC 0x1 4293 #define V_FW_EQ_MNGT_CMD_ALLOC(x) ((x) << S_FW_EQ_MNGT_CMD_ALLOC) 4294 #define G_FW_EQ_MNGT_CMD_ALLOC(x) \ 4295 (((x) >> S_FW_EQ_MNGT_CMD_ALLOC) & M_FW_EQ_MNGT_CMD_ALLOC) 4296 #define F_FW_EQ_MNGT_CMD_ALLOC V_FW_EQ_MNGT_CMD_ALLOC(1U) 4297 4298 #define S_FW_EQ_MNGT_CMD_FREE 30 4299 #define M_FW_EQ_MNGT_CMD_FREE 0x1 4300 #define V_FW_EQ_MNGT_CMD_FREE(x) ((x) << S_FW_EQ_MNGT_CMD_FREE) 4301 #define G_FW_EQ_MNGT_CMD_FREE(x) \ 4302 (((x) >> S_FW_EQ_MNGT_CMD_FREE) & M_FW_EQ_MNGT_CMD_FREE) 4303 #define F_FW_EQ_MNGT_CMD_FREE V_FW_EQ_MNGT_CMD_FREE(1U) 4304 4305 #define S_FW_EQ_MNGT_CMD_MODIFY 29 4306 #define M_FW_EQ_MNGT_CMD_MODIFY 0x1 4307 #define V_FW_EQ_MNGT_CMD_MODIFY(x) ((x) << S_FW_EQ_MNGT_CMD_MODIFY) 4308 #define G_FW_EQ_MNGT_CMD_MODIFY(x) \ 4309 (((x) >> S_FW_EQ_MNGT_CMD_MODIFY) & M_FW_EQ_MNGT_CMD_MODIFY) 4310 #define F_FW_EQ_MNGT_CMD_MODIFY V_FW_EQ_MNGT_CMD_MODIFY(1U) 4311 4312 #define S_FW_EQ_MNGT_CMD_EQSTART 28 4313 #define M_FW_EQ_MNGT_CMD_EQSTART 0x1 4314 #define V_FW_EQ_MNGT_CMD_EQSTART(x) ((x) << S_FW_EQ_MNGT_CMD_EQSTART) 4315 #define G_FW_EQ_MNGT_CMD_EQSTART(x) \ 4316 (((x) >> S_FW_EQ_MNGT_CMD_EQSTART) & M_FW_EQ_MNGT_CMD_EQSTART) 4317 #define F_FW_EQ_MNGT_CMD_EQSTART V_FW_EQ_MNGT_CMD_EQSTART(1U) 4318 4319 #define S_FW_EQ_MNGT_CMD_EQSTOP 27 4320 #define M_FW_EQ_MNGT_CMD_EQSTOP 0x1 4321 #define V_FW_EQ_MNGT_CMD_EQSTOP(x) ((x) << S_FW_EQ_MNGT_CMD_EQSTOP) 4322 #define G_FW_EQ_MNGT_CMD_EQSTOP(x) \ 4323 (((x) >> S_FW_EQ_MNGT_CMD_EQSTOP) & M_FW_EQ_MNGT_CMD_EQSTOP) 4324 #define F_FW_EQ_MNGT_CMD_EQSTOP V_FW_EQ_MNGT_CMD_EQSTOP(1U) 4325 4326 #define S_FW_EQ_MNGT_CMD_CMPLIQID 20 4327 #define M_FW_EQ_MNGT_CMD_CMPLIQID 0xfff 4328 #define V_FW_EQ_MNGT_CMD_CMPLIQID(x) ((x) << S_FW_EQ_MNGT_CMD_CMPLIQID) 4329 #define G_FW_EQ_MNGT_CMD_CMPLIQID(x) \ 4330 (((x) >> S_FW_EQ_MNGT_CMD_CMPLIQID) & M_FW_EQ_MNGT_CMD_CMPLIQID) 4331 4332 #define S_FW_EQ_MNGT_CMD_EQID 0 4333 #define M_FW_EQ_MNGT_CMD_EQID 0xfffff 4334 #define V_FW_EQ_MNGT_CMD_EQID(x) ((x) << S_FW_EQ_MNGT_CMD_EQID) 4335 #define G_FW_EQ_MNGT_CMD_EQID(x) \ 4336 (((x) >> S_FW_EQ_MNGT_CMD_EQID) & M_FW_EQ_MNGT_CMD_EQID) 4337 4338 #define S_FW_EQ_MNGT_CMD_PHYSEQID 0 4339 #define M_FW_EQ_MNGT_CMD_PHYSEQID 0xfffff 4340 #define V_FW_EQ_MNGT_CMD_PHYSEQID(x) ((x) << S_FW_EQ_MNGT_CMD_PHYSEQID) 4341 #define G_FW_EQ_MNGT_CMD_PHYSEQID(x) \ 4342 (((x) >> S_FW_EQ_MNGT_CMD_PHYSEQID) & M_FW_EQ_MNGT_CMD_PHYSEQID) 4343 4344 #define S_FW_EQ_MNGT_CMD_FETCHSZM 26 4345 #define M_FW_EQ_MNGT_CMD_FETCHSZM 0x1 4346 #define V_FW_EQ_MNGT_CMD_FETCHSZM(x) ((x) << S_FW_EQ_MNGT_CMD_FETCHSZM) 4347 #define G_FW_EQ_MNGT_CMD_FETCHSZM(x) \ 4348 (((x) >> S_FW_EQ_MNGT_CMD_FETCHSZM) & M_FW_EQ_MNGT_CMD_FETCHSZM) 4349 #define F_FW_EQ_MNGT_CMD_FETCHSZM V_FW_EQ_MNGT_CMD_FETCHSZM(1U) 4350 4351 #define S_FW_EQ_MNGT_CMD_STATUSPGNS 25 4352 #define M_FW_EQ_MNGT_CMD_STATUSPGNS 0x1 4353 #define V_FW_EQ_MNGT_CMD_STATUSPGNS(x) ((x) << S_FW_EQ_MNGT_CMD_STATUSPGNS) 4354 #define G_FW_EQ_MNGT_CMD_STATUSPGNS(x) \ 4355 (((x) >> S_FW_EQ_MNGT_CMD_STATUSPGNS) & M_FW_EQ_MNGT_CMD_STATUSPGNS) 4356 #define F_FW_EQ_MNGT_CMD_STATUSPGNS V_FW_EQ_MNGT_CMD_STATUSPGNS(1U) 4357 4358 #define S_FW_EQ_MNGT_CMD_STATUSPGRO 24 4359 #define M_FW_EQ_MNGT_CMD_STATUSPGRO 0x1 4360 #define V_FW_EQ_MNGT_CMD_STATUSPGRO(x) ((x) << S_FW_EQ_MNGT_CMD_STATUSPGRO) 4361 #define G_FW_EQ_MNGT_CMD_STATUSPGRO(x) \ 4362 (((x) >> S_FW_EQ_MNGT_CMD_STATUSPGRO) & M_FW_EQ_MNGT_CMD_STATUSPGRO) 4363 #define F_FW_EQ_MNGT_CMD_STATUSPGRO V_FW_EQ_MNGT_CMD_STATUSPGRO(1U) 4364 4365 #define S_FW_EQ_MNGT_CMD_FETCHNS 23 4366 #define M_FW_EQ_MNGT_CMD_FETCHNS 0x1 4367 #define V_FW_EQ_MNGT_CMD_FETCHNS(x) ((x) << S_FW_EQ_MNGT_CMD_FETCHNS) 4368 #define G_FW_EQ_MNGT_CMD_FETCHNS(x) \ 4369 (((x) >> S_FW_EQ_MNGT_CMD_FETCHNS) & M_FW_EQ_MNGT_CMD_FETCHNS) 4370 #define F_FW_EQ_MNGT_CMD_FETCHNS V_FW_EQ_MNGT_CMD_FETCHNS(1U) 4371 4372 #define S_FW_EQ_MNGT_CMD_FETCHRO 22 4373 #define M_FW_EQ_MNGT_CMD_FETCHRO 0x1 4374 #define V_FW_EQ_MNGT_CMD_FETCHRO(x) ((x) << S_FW_EQ_MNGT_CMD_FETCHRO) 4375 #define G_FW_EQ_MNGT_CMD_FETCHRO(x) \ 4376 (((x) >> S_FW_EQ_MNGT_CMD_FETCHRO) & M_FW_EQ_MNGT_CMD_FETCHRO) 4377 #define F_FW_EQ_MNGT_CMD_FETCHRO V_FW_EQ_MNGT_CMD_FETCHRO(1U) 4378 4379 #define S_FW_EQ_MNGT_CMD_HOSTFCMODE 20 4380 #define M_FW_EQ_MNGT_CMD_HOSTFCMODE 0x3 4381 #define V_FW_EQ_MNGT_CMD_HOSTFCMODE(x) ((x) << S_FW_EQ_MNGT_CMD_HOSTFCMODE) 4382 #define G_FW_EQ_MNGT_CMD_HOSTFCMODE(x) \ 4383 (((x) >> S_FW_EQ_MNGT_CMD_HOSTFCMODE) & M_FW_EQ_MNGT_CMD_HOSTFCMODE) 4384 4385 #define S_FW_EQ_MNGT_CMD_CPRIO 19 4386 #define M_FW_EQ_MNGT_CMD_CPRIO 0x1 4387 #define V_FW_EQ_MNGT_CMD_CPRIO(x) ((x) << S_FW_EQ_MNGT_CMD_CPRIO) 4388 #define G_FW_EQ_MNGT_CMD_CPRIO(x) \ 4389 (((x) >> S_FW_EQ_MNGT_CMD_CPRIO) & M_FW_EQ_MNGT_CMD_CPRIO) 4390 #define F_FW_EQ_MNGT_CMD_CPRIO V_FW_EQ_MNGT_CMD_CPRIO(1U) 4391 4392 #define S_FW_EQ_MNGT_CMD_ONCHIP 18 4393 #define M_FW_EQ_MNGT_CMD_ONCHIP 0x1 4394 #define V_FW_EQ_MNGT_CMD_ONCHIP(x) ((x) << S_FW_EQ_MNGT_CMD_ONCHIP) 4395 #define G_FW_EQ_MNGT_CMD_ONCHIP(x) \ 4396 (((x) >> S_FW_EQ_MNGT_CMD_ONCHIP) & M_FW_EQ_MNGT_CMD_ONCHIP) 4397 #define F_FW_EQ_MNGT_CMD_ONCHIP V_FW_EQ_MNGT_CMD_ONCHIP(1U) 4398 4399 #define S_FW_EQ_MNGT_CMD_PCIECHN 16 4400 #define M_FW_EQ_MNGT_CMD_PCIECHN 0x3 4401 #define V_FW_EQ_MNGT_CMD_PCIECHN(x) ((x) << S_FW_EQ_MNGT_CMD_PCIECHN) 4402 #define G_FW_EQ_MNGT_CMD_PCIECHN(x) \ 4403 (((x) >> S_FW_EQ_MNGT_CMD_PCIECHN) & M_FW_EQ_MNGT_CMD_PCIECHN) 4404 4405 #define S_FW_EQ_MNGT_CMD_IQID 0 4406 #define M_FW_EQ_MNGT_CMD_IQID 0xffff 4407 #define V_FW_EQ_MNGT_CMD_IQID(x) ((x) << S_FW_EQ_MNGT_CMD_IQID) 4408 #define G_FW_EQ_MNGT_CMD_IQID(x) \ 4409 (((x) >> S_FW_EQ_MNGT_CMD_IQID) & M_FW_EQ_MNGT_CMD_IQID) 4410 4411 #define S_FW_EQ_MNGT_CMD_DCAEN 31 4412 #define M_FW_EQ_MNGT_CMD_DCAEN 0x1 4413 #define V_FW_EQ_MNGT_CMD_DCAEN(x) ((x) << S_FW_EQ_MNGT_CMD_DCAEN) 4414 #define G_FW_EQ_MNGT_CMD_DCAEN(x) \ 4415 (((x) >> S_FW_EQ_MNGT_CMD_DCAEN) & M_FW_EQ_MNGT_CMD_DCAEN) 4416 #define F_FW_EQ_MNGT_CMD_DCAEN V_FW_EQ_MNGT_CMD_DCAEN(1U) 4417 4418 #define S_FW_EQ_MNGT_CMD_DCACPU 26 4419 #define M_FW_EQ_MNGT_CMD_DCACPU 0x1f 4420 #define V_FW_EQ_MNGT_CMD_DCACPU(x) ((x) << S_FW_EQ_MNGT_CMD_DCACPU) 4421 #define G_FW_EQ_MNGT_CMD_DCACPU(x) \ 4422 (((x) >> S_FW_EQ_MNGT_CMD_DCACPU) & M_FW_EQ_MNGT_CMD_DCACPU) 4423 4424 #define S_FW_EQ_MNGT_CMD_FBMIN 23 4425 #define M_FW_EQ_MNGT_CMD_FBMIN 0x7 4426 #define V_FW_EQ_MNGT_CMD_FBMIN(x) ((x) << S_FW_EQ_MNGT_CMD_FBMIN) 4427 #define G_FW_EQ_MNGT_CMD_FBMIN(x) \ 4428 (((x) >> S_FW_EQ_MNGT_CMD_FBMIN) & M_FW_EQ_MNGT_CMD_FBMIN) 4429 4430 #define S_FW_EQ_MNGT_CMD_FBMAX 20 4431 #define M_FW_EQ_MNGT_CMD_FBMAX 0x7 4432 #define V_FW_EQ_MNGT_CMD_FBMAX(x) ((x) << S_FW_EQ_MNGT_CMD_FBMAX) 4433 #define G_FW_EQ_MNGT_CMD_FBMAX(x) \ 4434 (((x) >> S_FW_EQ_MNGT_CMD_FBMAX) & M_FW_EQ_MNGT_CMD_FBMAX) 4435 4436 #define S_FW_EQ_MNGT_CMD_CIDXFTHRESHO 19 4437 #define M_FW_EQ_MNGT_CMD_CIDXFTHRESHO 0x1 4438 #define V_FW_EQ_MNGT_CMD_CIDXFTHRESHO(x) \ 4439 ((x) << S_FW_EQ_MNGT_CMD_CIDXFTHRESHO) 4440 #define G_FW_EQ_MNGT_CMD_CIDXFTHRESHO(x) \ 4441 (((x) >> S_FW_EQ_MNGT_CMD_CIDXFTHRESHO) & M_FW_EQ_MNGT_CMD_CIDXFTHRESHO) 4442 #define F_FW_EQ_MNGT_CMD_CIDXFTHRESHO V_FW_EQ_MNGT_CMD_CIDXFTHRESHO(1U) 4443 4444 #define S_FW_EQ_MNGT_CMD_CIDXFTHRESH 16 4445 #define M_FW_EQ_MNGT_CMD_CIDXFTHRESH 0x7 4446 #define V_FW_EQ_MNGT_CMD_CIDXFTHRESH(x) ((x) << S_FW_EQ_MNGT_CMD_CIDXFTHRESH) 4447 #define G_FW_EQ_MNGT_CMD_CIDXFTHRESH(x) \ 4448 (((x) >> S_FW_EQ_MNGT_CMD_CIDXFTHRESH) & M_FW_EQ_MNGT_CMD_CIDXFTHRESH) 4449 4450 #define S_FW_EQ_MNGT_CMD_EQSIZE 0 4451 #define M_FW_EQ_MNGT_CMD_EQSIZE 0xffff 4452 #define V_FW_EQ_MNGT_CMD_EQSIZE(x) ((x) << S_FW_EQ_MNGT_CMD_EQSIZE) 4453 #define G_FW_EQ_MNGT_CMD_EQSIZE(x) \ 4454 (((x) >> S_FW_EQ_MNGT_CMD_EQSIZE) & M_FW_EQ_MNGT_CMD_EQSIZE) 4455 4456 struct fw_eq_eth_cmd { 4457 __be32 op_to_vfn; 4458 __be32 alloc_to_len16; 4459 __be32 eqid_pkd; 4460 __be32 physeqid_pkd; 4461 __be32 fetchszm_to_iqid; 4462 __be32 dcaen_to_eqsize; 4463 __be64 eqaddr; 4464 __be32 viid_pkd; 4465 __be32 r8_lo; 4466 __be64 r9; 4467 }; 4468 4469 #define S_FW_EQ_ETH_CMD_PFN 8 4470 #define M_FW_EQ_ETH_CMD_PFN 0x7 4471 #define V_FW_EQ_ETH_CMD_PFN(x) ((x) << S_FW_EQ_ETH_CMD_PFN) 4472 #define G_FW_EQ_ETH_CMD_PFN(x) \ 4473 (((x) >> S_FW_EQ_ETH_CMD_PFN) & M_FW_EQ_ETH_CMD_PFN) 4474 4475 #define S_FW_EQ_ETH_CMD_VFN 0 4476 #define M_FW_EQ_ETH_CMD_VFN 0xff 4477 #define V_FW_EQ_ETH_CMD_VFN(x) ((x) << S_FW_EQ_ETH_CMD_VFN) 4478 #define G_FW_EQ_ETH_CMD_VFN(x) \ 4479 (((x) >> S_FW_EQ_ETH_CMD_VFN) & M_FW_EQ_ETH_CMD_VFN) 4480 4481 #define S_FW_EQ_ETH_CMD_ALLOC 31 4482 #define M_FW_EQ_ETH_CMD_ALLOC 0x1 4483 #define V_FW_EQ_ETH_CMD_ALLOC(x) ((x) << S_FW_EQ_ETH_CMD_ALLOC) 4484 #define G_FW_EQ_ETH_CMD_ALLOC(x) \ 4485 (((x) >> S_FW_EQ_ETH_CMD_ALLOC) & M_FW_EQ_ETH_CMD_ALLOC) 4486 #define F_FW_EQ_ETH_CMD_ALLOC V_FW_EQ_ETH_CMD_ALLOC(1U) 4487 4488 #define S_FW_EQ_ETH_CMD_FREE 30 4489 #define M_FW_EQ_ETH_CMD_FREE 0x1 4490 #define V_FW_EQ_ETH_CMD_FREE(x) ((x) << S_FW_EQ_ETH_CMD_FREE) 4491 #define G_FW_EQ_ETH_CMD_FREE(x) \ 4492 (((x) >> S_FW_EQ_ETH_CMD_FREE) & M_FW_EQ_ETH_CMD_FREE) 4493 #define F_FW_EQ_ETH_CMD_FREE V_FW_EQ_ETH_CMD_FREE(1U) 4494 4495 #define S_FW_EQ_ETH_CMD_MODIFY 29 4496 #define M_FW_EQ_ETH_CMD_MODIFY 0x1 4497 #define V_FW_EQ_ETH_CMD_MODIFY(x) ((x) << S_FW_EQ_ETH_CMD_MODIFY) 4498 #define G_FW_EQ_ETH_CMD_MODIFY(x) \ 4499 (((x) >> S_FW_EQ_ETH_CMD_MODIFY) & M_FW_EQ_ETH_CMD_MODIFY) 4500 #define F_FW_EQ_ETH_CMD_MODIFY V_FW_EQ_ETH_CMD_MODIFY(1U) 4501 4502 #define S_FW_EQ_ETH_CMD_EQSTART 28 4503 #define M_FW_EQ_ETH_CMD_EQSTART 0x1 4504 #define V_FW_EQ_ETH_CMD_EQSTART(x) ((x) << S_FW_EQ_ETH_CMD_EQSTART) 4505 #define G_FW_EQ_ETH_CMD_EQSTART(x) \ 4506 (((x) >> S_FW_EQ_ETH_CMD_EQSTART) & M_FW_EQ_ETH_CMD_EQSTART) 4507 #define F_FW_EQ_ETH_CMD_EQSTART V_FW_EQ_ETH_CMD_EQSTART(1U) 4508 4509 #define S_FW_EQ_ETH_CMD_EQSTOP 27 4510 #define M_FW_EQ_ETH_CMD_EQSTOP 0x1 4511 #define V_FW_EQ_ETH_CMD_EQSTOP(x) ((x) << S_FW_EQ_ETH_CMD_EQSTOP) 4512 #define G_FW_EQ_ETH_CMD_EQSTOP(x) \ 4513 (((x) >> S_FW_EQ_ETH_CMD_EQSTOP) & M_FW_EQ_ETH_CMD_EQSTOP) 4514 #define F_FW_EQ_ETH_CMD_EQSTOP V_FW_EQ_ETH_CMD_EQSTOP(1U) 4515 4516 #define S_FW_EQ_ETH_CMD_EQID 0 4517 #define M_FW_EQ_ETH_CMD_EQID 0xfffff 4518 #define V_FW_EQ_ETH_CMD_EQID(x) ((x) << S_FW_EQ_ETH_CMD_EQID) 4519 #define G_FW_EQ_ETH_CMD_EQID(x) \ 4520 (((x) >> S_FW_EQ_ETH_CMD_EQID) & M_FW_EQ_ETH_CMD_EQID) 4521 4522 #define S_FW_EQ_ETH_CMD_PHYSEQID 0 4523 #define M_FW_EQ_ETH_CMD_PHYSEQID 0xfffff 4524 #define V_FW_EQ_ETH_CMD_PHYSEQID(x) ((x) << S_FW_EQ_ETH_CMD_PHYSEQID) 4525 #define G_FW_EQ_ETH_CMD_PHYSEQID(x) \ 4526 (((x) >> S_FW_EQ_ETH_CMD_PHYSEQID) & M_FW_EQ_ETH_CMD_PHYSEQID) 4527 4528 #define S_FW_EQ_ETH_CMD_FETCHSZM 26 4529 #define M_FW_EQ_ETH_CMD_FETCHSZM 0x1 4530 #define V_FW_EQ_ETH_CMD_FETCHSZM(x) ((x) << S_FW_EQ_ETH_CMD_FETCHSZM) 4531 #define G_FW_EQ_ETH_CMD_FETCHSZM(x) \ 4532 (((x) >> S_FW_EQ_ETH_CMD_FETCHSZM) & M_FW_EQ_ETH_CMD_FETCHSZM) 4533 #define F_FW_EQ_ETH_CMD_FETCHSZM V_FW_EQ_ETH_CMD_FETCHSZM(1U) 4534 4535 #define S_FW_EQ_ETH_CMD_STATUSPGNS 25 4536 #define M_FW_EQ_ETH_CMD_STATUSPGNS 0x1 4537 #define V_FW_EQ_ETH_CMD_STATUSPGNS(x) ((x) << S_FW_EQ_ETH_CMD_STATUSPGNS) 4538 #define G_FW_EQ_ETH_CMD_STATUSPGNS(x) \ 4539 (((x) >> S_FW_EQ_ETH_CMD_STATUSPGNS) & M_FW_EQ_ETH_CMD_STATUSPGNS) 4540 #define F_FW_EQ_ETH_CMD_STATUSPGNS V_FW_EQ_ETH_CMD_STATUSPGNS(1U) 4541 4542 #define S_FW_EQ_ETH_CMD_STATUSPGRO 24 4543 #define M_FW_EQ_ETH_CMD_STATUSPGRO 0x1 4544 #define V_FW_EQ_ETH_CMD_STATUSPGRO(x) ((x) << S_FW_EQ_ETH_CMD_STATUSPGRO) 4545 #define G_FW_EQ_ETH_CMD_STATUSPGRO(x) \ 4546 (((x) >> S_FW_EQ_ETH_CMD_STATUSPGRO) & M_FW_EQ_ETH_CMD_STATUSPGRO) 4547 #define F_FW_EQ_ETH_CMD_STATUSPGRO V_FW_EQ_ETH_CMD_STATUSPGRO(1U) 4548 4549 #define S_FW_EQ_ETH_CMD_FETCHNS 23 4550 #define M_FW_EQ_ETH_CMD_FETCHNS 0x1 4551 #define V_FW_EQ_ETH_CMD_FETCHNS(x) ((x) << S_FW_EQ_ETH_CMD_FETCHNS) 4552 #define G_FW_EQ_ETH_CMD_FETCHNS(x) \ 4553 (((x) >> S_FW_EQ_ETH_CMD_FETCHNS) & M_FW_EQ_ETH_CMD_FETCHNS) 4554 #define F_FW_EQ_ETH_CMD_FETCHNS V_FW_EQ_ETH_CMD_FETCHNS(1U) 4555 4556 #define S_FW_EQ_ETH_CMD_FETCHRO 22 4557 #define M_FW_EQ_ETH_CMD_FETCHRO 0x1 4558 #define V_FW_EQ_ETH_CMD_FETCHRO(x) ((x) << S_FW_EQ_ETH_CMD_FETCHRO) 4559 #define G_FW_EQ_ETH_CMD_FETCHRO(x) \ 4560 (((x) >> S_FW_EQ_ETH_CMD_FETCHRO) & M_FW_EQ_ETH_CMD_FETCHRO) 4561 #define F_FW_EQ_ETH_CMD_FETCHRO V_FW_EQ_ETH_CMD_FETCHRO(1U) 4562 4563 #define S_FW_EQ_ETH_CMD_HOSTFCMODE 20 4564 #define M_FW_EQ_ETH_CMD_HOSTFCMODE 0x3 4565 #define V_FW_EQ_ETH_CMD_HOSTFCMODE(x) ((x) << S_FW_EQ_ETH_CMD_HOSTFCMODE) 4566 #define G_FW_EQ_ETH_CMD_HOSTFCMODE(x) \ 4567 (((x) >> S_FW_EQ_ETH_CMD_HOSTFCMODE) & M_FW_EQ_ETH_CMD_HOSTFCMODE) 4568 4569 #define S_FW_EQ_ETH_CMD_CPRIO 19 4570 #define M_FW_EQ_ETH_CMD_CPRIO 0x1 4571 #define V_FW_EQ_ETH_CMD_CPRIO(x) ((x) << S_FW_EQ_ETH_CMD_CPRIO) 4572 #define G_FW_EQ_ETH_CMD_CPRIO(x) \ 4573 (((x) >> S_FW_EQ_ETH_CMD_CPRIO) & M_FW_EQ_ETH_CMD_CPRIO) 4574 #define F_FW_EQ_ETH_CMD_CPRIO V_FW_EQ_ETH_CMD_CPRIO(1U) 4575 4576 #define S_FW_EQ_ETH_CMD_ONCHIP 18 4577 #define M_FW_EQ_ETH_CMD_ONCHIP 0x1 4578 #define V_FW_EQ_ETH_CMD_ONCHIP(x) ((x) << S_FW_EQ_ETH_CMD_ONCHIP) 4579 #define G_FW_EQ_ETH_CMD_ONCHIP(x) \ 4580 (((x) >> S_FW_EQ_ETH_CMD_ONCHIP) & M_FW_EQ_ETH_CMD_ONCHIP) 4581 #define F_FW_EQ_ETH_CMD_ONCHIP V_FW_EQ_ETH_CMD_ONCHIP(1U) 4582 4583 #define S_FW_EQ_ETH_CMD_PCIECHN 16 4584 #define M_FW_EQ_ETH_CMD_PCIECHN 0x3 4585 #define V_FW_EQ_ETH_CMD_PCIECHN(x) ((x) << S_FW_EQ_ETH_CMD_PCIECHN) 4586 #define G_FW_EQ_ETH_CMD_PCIECHN(x) \ 4587 (((x) >> S_FW_EQ_ETH_CMD_PCIECHN) & M_FW_EQ_ETH_CMD_PCIECHN) 4588 4589 #define S_FW_EQ_ETH_CMD_IQID 0 4590 #define M_FW_EQ_ETH_CMD_IQID 0xffff 4591 #define V_FW_EQ_ETH_CMD_IQID(x) ((x) << S_FW_EQ_ETH_CMD_IQID) 4592 #define G_FW_EQ_ETH_CMD_IQID(x) \ 4593 (((x) >> S_FW_EQ_ETH_CMD_IQID) & M_FW_EQ_ETH_CMD_IQID) 4594 4595 #define S_FW_EQ_ETH_CMD_DCAEN 31 4596 #define M_FW_EQ_ETH_CMD_DCAEN 0x1 4597 #define V_FW_EQ_ETH_CMD_DCAEN(x) ((x) << S_FW_EQ_ETH_CMD_DCAEN) 4598 #define G_FW_EQ_ETH_CMD_DCAEN(x) \ 4599 (((x) >> S_FW_EQ_ETH_CMD_DCAEN) & M_FW_EQ_ETH_CMD_DCAEN) 4600 #define F_FW_EQ_ETH_CMD_DCAEN V_FW_EQ_ETH_CMD_DCAEN(1U) 4601 4602 #define S_FW_EQ_ETH_CMD_DCACPU 26 4603 #define M_FW_EQ_ETH_CMD_DCACPU 0x1f 4604 #define V_FW_EQ_ETH_CMD_DCACPU(x) ((x) << S_FW_EQ_ETH_CMD_DCACPU) 4605 #define G_FW_EQ_ETH_CMD_DCACPU(x) \ 4606 (((x) >> S_FW_EQ_ETH_CMD_DCACPU) & M_FW_EQ_ETH_CMD_DCACPU) 4607 4608 #define S_FW_EQ_ETH_CMD_FBMIN 23 4609 #define M_FW_EQ_ETH_CMD_FBMIN 0x7 4610 #define V_FW_EQ_ETH_CMD_FBMIN(x) ((x) << S_FW_EQ_ETH_CMD_FBMIN) 4611 #define G_FW_EQ_ETH_CMD_FBMIN(x) \ 4612 (((x) >> S_FW_EQ_ETH_CMD_FBMIN) & M_FW_EQ_ETH_CMD_FBMIN) 4613 4614 #define S_FW_EQ_ETH_CMD_FBMAX 20 4615 #define M_FW_EQ_ETH_CMD_FBMAX 0x7 4616 #define V_FW_EQ_ETH_CMD_FBMAX(x) ((x) << S_FW_EQ_ETH_CMD_FBMAX) 4617 #define G_FW_EQ_ETH_CMD_FBMAX(x) \ 4618 (((x) >> S_FW_EQ_ETH_CMD_FBMAX) & M_FW_EQ_ETH_CMD_FBMAX) 4619 4620 #define S_FW_EQ_ETH_CMD_CIDXFTHRESHO 19 4621 #define M_FW_EQ_ETH_CMD_CIDXFTHRESHO 0x1 4622 #define V_FW_EQ_ETH_CMD_CIDXFTHRESHO(x) ((x) << S_FW_EQ_ETH_CMD_CIDXFTHRESHO) 4623 #define G_FW_EQ_ETH_CMD_CIDXFTHRESHO(x) \ 4624 (((x) >> S_FW_EQ_ETH_CMD_CIDXFTHRESHO) & M_FW_EQ_ETH_CMD_CIDXFTHRESHO) 4625 #define F_FW_EQ_ETH_CMD_CIDXFTHRESHO V_FW_EQ_ETH_CMD_CIDXFTHRESHO(1U) 4626 4627 #define S_FW_EQ_ETH_CMD_CIDXFTHRESH 16 4628 #define M_FW_EQ_ETH_CMD_CIDXFTHRESH 0x7 4629 #define V_FW_EQ_ETH_CMD_CIDXFTHRESH(x) ((x) << S_FW_EQ_ETH_CMD_CIDXFTHRESH) 4630 #define G_FW_EQ_ETH_CMD_CIDXFTHRESH(x) \ 4631 (((x) >> S_FW_EQ_ETH_CMD_CIDXFTHRESH) & M_FW_EQ_ETH_CMD_CIDXFTHRESH) 4632 4633 #define S_FW_EQ_ETH_CMD_EQSIZE 0 4634 #define M_FW_EQ_ETH_CMD_EQSIZE 0xffff 4635 #define V_FW_EQ_ETH_CMD_EQSIZE(x) ((x) << S_FW_EQ_ETH_CMD_EQSIZE) 4636 #define G_FW_EQ_ETH_CMD_EQSIZE(x) \ 4637 (((x) >> S_FW_EQ_ETH_CMD_EQSIZE) & M_FW_EQ_ETH_CMD_EQSIZE) 4638 4639 #define S_FW_EQ_ETH_CMD_VIID 16 4640 #define M_FW_EQ_ETH_CMD_VIID 0xfff 4641 #define V_FW_EQ_ETH_CMD_VIID(x) ((x) << S_FW_EQ_ETH_CMD_VIID) 4642 #define G_FW_EQ_ETH_CMD_VIID(x) \ 4643 (((x) >> S_FW_EQ_ETH_CMD_VIID) & M_FW_EQ_ETH_CMD_VIID) 4644 4645 struct fw_eq_ctrl_cmd { 4646 __be32 op_to_vfn; 4647 __be32 alloc_to_len16; 4648 __be32 cmpliqid_eqid; 4649 __be32 physeqid_pkd; 4650 __be32 fetchszm_to_iqid; 4651 __be32 dcaen_to_eqsize; 4652 __be64 eqaddr; 4653 }; 4654 4655 #define S_FW_EQ_CTRL_CMD_PFN 8 4656 #define M_FW_EQ_CTRL_CMD_PFN 0x7 4657 #define V_FW_EQ_CTRL_CMD_PFN(x) ((x) << S_FW_EQ_CTRL_CMD_PFN) 4658 #define G_FW_EQ_CTRL_CMD_PFN(x) \ 4659 (((x) >> S_FW_EQ_CTRL_CMD_PFN) & M_FW_EQ_CTRL_CMD_PFN) 4660 4661 #define S_FW_EQ_CTRL_CMD_VFN 0 4662 #define M_FW_EQ_CTRL_CMD_VFN 0xff 4663 #define V_FW_EQ_CTRL_CMD_VFN(x) ((x) << S_FW_EQ_CTRL_CMD_VFN) 4664 #define G_FW_EQ_CTRL_CMD_VFN(x) \ 4665 (((x) >> S_FW_EQ_CTRL_CMD_VFN) & M_FW_EQ_CTRL_CMD_VFN) 4666 4667 #define S_FW_EQ_CTRL_CMD_ALLOC 31 4668 #define M_FW_EQ_CTRL_CMD_ALLOC 0x1 4669 #define V_FW_EQ_CTRL_CMD_ALLOC(x) ((x) << S_FW_EQ_CTRL_CMD_ALLOC) 4670 #define G_FW_EQ_CTRL_CMD_ALLOC(x) \ 4671 (((x) >> S_FW_EQ_CTRL_CMD_ALLOC) & M_FW_EQ_CTRL_CMD_ALLOC) 4672 #define F_FW_EQ_CTRL_CMD_ALLOC V_FW_EQ_CTRL_CMD_ALLOC(1U) 4673 4674 #define S_FW_EQ_CTRL_CMD_FREE 30 4675 #define M_FW_EQ_CTRL_CMD_FREE 0x1 4676 #define V_FW_EQ_CTRL_CMD_FREE(x) ((x) << S_FW_EQ_CTRL_CMD_FREE) 4677 #define G_FW_EQ_CTRL_CMD_FREE(x) \ 4678 (((x) >> S_FW_EQ_CTRL_CMD_FREE) & M_FW_EQ_CTRL_CMD_FREE) 4679 #define F_FW_EQ_CTRL_CMD_FREE V_FW_EQ_CTRL_CMD_FREE(1U) 4680 4681 #define S_FW_EQ_CTRL_CMD_MODIFY 29 4682 #define M_FW_EQ_CTRL_CMD_MODIFY 0x1 4683 #define V_FW_EQ_CTRL_CMD_MODIFY(x) ((x) << S_FW_EQ_CTRL_CMD_MODIFY) 4684 #define G_FW_EQ_CTRL_CMD_MODIFY(x) \ 4685 (((x) >> S_FW_EQ_CTRL_CMD_MODIFY) & M_FW_EQ_CTRL_CMD_MODIFY) 4686 #define F_FW_EQ_CTRL_CMD_MODIFY V_FW_EQ_CTRL_CMD_MODIFY(1U) 4687 4688 #define S_FW_EQ_CTRL_CMD_EQSTART 28 4689 #define M_FW_EQ_CTRL_CMD_EQSTART 0x1 4690 #define V_FW_EQ_CTRL_CMD_EQSTART(x) ((x) << S_FW_EQ_CTRL_CMD_EQSTART) 4691 #define G_FW_EQ_CTRL_CMD_EQSTART(x) \ 4692 (((x) >> S_FW_EQ_CTRL_CMD_EQSTART) & M_FW_EQ_CTRL_CMD_EQSTART) 4693 #define F_FW_EQ_CTRL_CMD_EQSTART V_FW_EQ_CTRL_CMD_EQSTART(1U) 4694 4695 #define S_FW_EQ_CTRL_CMD_EQSTOP 27 4696 #define M_FW_EQ_CTRL_CMD_EQSTOP 0x1 4697 #define V_FW_EQ_CTRL_CMD_EQSTOP(x) ((x) << S_FW_EQ_CTRL_CMD_EQSTOP) 4698 #define G_FW_EQ_CTRL_CMD_EQSTOP(x) \ 4699 (((x) >> S_FW_EQ_CTRL_CMD_EQSTOP) & M_FW_EQ_CTRL_CMD_EQSTOP) 4700 #define F_FW_EQ_CTRL_CMD_EQSTOP V_FW_EQ_CTRL_CMD_EQSTOP(1U) 4701 4702 #define S_FW_EQ_CTRL_CMD_CMPLIQID 20 4703 #define M_FW_EQ_CTRL_CMD_CMPLIQID 0xfff 4704 #define V_FW_EQ_CTRL_CMD_CMPLIQID(x) ((x) << S_FW_EQ_CTRL_CMD_CMPLIQID) 4705 #define G_FW_EQ_CTRL_CMD_CMPLIQID(x) \ 4706 (((x) >> S_FW_EQ_CTRL_CMD_CMPLIQID) & M_FW_EQ_CTRL_CMD_CMPLIQID) 4707 4708 #define S_FW_EQ_CTRL_CMD_EQID 0 4709 #define M_FW_EQ_CTRL_CMD_EQID 0xfffff 4710 #define V_FW_EQ_CTRL_CMD_EQID(x) ((x) << S_FW_EQ_CTRL_CMD_EQID) 4711 #define G_FW_EQ_CTRL_CMD_EQID(x) \ 4712 (((x) >> S_FW_EQ_CTRL_CMD_EQID) & M_FW_EQ_CTRL_CMD_EQID) 4713 4714 #define S_FW_EQ_CTRL_CMD_PHYSEQID 0 4715 #define M_FW_EQ_CTRL_CMD_PHYSEQID 0xfffff 4716 #define V_FW_EQ_CTRL_CMD_PHYSEQID(x) ((x) << S_FW_EQ_CTRL_CMD_PHYSEQID) 4717 #define G_FW_EQ_CTRL_CMD_PHYSEQID(x) \ 4718 (((x) >> S_FW_EQ_CTRL_CMD_PHYSEQID) & M_FW_EQ_CTRL_CMD_PHYSEQID) 4719 4720 #define S_FW_EQ_CTRL_CMD_FETCHSZM 26 4721 #define M_FW_EQ_CTRL_CMD_FETCHSZM 0x1 4722 #define V_FW_EQ_CTRL_CMD_FETCHSZM(x) ((x) << S_FW_EQ_CTRL_CMD_FETCHSZM) 4723 #define G_FW_EQ_CTRL_CMD_FETCHSZM(x) \ 4724 (((x) >> S_FW_EQ_CTRL_CMD_FETCHSZM) & M_FW_EQ_CTRL_CMD_FETCHSZM) 4725 #define F_FW_EQ_CTRL_CMD_FETCHSZM V_FW_EQ_CTRL_CMD_FETCHSZM(1U) 4726 4727 #define S_FW_EQ_CTRL_CMD_STATUSPGNS 25 4728 #define M_FW_EQ_CTRL_CMD_STATUSPGNS 0x1 4729 #define V_FW_EQ_CTRL_CMD_STATUSPGNS(x) ((x) << S_FW_EQ_CTRL_CMD_STATUSPGNS) 4730 #define G_FW_EQ_CTRL_CMD_STATUSPGNS(x) \ 4731 (((x) >> S_FW_EQ_CTRL_CMD_STATUSPGNS) & M_FW_EQ_CTRL_CMD_STATUSPGNS) 4732 #define F_FW_EQ_CTRL_CMD_STATUSPGNS V_FW_EQ_CTRL_CMD_STATUSPGNS(1U) 4733 4734 #define S_FW_EQ_CTRL_CMD_STATUSPGRO 24 4735 #define M_FW_EQ_CTRL_CMD_STATUSPGRO 0x1 4736 #define V_FW_EQ_CTRL_CMD_STATUSPGRO(x) ((x) << S_FW_EQ_CTRL_CMD_STATUSPGRO) 4737 #define G_FW_EQ_CTRL_CMD_STATUSPGRO(x) \ 4738 (((x) >> S_FW_EQ_CTRL_CMD_STATUSPGRO) & M_FW_EQ_CTRL_CMD_STATUSPGRO) 4739 #define F_FW_EQ_CTRL_CMD_STATUSPGRO V_FW_EQ_CTRL_CMD_STATUSPGRO(1U) 4740 4741 #define S_FW_EQ_CTRL_CMD_FETCHNS 23 4742 #define M_FW_EQ_CTRL_CMD_FETCHNS 0x1 4743 #define V_FW_EQ_CTRL_CMD_FETCHNS(x) ((x) << S_FW_EQ_CTRL_CMD_FETCHNS) 4744 #define G_FW_EQ_CTRL_CMD_FETCHNS(x) \ 4745 (((x) >> S_FW_EQ_CTRL_CMD_FETCHNS) & M_FW_EQ_CTRL_CMD_FETCHNS) 4746 #define F_FW_EQ_CTRL_CMD_FETCHNS V_FW_EQ_CTRL_CMD_FETCHNS(1U) 4747 4748 #define S_FW_EQ_CTRL_CMD_FETCHRO 22 4749 #define M_FW_EQ_CTRL_CMD_FETCHRO 0x1 4750 #define V_FW_EQ_CTRL_CMD_FETCHRO(x) ((x) << S_FW_EQ_CTRL_CMD_FETCHRO) 4751 #define G_FW_EQ_CTRL_CMD_FETCHRO(x) \ 4752 (((x) >> S_FW_EQ_CTRL_CMD_FETCHRO) & M_FW_EQ_CTRL_CMD_FETCHRO) 4753 #define F_FW_EQ_CTRL_CMD_FETCHRO V_FW_EQ_CTRL_CMD_FETCHRO(1U) 4754 4755 #define S_FW_EQ_CTRL_CMD_HOSTFCMODE 20 4756 #define M_FW_EQ_CTRL_CMD_HOSTFCMODE 0x3 4757 #define V_FW_EQ_CTRL_CMD_HOSTFCMODE(x) ((x) << S_FW_EQ_CTRL_CMD_HOSTFCMODE) 4758 #define G_FW_EQ_CTRL_CMD_HOSTFCMODE(x) \ 4759 (((x) >> S_FW_EQ_CTRL_CMD_HOSTFCMODE) & M_FW_EQ_CTRL_CMD_HOSTFCMODE) 4760 4761 #define S_FW_EQ_CTRL_CMD_CPRIO 19 4762 #define M_FW_EQ_CTRL_CMD_CPRIO 0x1 4763 #define V_FW_EQ_CTRL_CMD_CPRIO(x) ((x) << S_FW_EQ_CTRL_CMD_CPRIO) 4764 #define G_FW_EQ_CTRL_CMD_CPRIO(x) \ 4765 (((x) >> S_FW_EQ_CTRL_CMD_CPRIO) & M_FW_EQ_CTRL_CMD_CPRIO) 4766 #define F_FW_EQ_CTRL_CMD_CPRIO V_FW_EQ_CTRL_CMD_CPRIO(1U) 4767 4768 #define S_FW_EQ_CTRL_CMD_ONCHIP 18 4769 #define M_FW_EQ_CTRL_CMD_ONCHIP 0x1 4770 #define V_FW_EQ_CTRL_CMD_ONCHIP(x) ((x) << S_FW_EQ_CTRL_CMD_ONCHIP) 4771 #define G_FW_EQ_CTRL_CMD_ONCHIP(x) \ 4772 (((x) >> S_FW_EQ_CTRL_CMD_ONCHIP) & M_FW_EQ_CTRL_CMD_ONCHIP) 4773 #define F_FW_EQ_CTRL_CMD_ONCHIP V_FW_EQ_CTRL_CMD_ONCHIP(1U) 4774 4775 #define S_FW_EQ_CTRL_CMD_PCIECHN 16 4776 #define M_FW_EQ_CTRL_CMD_PCIECHN 0x3 4777 #define V_FW_EQ_CTRL_CMD_PCIECHN(x) ((x) << S_FW_EQ_CTRL_CMD_PCIECHN) 4778 #define G_FW_EQ_CTRL_CMD_PCIECHN(x) \ 4779 (((x) >> S_FW_EQ_CTRL_CMD_PCIECHN) & M_FW_EQ_CTRL_CMD_PCIECHN) 4780 4781 #define S_FW_EQ_CTRL_CMD_IQID 0 4782 #define M_FW_EQ_CTRL_CMD_IQID 0xffff 4783 #define V_FW_EQ_CTRL_CMD_IQID(x) ((x) << S_FW_EQ_CTRL_CMD_IQID) 4784 #define G_FW_EQ_CTRL_CMD_IQID(x) \ 4785 (((x) >> S_FW_EQ_CTRL_CMD_IQID) & M_FW_EQ_CTRL_CMD_IQID) 4786 4787 #define S_FW_EQ_CTRL_CMD_DCAEN 31 4788 #define M_FW_EQ_CTRL_CMD_DCAEN 0x1 4789 #define V_FW_EQ_CTRL_CMD_DCAEN(x) ((x) << S_FW_EQ_CTRL_CMD_DCAEN) 4790 #define G_FW_EQ_CTRL_CMD_DCAEN(x) \ 4791 (((x) >> S_FW_EQ_CTRL_CMD_DCAEN) & M_FW_EQ_CTRL_CMD_DCAEN) 4792 #define F_FW_EQ_CTRL_CMD_DCAEN V_FW_EQ_CTRL_CMD_DCAEN(1U) 4793 4794 #define S_FW_EQ_CTRL_CMD_DCACPU 26 4795 #define M_FW_EQ_CTRL_CMD_DCACPU 0x1f 4796 #define V_FW_EQ_CTRL_CMD_DCACPU(x) ((x) << S_FW_EQ_CTRL_CMD_DCACPU) 4797 #define G_FW_EQ_CTRL_CMD_DCACPU(x) \ 4798 (((x) >> S_FW_EQ_CTRL_CMD_DCACPU) & M_FW_EQ_CTRL_CMD_DCACPU) 4799 4800 #define S_FW_EQ_CTRL_CMD_FBMIN 23 4801 #define M_FW_EQ_CTRL_CMD_FBMIN 0x7 4802 #define V_FW_EQ_CTRL_CMD_FBMIN(x) ((x) << S_FW_EQ_CTRL_CMD_FBMIN) 4803 #define G_FW_EQ_CTRL_CMD_FBMIN(x) \ 4804 (((x) >> S_FW_EQ_CTRL_CMD_FBMIN) & M_FW_EQ_CTRL_CMD_FBMIN) 4805 4806 #define S_FW_EQ_CTRL_CMD_FBMAX 20 4807 #define M_FW_EQ_CTRL_CMD_FBMAX 0x7 4808 #define V_FW_EQ_CTRL_CMD_FBMAX(x) ((x) << S_FW_EQ_CTRL_CMD_FBMAX) 4809 #define G_FW_EQ_CTRL_CMD_FBMAX(x) \ 4810 (((x) >> S_FW_EQ_CTRL_CMD_FBMAX) & M_FW_EQ_CTRL_CMD_FBMAX) 4811 4812 #define S_FW_EQ_CTRL_CMD_CIDXFTHRESHO 19 4813 #define M_FW_EQ_CTRL_CMD_CIDXFTHRESHO 0x1 4814 #define V_FW_EQ_CTRL_CMD_CIDXFTHRESHO(x) \ 4815 ((x) << S_FW_EQ_CTRL_CMD_CIDXFTHRESHO) 4816 #define G_FW_EQ_CTRL_CMD_CIDXFTHRESHO(x) \ 4817 (((x) >> S_FW_EQ_CTRL_CMD_CIDXFTHRESHO) & M_FW_EQ_CTRL_CMD_CIDXFTHRESHO) 4818 #define F_FW_EQ_CTRL_CMD_CIDXFTHRESHO V_FW_EQ_CTRL_CMD_CIDXFTHRESHO(1U) 4819 4820 #define S_FW_EQ_CTRL_CMD_CIDXFTHRESH 16 4821 #define M_FW_EQ_CTRL_CMD_CIDXFTHRESH 0x7 4822 #define V_FW_EQ_CTRL_CMD_CIDXFTHRESH(x) ((x) << S_FW_EQ_CTRL_CMD_CIDXFTHRESH) 4823 #define G_FW_EQ_CTRL_CMD_CIDXFTHRESH(x) \ 4824 (((x) >> S_FW_EQ_CTRL_CMD_CIDXFTHRESH) & M_FW_EQ_CTRL_CMD_CIDXFTHRESH) 4825 4826 #define S_FW_EQ_CTRL_CMD_EQSIZE 0 4827 #define M_FW_EQ_CTRL_CMD_EQSIZE 0xffff 4828 #define V_FW_EQ_CTRL_CMD_EQSIZE(x) ((x) << S_FW_EQ_CTRL_CMD_EQSIZE) 4829 #define G_FW_EQ_CTRL_CMD_EQSIZE(x) \ 4830 (((x) >> S_FW_EQ_CTRL_CMD_EQSIZE) & M_FW_EQ_CTRL_CMD_EQSIZE) 4831 4832 struct fw_eq_ofld_cmd { 4833 __be32 op_to_vfn; 4834 __be32 alloc_to_len16; 4835 __be32 eqid_pkd; 4836 __be32 physeqid_pkd; 4837 __be32 fetchszm_to_iqid; 4838 __be32 dcaen_to_eqsize; 4839 __be64 eqaddr; 4840 }; 4841 4842 #define S_FW_EQ_OFLD_CMD_PFN 8 4843 #define M_FW_EQ_OFLD_CMD_PFN 0x7 4844 #define V_FW_EQ_OFLD_CMD_PFN(x) ((x) << S_FW_EQ_OFLD_CMD_PFN) 4845 #define G_FW_EQ_OFLD_CMD_PFN(x) \ 4846 (((x) >> S_FW_EQ_OFLD_CMD_PFN) & M_FW_EQ_OFLD_CMD_PFN) 4847 4848 #define S_FW_EQ_OFLD_CMD_VFN 0 4849 #define M_FW_EQ_OFLD_CMD_VFN 0xff 4850 #define V_FW_EQ_OFLD_CMD_VFN(x) ((x) << S_FW_EQ_OFLD_CMD_VFN) 4851 #define G_FW_EQ_OFLD_CMD_VFN(x) \ 4852 (((x) >> S_FW_EQ_OFLD_CMD_VFN) & M_FW_EQ_OFLD_CMD_VFN) 4853 4854 #define S_FW_EQ_OFLD_CMD_ALLOC 31 4855 #define M_FW_EQ_OFLD_CMD_ALLOC 0x1 4856 #define V_FW_EQ_OFLD_CMD_ALLOC(x) ((x) << S_FW_EQ_OFLD_CMD_ALLOC) 4857 #define G_FW_EQ_OFLD_CMD_ALLOC(x) \ 4858 (((x) >> S_FW_EQ_OFLD_CMD_ALLOC) & M_FW_EQ_OFLD_CMD_ALLOC) 4859 #define F_FW_EQ_OFLD_CMD_ALLOC V_FW_EQ_OFLD_CMD_ALLOC(1U) 4860 4861 #define S_FW_EQ_OFLD_CMD_FREE 30 4862 #define M_FW_EQ_OFLD_CMD_FREE 0x1 4863 #define V_FW_EQ_OFLD_CMD_FREE(x) ((x) << S_FW_EQ_OFLD_CMD_FREE) 4864 #define G_FW_EQ_OFLD_CMD_FREE(x) \ 4865 (((x) >> S_FW_EQ_OFLD_CMD_FREE) & M_FW_EQ_OFLD_CMD_FREE) 4866 #define F_FW_EQ_OFLD_CMD_FREE V_FW_EQ_OFLD_CMD_FREE(1U) 4867 4868 #define S_FW_EQ_OFLD_CMD_MODIFY 29 4869 #define M_FW_EQ_OFLD_CMD_MODIFY 0x1 4870 #define V_FW_EQ_OFLD_CMD_MODIFY(x) ((x) << S_FW_EQ_OFLD_CMD_MODIFY) 4871 #define G_FW_EQ_OFLD_CMD_MODIFY(x) \ 4872 (((x) >> S_FW_EQ_OFLD_CMD_MODIFY) & M_FW_EQ_OFLD_CMD_MODIFY) 4873 #define F_FW_EQ_OFLD_CMD_MODIFY V_FW_EQ_OFLD_CMD_MODIFY(1U) 4874 4875 #define S_FW_EQ_OFLD_CMD_EQSTART 28 4876 #define M_FW_EQ_OFLD_CMD_EQSTART 0x1 4877 #define V_FW_EQ_OFLD_CMD_EQSTART(x) ((x) << S_FW_EQ_OFLD_CMD_EQSTART) 4878 #define G_FW_EQ_OFLD_CMD_EQSTART(x) \ 4879 (((x) >> S_FW_EQ_OFLD_CMD_EQSTART) & M_FW_EQ_OFLD_CMD_EQSTART) 4880 #define F_FW_EQ_OFLD_CMD_EQSTART V_FW_EQ_OFLD_CMD_EQSTART(1U) 4881 4882 #define S_FW_EQ_OFLD_CMD_EQSTOP 27 4883 #define M_FW_EQ_OFLD_CMD_EQSTOP 0x1 4884 #define V_FW_EQ_OFLD_CMD_EQSTOP(x) ((x) << S_FW_EQ_OFLD_CMD_EQSTOP) 4885 #define G_FW_EQ_OFLD_CMD_EQSTOP(x) \ 4886 (((x) >> S_FW_EQ_OFLD_CMD_EQSTOP) & M_FW_EQ_OFLD_CMD_EQSTOP) 4887 #define F_FW_EQ_OFLD_CMD_EQSTOP V_FW_EQ_OFLD_CMD_EQSTOP(1U) 4888 4889 #define S_FW_EQ_OFLD_CMD_EQID 0 4890 #define M_FW_EQ_OFLD_CMD_EQID 0xfffff 4891 #define V_FW_EQ_OFLD_CMD_EQID(x) ((x) << S_FW_EQ_OFLD_CMD_EQID) 4892 #define G_FW_EQ_OFLD_CMD_EQID(x) \ 4893 (((x) >> S_FW_EQ_OFLD_CMD_EQID) & M_FW_EQ_OFLD_CMD_EQID) 4894 4895 #define S_FW_EQ_OFLD_CMD_PHYSEQID 0 4896 #define M_FW_EQ_OFLD_CMD_PHYSEQID 0xfffff 4897 #define V_FW_EQ_OFLD_CMD_PHYSEQID(x) ((x) << S_FW_EQ_OFLD_CMD_PHYSEQID) 4898 #define G_FW_EQ_OFLD_CMD_PHYSEQID(x) \ 4899 (((x) >> S_FW_EQ_OFLD_CMD_PHYSEQID) & M_FW_EQ_OFLD_CMD_PHYSEQID) 4900 4901 #define S_FW_EQ_OFLD_CMD_FETCHSZM 26 4902 #define M_FW_EQ_OFLD_CMD_FETCHSZM 0x1 4903 #define V_FW_EQ_OFLD_CMD_FETCHSZM(x) ((x) << S_FW_EQ_OFLD_CMD_FETCHSZM) 4904 #define G_FW_EQ_OFLD_CMD_FETCHSZM(x) \ 4905 (((x) >> S_FW_EQ_OFLD_CMD_FETCHSZM) & M_FW_EQ_OFLD_CMD_FETCHSZM) 4906 #define F_FW_EQ_OFLD_CMD_FETCHSZM V_FW_EQ_OFLD_CMD_FETCHSZM(1U) 4907 4908 #define S_FW_EQ_OFLD_CMD_STATUSPGNS 25 4909 #define M_FW_EQ_OFLD_CMD_STATUSPGNS 0x1 4910 #define V_FW_EQ_OFLD_CMD_STATUSPGNS(x) ((x) << S_FW_EQ_OFLD_CMD_STATUSPGNS) 4911 #define G_FW_EQ_OFLD_CMD_STATUSPGNS(x) \ 4912 (((x) >> S_FW_EQ_OFLD_CMD_STATUSPGNS) & M_FW_EQ_OFLD_CMD_STATUSPGNS) 4913 #define F_FW_EQ_OFLD_CMD_STATUSPGNS V_FW_EQ_OFLD_CMD_STATUSPGNS(1U) 4914 4915 #define S_FW_EQ_OFLD_CMD_STATUSPGRO 24 4916 #define M_FW_EQ_OFLD_CMD_STATUSPGRO 0x1 4917 #define V_FW_EQ_OFLD_CMD_STATUSPGRO(x) ((x) << S_FW_EQ_OFLD_CMD_STATUSPGRO) 4918 #define G_FW_EQ_OFLD_CMD_STATUSPGRO(x) \ 4919 (((x) >> S_FW_EQ_OFLD_CMD_STATUSPGRO) & M_FW_EQ_OFLD_CMD_STATUSPGRO) 4920 #define F_FW_EQ_OFLD_CMD_STATUSPGRO V_FW_EQ_OFLD_CMD_STATUSPGRO(1U) 4921 4922 #define S_FW_EQ_OFLD_CMD_FETCHNS 23 4923 #define M_FW_EQ_OFLD_CMD_FETCHNS 0x1 4924 #define V_FW_EQ_OFLD_CMD_FETCHNS(x) ((x) << S_FW_EQ_OFLD_CMD_FETCHNS) 4925 #define G_FW_EQ_OFLD_CMD_FETCHNS(x) \ 4926 (((x) >> S_FW_EQ_OFLD_CMD_FETCHNS) & M_FW_EQ_OFLD_CMD_FETCHNS) 4927 #define F_FW_EQ_OFLD_CMD_FETCHNS V_FW_EQ_OFLD_CMD_FETCHNS(1U) 4928 4929 #define S_FW_EQ_OFLD_CMD_FETCHRO 22 4930 #define M_FW_EQ_OFLD_CMD_FETCHRO 0x1 4931 #define V_FW_EQ_OFLD_CMD_FETCHRO(x) ((x) << S_FW_EQ_OFLD_CMD_FETCHRO) 4932 #define G_FW_EQ_OFLD_CMD_FETCHRO(x) \ 4933 (((x) >> S_FW_EQ_OFLD_CMD_FETCHRO) & M_FW_EQ_OFLD_CMD_FETCHRO) 4934 #define F_FW_EQ_OFLD_CMD_FETCHRO V_FW_EQ_OFLD_CMD_FETCHRO(1U) 4935 4936 #define S_FW_EQ_OFLD_CMD_HOSTFCMODE 20 4937 #define M_FW_EQ_OFLD_CMD_HOSTFCMODE 0x3 4938 #define V_FW_EQ_OFLD_CMD_HOSTFCMODE(x) ((x) << S_FW_EQ_OFLD_CMD_HOSTFCMODE) 4939 #define G_FW_EQ_OFLD_CMD_HOSTFCMODE(x) \ 4940 (((x) >> S_FW_EQ_OFLD_CMD_HOSTFCMODE) & M_FW_EQ_OFLD_CMD_HOSTFCMODE) 4941 4942 #define S_FW_EQ_OFLD_CMD_CPRIO 19 4943 #define M_FW_EQ_OFLD_CMD_CPRIO 0x1 4944 #define V_FW_EQ_OFLD_CMD_CPRIO(x) ((x) << S_FW_EQ_OFLD_CMD_CPRIO) 4945 #define G_FW_EQ_OFLD_CMD_CPRIO(x) \ 4946 (((x) >> S_FW_EQ_OFLD_CMD_CPRIO) & M_FW_EQ_OFLD_CMD_CPRIO) 4947 #define F_FW_EQ_OFLD_CMD_CPRIO V_FW_EQ_OFLD_CMD_CPRIO(1U) 4948 4949 #define S_FW_EQ_OFLD_CMD_ONCHIP 18 4950 #define M_FW_EQ_OFLD_CMD_ONCHIP 0x1 4951 #define V_FW_EQ_OFLD_CMD_ONCHIP(x) ((x) << S_FW_EQ_OFLD_CMD_ONCHIP) 4952 #define G_FW_EQ_OFLD_CMD_ONCHIP(x) \ 4953 (((x) >> S_FW_EQ_OFLD_CMD_ONCHIP) & M_FW_EQ_OFLD_CMD_ONCHIP) 4954 #define F_FW_EQ_OFLD_CMD_ONCHIP V_FW_EQ_OFLD_CMD_ONCHIP(1U) 4955 4956 #define S_FW_EQ_OFLD_CMD_PCIECHN 16 4957 #define M_FW_EQ_OFLD_CMD_PCIECHN 0x3 4958 #define V_FW_EQ_OFLD_CMD_PCIECHN(x) ((x) << S_FW_EQ_OFLD_CMD_PCIECHN) 4959 #define G_FW_EQ_OFLD_CMD_PCIECHN(x) \ 4960 (((x) >> S_FW_EQ_OFLD_CMD_PCIECHN) & M_FW_EQ_OFLD_CMD_PCIECHN) 4961 4962 #define S_FW_EQ_OFLD_CMD_IQID 0 4963 #define M_FW_EQ_OFLD_CMD_IQID 0xffff 4964 #define V_FW_EQ_OFLD_CMD_IQID(x) ((x) << S_FW_EQ_OFLD_CMD_IQID) 4965 #define G_FW_EQ_OFLD_CMD_IQID(x) \ 4966 (((x) >> S_FW_EQ_OFLD_CMD_IQID) & M_FW_EQ_OFLD_CMD_IQID) 4967 4968 #define S_FW_EQ_OFLD_CMD_DCAEN 31 4969 #define M_FW_EQ_OFLD_CMD_DCAEN 0x1 4970 #define V_FW_EQ_OFLD_CMD_DCAEN(x) ((x) << S_FW_EQ_OFLD_CMD_DCAEN) 4971 #define G_FW_EQ_OFLD_CMD_DCAEN(x) \ 4972 (((x) >> S_FW_EQ_OFLD_CMD_DCAEN) & M_FW_EQ_OFLD_CMD_DCAEN) 4973 #define F_FW_EQ_OFLD_CMD_DCAEN V_FW_EQ_OFLD_CMD_DCAEN(1U) 4974 4975 #define S_FW_EQ_OFLD_CMD_DCACPU 26 4976 #define M_FW_EQ_OFLD_CMD_DCACPU 0x1f 4977 #define V_FW_EQ_OFLD_CMD_DCACPU(x) ((x) << S_FW_EQ_OFLD_CMD_DCACPU) 4978 #define G_FW_EQ_OFLD_CMD_DCACPU(x) \ 4979 (((x) >> S_FW_EQ_OFLD_CMD_DCACPU) & M_FW_EQ_OFLD_CMD_DCACPU) 4980 4981 #define S_FW_EQ_OFLD_CMD_FBMIN 23 4982 #define M_FW_EQ_OFLD_CMD_FBMIN 0x7 4983 #define V_FW_EQ_OFLD_CMD_FBMIN(x) ((x) << S_FW_EQ_OFLD_CMD_FBMIN) 4984 #define G_FW_EQ_OFLD_CMD_FBMIN(x) \ 4985 (((x) >> S_FW_EQ_OFLD_CMD_FBMIN) & M_FW_EQ_OFLD_CMD_FBMIN) 4986 4987 #define S_FW_EQ_OFLD_CMD_FBMAX 20 4988 #define M_FW_EQ_OFLD_CMD_FBMAX 0x7 4989 #define V_FW_EQ_OFLD_CMD_FBMAX(x) ((x) << S_FW_EQ_OFLD_CMD_FBMAX) 4990 #define G_FW_EQ_OFLD_CMD_FBMAX(x) \ 4991 (((x) >> S_FW_EQ_OFLD_CMD_FBMAX) & M_FW_EQ_OFLD_CMD_FBMAX) 4992 4993 #define S_FW_EQ_OFLD_CMD_CIDXFTHRESHO 19 4994 #define M_FW_EQ_OFLD_CMD_CIDXFTHRESHO 0x1 4995 #define V_FW_EQ_OFLD_CMD_CIDXFTHRESHO(x) \ 4996 ((x) << S_FW_EQ_OFLD_CMD_CIDXFTHRESHO) 4997 #define G_FW_EQ_OFLD_CMD_CIDXFTHRESHO(x) \ 4998 (((x) >> S_FW_EQ_OFLD_CMD_CIDXFTHRESHO) & M_FW_EQ_OFLD_CMD_CIDXFTHRESHO) 4999 #define F_FW_EQ_OFLD_CMD_CIDXFTHRESHO V_FW_EQ_OFLD_CMD_CIDXFTHRESHO(1U) 5000 5001 #define S_FW_EQ_OFLD_CMD_CIDXFTHRESH 16 5002 #define M_FW_EQ_OFLD_CMD_CIDXFTHRESH 0x7 5003 #define V_FW_EQ_OFLD_CMD_CIDXFTHRESH(x) ((x) << S_FW_EQ_OFLD_CMD_CIDXFTHRESH) 5004 #define G_FW_EQ_OFLD_CMD_CIDXFTHRESH(x) \ 5005 (((x) >> S_FW_EQ_OFLD_CMD_CIDXFTHRESH) & M_FW_EQ_OFLD_CMD_CIDXFTHRESH) 5006 5007 #define S_FW_EQ_OFLD_CMD_EQSIZE 0 5008 #define M_FW_EQ_OFLD_CMD_EQSIZE 0xffff 5009 #define V_FW_EQ_OFLD_CMD_EQSIZE(x) ((x) << S_FW_EQ_OFLD_CMD_EQSIZE) 5010 #define G_FW_EQ_OFLD_CMD_EQSIZE(x) \ 5011 (((x) >> S_FW_EQ_OFLD_CMD_EQSIZE) & M_FW_EQ_OFLD_CMD_EQSIZE) 5012 5013 /* Macros for VIID parsing: 5014 VIID - [10:8] PFN, [7] VI Valid, [6:0] VI number */ 5015 #define S_FW_VIID_PFN 8 5016 #define M_FW_VIID_PFN 0x7 5017 #define V_FW_VIID_PFN(x) ((x) << S_FW_VIID_PFN) 5018 #define G_FW_VIID_PFN(x) (((x) >> S_FW_VIID_PFN) & M_FW_VIID_PFN) 5019 5020 #define S_FW_VIID_VIVLD 7 5021 #define M_FW_VIID_VIVLD 0x1 5022 #define V_FW_VIID_VIVLD(x) ((x) << S_FW_VIID_VIVLD) 5023 #define G_FW_VIID_VIVLD(x) (((x) >> S_FW_VIID_VIVLD) & M_FW_VIID_VIVLD) 5024 5025 #define S_FW_VIID_VIN 0 5026 #define M_FW_VIID_VIN 0x7F 5027 #define V_FW_VIID_VIN(x) ((x) << S_FW_VIID_VIN) 5028 #define G_FW_VIID_VIN(x) (((x) >> S_FW_VIID_VIN) & M_FW_VIID_VIN) 5029 5030 enum fw_vi_func { 5031 FW_VI_FUNC_ETH, 5032 FW_VI_FUNC_OFLD, 5033 FW_VI_FUNC_IWARP, 5034 FW_VI_FUNC_OPENISCSI, 5035 FW_VI_FUNC_OPENFCOE, 5036 FW_VI_FUNC_FOISCSI, 5037 FW_VI_FUNC_FOFCOE, 5038 FW_VI_FUNC_FW, 5039 }; 5040 5041 struct fw_vi_cmd { 5042 __be32 op_to_vfn; 5043 __be32 alloc_to_len16; 5044 __be16 type_to_viid; 5045 __u8 mac[6]; 5046 __u8 portid_pkd; 5047 __u8 nmac; 5048 __u8 nmac0[6]; 5049 __be16 norss_rsssize; 5050 __u8 nmac1[6]; 5051 __be16 idsiiq_pkd; 5052 __u8 nmac2[6]; 5053 __be16 idseiq_pkd; 5054 __u8 nmac3[6]; 5055 __be64 r9; 5056 __be64 r10; 5057 }; 5058 5059 #define S_FW_VI_CMD_PFN 8 5060 #define M_FW_VI_CMD_PFN 0x7 5061 #define V_FW_VI_CMD_PFN(x) ((x) << S_FW_VI_CMD_PFN) 5062 #define G_FW_VI_CMD_PFN(x) (((x) >> S_FW_VI_CMD_PFN) & M_FW_VI_CMD_PFN) 5063 5064 #define S_FW_VI_CMD_VFN 0 5065 #define M_FW_VI_CMD_VFN 0xff 5066 #define V_FW_VI_CMD_VFN(x) ((x) << S_FW_VI_CMD_VFN) 5067 #define G_FW_VI_CMD_VFN(x) (((x) >> S_FW_VI_CMD_VFN) & M_FW_VI_CMD_VFN) 5068 5069 #define S_FW_VI_CMD_ALLOC 31 5070 #define M_FW_VI_CMD_ALLOC 0x1 5071 #define V_FW_VI_CMD_ALLOC(x) ((x) << S_FW_VI_CMD_ALLOC) 5072 #define G_FW_VI_CMD_ALLOC(x) \ 5073 (((x) >> S_FW_VI_CMD_ALLOC) & M_FW_VI_CMD_ALLOC) 5074 #define F_FW_VI_CMD_ALLOC V_FW_VI_CMD_ALLOC(1U) 5075 5076 #define S_FW_VI_CMD_FREE 30 5077 #define M_FW_VI_CMD_FREE 0x1 5078 #define V_FW_VI_CMD_FREE(x) ((x) << S_FW_VI_CMD_FREE) 5079 #define G_FW_VI_CMD_FREE(x) (((x) >> S_FW_VI_CMD_FREE) & M_FW_VI_CMD_FREE) 5080 #define F_FW_VI_CMD_FREE V_FW_VI_CMD_FREE(1U) 5081 5082 #define S_FW_VI_CMD_TYPE 15 5083 #define M_FW_VI_CMD_TYPE 0x1 5084 #define V_FW_VI_CMD_TYPE(x) ((x) << S_FW_VI_CMD_TYPE) 5085 #define G_FW_VI_CMD_TYPE(x) (((x) >> S_FW_VI_CMD_TYPE) & M_FW_VI_CMD_TYPE) 5086 #define F_FW_VI_CMD_TYPE V_FW_VI_CMD_TYPE(1U) 5087 5088 #define S_FW_VI_CMD_FUNC 12 5089 #define M_FW_VI_CMD_FUNC 0x7 5090 #define V_FW_VI_CMD_FUNC(x) ((x) << S_FW_VI_CMD_FUNC) 5091 #define G_FW_VI_CMD_FUNC(x) (((x) >> S_FW_VI_CMD_FUNC) & M_FW_VI_CMD_FUNC) 5092 5093 #define S_FW_VI_CMD_VIID 0 5094 #define M_FW_VI_CMD_VIID 0xfff 5095 #define V_FW_VI_CMD_VIID(x) ((x) << S_FW_VI_CMD_VIID) 5096 #define G_FW_VI_CMD_VIID(x) (((x) >> S_FW_VI_CMD_VIID) & M_FW_VI_CMD_VIID) 5097 5098 #define S_FW_VI_CMD_PORTID 4 5099 #define M_FW_VI_CMD_PORTID 0xf 5100 #define V_FW_VI_CMD_PORTID(x) ((x) << S_FW_VI_CMD_PORTID) 5101 #define G_FW_VI_CMD_PORTID(x) \ 5102 (((x) >> S_FW_VI_CMD_PORTID) & M_FW_VI_CMD_PORTID) 5103 5104 #define S_FW_VI_CMD_NORSS 11 5105 #define M_FW_VI_CMD_NORSS 0x1 5106 #define V_FW_VI_CMD_NORSS(x) ((x) << S_FW_VI_CMD_NORSS) 5107 #define G_FW_VI_CMD_NORSS(x) \ 5108 (((x) >> S_FW_VI_CMD_NORSS) & M_FW_VI_CMD_NORSS) 5109 #define F_FW_VI_CMD_NORSS V_FW_VI_CMD_NORSS(1U) 5110 5111 #define S_FW_VI_CMD_RSSSIZE 0 5112 #define M_FW_VI_CMD_RSSSIZE 0x7ff 5113 #define V_FW_VI_CMD_RSSSIZE(x) ((x) << S_FW_VI_CMD_RSSSIZE) 5114 #define G_FW_VI_CMD_RSSSIZE(x) \ 5115 (((x) >> S_FW_VI_CMD_RSSSIZE) & M_FW_VI_CMD_RSSSIZE) 5116 5117 #define S_FW_VI_CMD_IDSIIQ 0 5118 #define M_FW_VI_CMD_IDSIIQ 0x3ff 5119 #define V_FW_VI_CMD_IDSIIQ(x) ((x) << S_FW_VI_CMD_IDSIIQ) 5120 #define G_FW_VI_CMD_IDSIIQ(x) \ 5121 (((x) >> S_FW_VI_CMD_IDSIIQ) & M_FW_VI_CMD_IDSIIQ) 5122 5123 #define S_FW_VI_CMD_IDSEIQ 0 5124 #define M_FW_VI_CMD_IDSEIQ 0x3ff 5125 #define V_FW_VI_CMD_IDSEIQ(x) ((x) << S_FW_VI_CMD_IDSEIQ) 5126 #define G_FW_VI_CMD_IDSEIQ(x) \ 5127 (((x) >> S_FW_VI_CMD_IDSEIQ) & M_FW_VI_CMD_IDSEIQ) 5128 5129 /* Special VI_MAC command index ids */ 5130 #define FW_VI_MAC_ADD_MAC 0x3FF 5131 #define FW_VI_MAC_ADD_PERSIST_MAC 0x3FE 5132 #define FW_VI_MAC_MAC_BASED_FREE 0x3FD 5133 5134 enum fw_vi_mac_smac { 5135 FW_VI_MAC_MPS_TCAM_ENTRY, 5136 FW_VI_MAC_MPS_TCAM_ONLY, 5137 FW_VI_MAC_SMT_ONLY, 5138 FW_VI_MAC_SMT_AND_MPSTCAM 5139 }; 5140 5141 enum fw_vi_mac_result { 5142 FW_VI_MAC_R_SUCCESS, 5143 FW_VI_MAC_R_F_NONEXISTENT_NOMEM, 5144 FW_VI_MAC_R_SMAC_FAIL, 5145 FW_VI_MAC_R_F_ACL_CHECK 5146 }; 5147 5148 struct fw_vi_mac_cmd { 5149 __be32 op_to_viid; 5150 __be32 freemacs_to_len16; 5151 union fw_vi_mac { 5152 struct fw_vi_mac_exact { 5153 __be16 valid_to_idx; 5154 __u8 macaddr[6]; 5155 } exact[7]; 5156 struct fw_vi_mac_hash { 5157 __be64 hashvec; 5158 } hash; 5159 } u; 5160 }; 5161 5162 #define S_FW_VI_MAC_CMD_VIID 0 5163 #define M_FW_VI_MAC_CMD_VIID 0xfff 5164 #define V_FW_VI_MAC_CMD_VIID(x) ((x) << S_FW_VI_MAC_CMD_VIID) 5165 #define G_FW_VI_MAC_CMD_VIID(x) \ 5166 (((x) >> S_FW_VI_MAC_CMD_VIID) & M_FW_VI_MAC_CMD_VIID) 5167 5168 #define S_FW_VI_MAC_CMD_FREEMACS 31 5169 #define M_FW_VI_MAC_CMD_FREEMACS 0x1 5170 #define V_FW_VI_MAC_CMD_FREEMACS(x) ((x) << S_FW_VI_MAC_CMD_FREEMACS) 5171 #define G_FW_VI_MAC_CMD_FREEMACS(x) \ 5172 (((x) >> S_FW_VI_MAC_CMD_FREEMACS) & M_FW_VI_MAC_CMD_FREEMACS) 5173 #define F_FW_VI_MAC_CMD_FREEMACS V_FW_VI_MAC_CMD_FREEMACS(1U) 5174 5175 #define S_FW_VI_MAC_CMD_HASHVECEN 23 5176 #define M_FW_VI_MAC_CMD_HASHVECEN 0x1 5177 #define V_FW_VI_MAC_CMD_HASHVECEN(x) ((x) << S_FW_VI_MAC_CMD_HASHVECEN) 5178 #define G_FW_VI_MAC_CMD_HASHVECEN(x) \ 5179 (((x) >> S_FW_VI_MAC_CMD_HASHVECEN) & M_FW_VI_MAC_CMD_HASHVECEN) 5180 #define F_FW_VI_MAC_CMD_HASHVECEN V_FW_VI_MAC_CMD_HASHVECEN(1U) 5181 5182 #define S_FW_VI_MAC_CMD_HASHUNIEN 22 5183 #define M_FW_VI_MAC_CMD_HASHUNIEN 0x1 5184 #define V_FW_VI_MAC_CMD_HASHUNIEN(x) ((x) << S_FW_VI_MAC_CMD_HASHUNIEN) 5185 #define G_FW_VI_MAC_CMD_HASHUNIEN(x) \ 5186 (((x) >> S_FW_VI_MAC_CMD_HASHUNIEN) & M_FW_VI_MAC_CMD_HASHUNIEN) 5187 #define F_FW_VI_MAC_CMD_HASHUNIEN V_FW_VI_MAC_CMD_HASHUNIEN(1U) 5188 5189 #define S_FW_VI_MAC_CMD_VALID 15 5190 #define M_FW_VI_MAC_CMD_VALID 0x1 5191 #define V_FW_VI_MAC_CMD_VALID(x) ((x) << S_FW_VI_MAC_CMD_VALID) 5192 #define G_FW_VI_MAC_CMD_VALID(x) \ 5193 (((x) >> S_FW_VI_MAC_CMD_VALID) & M_FW_VI_MAC_CMD_VALID) 5194 #define F_FW_VI_MAC_CMD_VALID V_FW_VI_MAC_CMD_VALID(1U) 5195 5196 #define S_FW_VI_MAC_CMD_PRIO 12 5197 #define M_FW_VI_MAC_CMD_PRIO 0x7 5198 #define V_FW_VI_MAC_CMD_PRIO(x) ((x) << S_FW_VI_MAC_CMD_PRIO) 5199 #define G_FW_VI_MAC_CMD_PRIO(x) \ 5200 (((x) >> S_FW_VI_MAC_CMD_PRIO) & M_FW_VI_MAC_CMD_PRIO) 5201 5202 #define S_FW_VI_MAC_CMD_SMAC_RESULT 10 5203 #define M_FW_VI_MAC_CMD_SMAC_RESULT 0x3 5204 #define V_FW_VI_MAC_CMD_SMAC_RESULT(x) ((x) << S_FW_VI_MAC_CMD_SMAC_RESULT) 5205 #define G_FW_VI_MAC_CMD_SMAC_RESULT(x) \ 5206 (((x) >> S_FW_VI_MAC_CMD_SMAC_RESULT) & M_FW_VI_MAC_CMD_SMAC_RESULT) 5207 5208 #define S_FW_VI_MAC_CMD_IDX 0 5209 #define M_FW_VI_MAC_CMD_IDX 0x3ff 5210 #define V_FW_VI_MAC_CMD_IDX(x) ((x) << S_FW_VI_MAC_CMD_IDX) 5211 #define G_FW_VI_MAC_CMD_IDX(x) \ 5212 (((x) >> S_FW_VI_MAC_CMD_IDX) & M_FW_VI_MAC_CMD_IDX) 5213 5214 /* T4 max MTU supported */ 5215 #define T4_MAX_MTU_SUPPORTED 9600 5216 #define FW_RXMODE_MTU_NO_CHG 65535 5217 5218 struct fw_vi_rxmode_cmd { 5219 __be32 op_to_viid; 5220 __be32 retval_len16; 5221 __be32 mtu_to_vlanexen; 5222 __be32 r4_lo; 5223 }; 5224 5225 #define S_FW_VI_RXMODE_CMD_VIID 0 5226 #define M_FW_VI_RXMODE_CMD_VIID 0xfff 5227 #define V_FW_VI_RXMODE_CMD_VIID(x) ((x) << S_FW_VI_RXMODE_CMD_VIID) 5228 #define G_FW_VI_RXMODE_CMD_VIID(x) \ 5229 (((x) >> S_FW_VI_RXMODE_CMD_VIID) & M_FW_VI_RXMODE_CMD_VIID) 5230 5231 #define S_FW_VI_RXMODE_CMD_MTU 16 5232 #define M_FW_VI_RXMODE_CMD_MTU 0xffff 5233 #define V_FW_VI_RXMODE_CMD_MTU(x) ((x) << S_FW_VI_RXMODE_CMD_MTU) 5234 #define G_FW_VI_RXMODE_CMD_MTU(x) \ 5235 (((x) >> S_FW_VI_RXMODE_CMD_MTU) & M_FW_VI_RXMODE_CMD_MTU) 5236 5237 #define S_FW_VI_RXMODE_CMD_PROMISCEN 14 5238 #define M_FW_VI_RXMODE_CMD_PROMISCEN 0x3 5239 #define V_FW_VI_RXMODE_CMD_PROMISCEN(x) ((x) << S_FW_VI_RXMODE_CMD_PROMISCEN) 5240 #define G_FW_VI_RXMODE_CMD_PROMISCEN(x) \ 5241 (((x) >> S_FW_VI_RXMODE_CMD_PROMISCEN) & M_FW_VI_RXMODE_CMD_PROMISCEN) 5242 5243 #define S_FW_VI_RXMODE_CMD_ALLMULTIEN 12 5244 #define M_FW_VI_RXMODE_CMD_ALLMULTIEN 0x3 5245 #define V_FW_VI_RXMODE_CMD_ALLMULTIEN(x) \ 5246 ((x) << S_FW_VI_RXMODE_CMD_ALLMULTIEN) 5247 #define G_FW_VI_RXMODE_CMD_ALLMULTIEN(x) \ 5248 (((x) >> S_FW_VI_RXMODE_CMD_ALLMULTIEN) & M_FW_VI_RXMODE_CMD_ALLMULTIEN) 5249 5250 #define S_FW_VI_RXMODE_CMD_BROADCASTEN 10 5251 #define M_FW_VI_RXMODE_CMD_BROADCASTEN 0x3 5252 #define V_FW_VI_RXMODE_CMD_BROADCASTEN(x) \ 5253 ((x) << S_FW_VI_RXMODE_CMD_BROADCASTEN) 5254 #define G_FW_VI_RXMODE_CMD_BROADCASTEN(x) \ 5255 (((x) >> S_FW_VI_RXMODE_CMD_BROADCASTEN) & M_FW_VI_RXMODE_CMD_BROADCASTEN) 5256 5257 #define S_FW_VI_RXMODE_CMD_VLANEXEN 8 5258 #define M_FW_VI_RXMODE_CMD_VLANEXEN 0x3 5259 #define V_FW_VI_RXMODE_CMD_VLANEXEN(x) ((x) << S_FW_VI_RXMODE_CMD_VLANEXEN) 5260 #define G_FW_VI_RXMODE_CMD_VLANEXEN(x) \ 5261 (((x) >> S_FW_VI_RXMODE_CMD_VLANEXEN) & M_FW_VI_RXMODE_CMD_VLANEXEN) 5262 5263 struct fw_vi_enable_cmd { 5264 __be32 op_to_viid; 5265 __be32 ien_to_len16; 5266 __be16 blinkdur; 5267 __be16 r3; 5268 __be32 r4; 5269 }; 5270 5271 #define S_FW_VI_ENABLE_CMD_VIID 0 5272 #define M_FW_VI_ENABLE_CMD_VIID 0xfff 5273 #define V_FW_VI_ENABLE_CMD_VIID(x) ((x) << S_FW_VI_ENABLE_CMD_VIID) 5274 #define G_FW_VI_ENABLE_CMD_VIID(x) \ 5275 (((x) >> S_FW_VI_ENABLE_CMD_VIID) & M_FW_VI_ENABLE_CMD_VIID) 5276 5277 #define S_FW_VI_ENABLE_CMD_IEN 31 5278 #define M_FW_VI_ENABLE_CMD_IEN 0x1 5279 #define V_FW_VI_ENABLE_CMD_IEN(x) ((x) << S_FW_VI_ENABLE_CMD_IEN) 5280 #define G_FW_VI_ENABLE_CMD_IEN(x) \ 5281 (((x) >> S_FW_VI_ENABLE_CMD_IEN) & M_FW_VI_ENABLE_CMD_IEN) 5282 #define F_FW_VI_ENABLE_CMD_IEN V_FW_VI_ENABLE_CMD_IEN(1U) 5283 5284 #define S_FW_VI_ENABLE_CMD_EEN 30 5285 #define M_FW_VI_ENABLE_CMD_EEN 0x1 5286 #define V_FW_VI_ENABLE_CMD_EEN(x) ((x) << S_FW_VI_ENABLE_CMD_EEN) 5287 #define G_FW_VI_ENABLE_CMD_EEN(x) \ 5288 (((x) >> S_FW_VI_ENABLE_CMD_EEN) & M_FW_VI_ENABLE_CMD_EEN) 5289 #define F_FW_VI_ENABLE_CMD_EEN V_FW_VI_ENABLE_CMD_EEN(1U) 5290 5291 #define S_FW_VI_ENABLE_CMD_LED 29 5292 #define M_FW_VI_ENABLE_CMD_LED 0x1 5293 #define V_FW_VI_ENABLE_CMD_LED(x) ((x) << S_FW_VI_ENABLE_CMD_LED) 5294 #define G_FW_VI_ENABLE_CMD_LED(x) \ 5295 (((x) >> S_FW_VI_ENABLE_CMD_LED) & M_FW_VI_ENABLE_CMD_LED) 5296 #define F_FW_VI_ENABLE_CMD_LED V_FW_VI_ENABLE_CMD_LED(1U) 5297 5298 #define S_FW_VI_ENABLE_CMD_DCB_INFO 28 5299 #define M_FW_VI_ENABLE_CMD_DCB_INFO 0x1 5300 #define V_FW_VI_ENABLE_CMD_DCB_INFO(x) ((x) << S_FW_VI_ENABLE_CMD_DCB_INFO) 5301 #define G_FW_VI_ENABLE_CMD_DCB_INFO(x) \ 5302 (((x) >> S_FW_VI_ENABLE_CMD_DCB_INFO) & M_FW_VI_ENABLE_CMD_DCB_INFO) 5303 #define F_FW_VI_ENABLE_CMD_DCB_INFO V_FW_VI_ENABLE_CMD_DCB_INFO(1U) 5304 5305 /* VI VF stats offset definitions */ 5306 #define VI_VF_NUM_STATS 16 5307 enum fw_vi_stats_vf_index { 5308 FW_VI_VF_STAT_TX_BCAST_BYTES_IX, 5309 FW_VI_VF_STAT_TX_BCAST_FRAMES_IX, 5310 FW_VI_VF_STAT_TX_MCAST_BYTES_IX, 5311 FW_VI_VF_STAT_TX_MCAST_FRAMES_IX, 5312 FW_VI_VF_STAT_TX_UCAST_BYTES_IX, 5313 FW_VI_VF_STAT_TX_UCAST_FRAMES_IX, 5314 FW_VI_VF_STAT_TX_DROP_FRAMES_IX, 5315 FW_VI_VF_STAT_TX_OFLD_BYTES_IX, 5316 FW_VI_VF_STAT_TX_OFLD_FRAMES_IX, 5317 FW_VI_VF_STAT_RX_BCAST_BYTES_IX, 5318 FW_VI_VF_STAT_RX_BCAST_FRAMES_IX, 5319 FW_VI_VF_STAT_RX_MCAST_BYTES_IX, 5320 FW_VI_VF_STAT_RX_MCAST_FRAMES_IX, 5321 FW_VI_VF_STAT_RX_UCAST_BYTES_IX, 5322 FW_VI_VF_STAT_RX_UCAST_FRAMES_IX, 5323 FW_VI_VF_STAT_RX_ERR_FRAMES_IX 5324 }; 5325 5326 /* VI PF stats offset definitions */ 5327 #define VI_PF_NUM_STATS 17 5328 enum fw_vi_stats_pf_index { 5329 FW_VI_PF_STAT_TX_BCAST_BYTES_IX, 5330 FW_VI_PF_STAT_TX_BCAST_FRAMES_IX, 5331 FW_VI_PF_STAT_TX_MCAST_BYTES_IX, 5332 FW_VI_PF_STAT_TX_MCAST_FRAMES_IX, 5333 FW_VI_PF_STAT_TX_UCAST_BYTES_IX, 5334 FW_VI_PF_STAT_TX_UCAST_FRAMES_IX, 5335 FW_VI_PF_STAT_TX_OFLD_BYTES_IX, 5336 FW_VI_PF_STAT_TX_OFLD_FRAMES_IX, 5337 FW_VI_PF_STAT_RX_BYTES_IX, 5338 FW_VI_PF_STAT_RX_FRAMES_IX, 5339 FW_VI_PF_STAT_RX_BCAST_BYTES_IX, 5340 FW_VI_PF_STAT_RX_BCAST_FRAMES_IX, 5341 FW_VI_PF_STAT_RX_MCAST_BYTES_IX, 5342 FW_VI_PF_STAT_RX_MCAST_FRAMES_IX, 5343 FW_VI_PF_STAT_RX_UCAST_BYTES_IX, 5344 FW_VI_PF_STAT_RX_UCAST_FRAMES_IX, 5345 FW_VI_PF_STAT_RX_ERR_FRAMES_IX 5346 }; 5347 5348 struct fw_vi_stats_cmd { 5349 __be32 op_to_viid; 5350 __be32 retval_len16; 5351 union fw_vi_stats { 5352 struct fw_vi_stats_ctl { 5353 __be16 nstats_ix; 5354 __be16 r6; 5355 __be32 r7; 5356 __be64 stat0; 5357 __be64 stat1; 5358 __be64 stat2; 5359 __be64 stat3; 5360 __be64 stat4; 5361 __be64 stat5; 5362 } ctl; 5363 struct fw_vi_stats_pf { 5364 __be64 tx_bcast_bytes; 5365 __be64 tx_bcast_frames; 5366 __be64 tx_mcast_bytes; 5367 __be64 tx_mcast_frames; 5368 __be64 tx_ucast_bytes; 5369 __be64 tx_ucast_frames; 5370 __be64 tx_offload_bytes; 5371 __be64 tx_offload_frames; 5372 __be64 rx_pf_bytes; 5373 __be64 rx_pf_frames; 5374 __be64 rx_bcast_bytes; 5375 __be64 rx_bcast_frames; 5376 __be64 rx_mcast_bytes; 5377 __be64 rx_mcast_frames; 5378 __be64 rx_ucast_bytes; 5379 __be64 rx_ucast_frames; 5380 __be64 rx_err_frames; 5381 } pf; 5382 struct fw_vi_stats_vf { 5383 __be64 tx_bcast_bytes; 5384 __be64 tx_bcast_frames; 5385 __be64 tx_mcast_bytes; 5386 __be64 tx_mcast_frames; 5387 __be64 tx_ucast_bytes; 5388 __be64 tx_ucast_frames; 5389 __be64 tx_drop_frames; 5390 __be64 tx_offload_bytes; 5391 __be64 tx_offload_frames; 5392 __be64 rx_bcast_bytes; 5393 __be64 rx_bcast_frames; 5394 __be64 rx_mcast_bytes; 5395 __be64 rx_mcast_frames; 5396 __be64 rx_ucast_bytes; 5397 __be64 rx_ucast_frames; 5398 __be64 rx_err_frames; 5399 } vf; 5400 } u; 5401 }; 5402 5403 #define S_FW_VI_STATS_CMD_VIID 0 5404 #define M_FW_VI_STATS_CMD_VIID 0xfff 5405 #define V_FW_VI_STATS_CMD_VIID(x) ((x) << S_FW_VI_STATS_CMD_VIID) 5406 #define G_FW_VI_STATS_CMD_VIID(x) \ 5407 (((x) >> S_FW_VI_STATS_CMD_VIID) & M_FW_VI_STATS_CMD_VIID) 5408 5409 #define S_FW_VI_STATS_CMD_NSTATS 12 5410 #define M_FW_VI_STATS_CMD_NSTATS 0x7 5411 #define V_FW_VI_STATS_CMD_NSTATS(x) ((x) << S_FW_VI_STATS_CMD_NSTATS) 5412 #define G_FW_VI_STATS_CMD_NSTATS(x) \ 5413 (((x) >> S_FW_VI_STATS_CMD_NSTATS) & M_FW_VI_STATS_CMD_NSTATS) 5414 5415 #define S_FW_VI_STATS_CMD_IX 0 5416 #define M_FW_VI_STATS_CMD_IX 0x1f 5417 #define V_FW_VI_STATS_CMD_IX(x) ((x) << S_FW_VI_STATS_CMD_IX) 5418 #define G_FW_VI_STATS_CMD_IX(x) \ 5419 (((x) >> S_FW_VI_STATS_CMD_IX) & M_FW_VI_STATS_CMD_IX) 5420 5421 struct fw_acl_mac_cmd { 5422 __be32 op_to_vfn; 5423 __be32 en_to_len16; 5424 __u8 nmac; 5425 __u8 r3[7]; 5426 __be16 r4; 5427 __u8 macaddr0[6]; 5428 __be16 r5; 5429 __u8 macaddr1[6]; 5430 __be16 r6; 5431 __u8 macaddr2[6]; 5432 __be16 r7; 5433 __u8 macaddr3[6]; 5434 }; 5435 5436 #define S_FW_ACL_MAC_CMD_PFN 8 5437 #define M_FW_ACL_MAC_CMD_PFN 0x7 5438 #define V_FW_ACL_MAC_CMD_PFN(x) ((x) << S_FW_ACL_MAC_CMD_PFN) 5439 #define G_FW_ACL_MAC_CMD_PFN(x) \ 5440 (((x) >> S_FW_ACL_MAC_CMD_PFN) & M_FW_ACL_MAC_CMD_PFN) 5441 5442 #define S_FW_ACL_MAC_CMD_VFN 0 5443 #define M_FW_ACL_MAC_CMD_VFN 0xff 5444 #define V_FW_ACL_MAC_CMD_VFN(x) ((x) << S_FW_ACL_MAC_CMD_VFN) 5445 #define G_FW_ACL_MAC_CMD_VFN(x) \ 5446 (((x) >> S_FW_ACL_MAC_CMD_VFN) & M_FW_ACL_MAC_CMD_VFN) 5447 5448 #define S_FW_ACL_MAC_CMD_EN 31 5449 #define M_FW_ACL_MAC_CMD_EN 0x1 5450 #define V_FW_ACL_MAC_CMD_EN(x) ((x) << S_FW_ACL_MAC_CMD_EN) 5451 #define G_FW_ACL_MAC_CMD_EN(x) \ 5452 (((x) >> S_FW_ACL_MAC_CMD_EN) & M_FW_ACL_MAC_CMD_EN) 5453 #define F_FW_ACL_MAC_CMD_EN V_FW_ACL_MAC_CMD_EN(1U) 5454 5455 struct fw_acl_vlan_cmd { 5456 __be32 op_to_vfn; 5457 __be32 en_to_len16; 5458 __u8 nvlan; 5459 __u8 dropnovlan_fm; 5460 __u8 r3_lo[6]; 5461 __be16 vlanid[16]; 5462 }; 5463 5464 #define S_FW_ACL_VLAN_CMD_PFN 8 5465 #define M_FW_ACL_VLAN_CMD_PFN 0x7 5466 #define V_FW_ACL_VLAN_CMD_PFN(x) ((x) << S_FW_ACL_VLAN_CMD_PFN) 5467 #define G_FW_ACL_VLAN_CMD_PFN(x) \ 5468 (((x) >> S_FW_ACL_VLAN_CMD_PFN) & M_FW_ACL_VLAN_CMD_PFN) 5469 5470 #define S_FW_ACL_VLAN_CMD_VFN 0 5471 #define M_FW_ACL_VLAN_CMD_VFN 0xff 5472 #define V_FW_ACL_VLAN_CMD_VFN(x) ((x) << S_FW_ACL_VLAN_CMD_VFN) 5473 #define G_FW_ACL_VLAN_CMD_VFN(x) \ 5474 (((x) >> S_FW_ACL_VLAN_CMD_VFN) & M_FW_ACL_VLAN_CMD_VFN) 5475 5476 #define S_FW_ACL_VLAN_CMD_EN 31 5477 #define M_FW_ACL_VLAN_CMD_EN 0x1 5478 #define V_FW_ACL_VLAN_CMD_EN(x) ((x) << S_FW_ACL_VLAN_CMD_EN) 5479 #define G_FW_ACL_VLAN_CMD_EN(x) \ 5480 (((x) >> S_FW_ACL_VLAN_CMD_EN) & M_FW_ACL_VLAN_CMD_EN) 5481 #define F_FW_ACL_VLAN_CMD_EN V_FW_ACL_VLAN_CMD_EN(1U) 5482 5483 #define S_FW_ACL_VLAN_CMD_DROPNOVLAN 7 5484 #define M_FW_ACL_VLAN_CMD_DROPNOVLAN 0x1 5485 #define V_FW_ACL_VLAN_CMD_DROPNOVLAN(x) ((x) << S_FW_ACL_VLAN_CMD_DROPNOVLAN) 5486 #define G_FW_ACL_VLAN_CMD_DROPNOVLAN(x) \ 5487 (((x) >> S_FW_ACL_VLAN_CMD_DROPNOVLAN) & M_FW_ACL_VLAN_CMD_DROPNOVLAN) 5488 #define F_FW_ACL_VLAN_CMD_DROPNOVLAN V_FW_ACL_VLAN_CMD_DROPNOVLAN(1U) 5489 5490 #define S_FW_ACL_VLAN_CMD_FM 6 5491 #define M_FW_ACL_VLAN_CMD_FM 0x1 5492 #define V_FW_ACL_VLAN_CMD_FM(x) ((x) << S_FW_ACL_VLAN_CMD_FM) 5493 #define G_FW_ACL_VLAN_CMD_FM(x) \ 5494 (((x) >> S_FW_ACL_VLAN_CMD_FM) & M_FW_ACL_VLAN_CMD_FM) 5495 #define F_FW_ACL_VLAN_CMD_FM V_FW_ACL_VLAN_CMD_FM(1U) 5496 5497 /* port capabilities bitmap */ 5498 enum fw_port_cap { 5499 FW_PORT_CAP_SPEED_100M = 0x0001, 5500 FW_PORT_CAP_SPEED_1G = 0x0002, 5501 FW_PORT_CAP_SPEED_2_5G = 0x0004, 5502 FW_PORT_CAP_SPEED_10G = 0x0008, 5503 FW_PORT_CAP_SPEED_40G = 0x0010, 5504 FW_PORT_CAP_SPEED_100G = 0x0020, 5505 FW_PORT_CAP_FC_RX = 0x0040, 5506 FW_PORT_CAP_FC_TX = 0x0080, 5507 FW_PORT_CAP_ANEG = 0x0100, 5508 FW_PORT_CAP_MDIX = 0x0200, 5509 FW_PORT_CAP_MDIAUTO = 0x0400, 5510 FW_PORT_CAP_FEC = 0x0800, 5511 FW_PORT_CAP_TECHKR = 0x1000, 5512 FW_PORT_CAP_TECHKX4 = 0x2000, 5513 }; 5514 5515 #define S_FW_PORT_AUXLINFO_MDI 3 5516 #define M_FW_PORT_AUXLINFO_MDI 0x3 5517 #define V_FW_PORT_AUXLINFO_MDI(x) ((x) << S_FW_PORT_AUXLINFO_MDI) 5518 #define G_FW_PORT_AUXLINFO_MDI(x) \ 5519 (((x) >> S_FW_PORT_AUXLINFO_MDI) & M_FW_PORT_AUXLINFO_MDI) 5520 5521 #define S_FW_PORT_AUXLINFO_KX4 2 5522 #define M_FW_PORT_AUXLINFO_KX4 0x1 5523 #define V_FW_PORT_AUXLINFO_KX4(x) ((x) << S_FW_PORT_AUXLINFO_KX4) 5524 #define G_FW_PORT_AUXLINFO_KX4(x) \ 5525 (((x) >> S_FW_PORT_AUXLINFO_KX4) & M_FW_PORT_AUXLINFO_KX4) 5526 #define F_FW_PORT_AUXLINFO_KX4 V_FW_PORT_AUXLINFO_KX4(1U) 5527 5528 #define S_FW_PORT_AUXLINFO_KR 1 5529 #define M_FW_PORT_AUXLINFO_KR 0x1 5530 #define V_FW_PORT_AUXLINFO_KR(x) ((x) << S_FW_PORT_AUXLINFO_KR) 5531 #define G_FW_PORT_AUXLINFO_KR(x) \ 5532 (((x) >> S_FW_PORT_AUXLINFO_KR) & M_FW_PORT_AUXLINFO_KR) 5533 #define F_FW_PORT_AUXLINFO_KR V_FW_PORT_AUXLINFO_KR(1U) 5534 5535 #define S_FW_PORT_AUXLINFO_FEC 0 5536 #define M_FW_PORT_AUXLINFO_FEC 0x1 5537 #define V_FW_PORT_AUXLINFO_FEC(x) ((x) << S_FW_PORT_AUXLINFO_FEC) 5538 #define G_FW_PORT_AUXLINFO_FEC(x) \ 5539 (((x) >> S_FW_PORT_AUXLINFO_FEC) & M_FW_PORT_AUXLINFO_FEC) 5540 #define F_FW_PORT_AUXLINFO_FEC V_FW_PORT_AUXLINFO_FEC(1U) 5541 5542 #define S_FW_PORT_RCAP_AUX 11 5543 #define M_FW_PORT_RCAP_AUX 0x7 5544 #define V_FW_PORT_RCAP_AUX(x) ((x) << S_FW_PORT_RCAP_AUX) 5545 #define G_FW_PORT_RCAP_AUX(x) \ 5546 (((x) >> S_FW_PORT_RCAP_AUX) & M_FW_PORT_RCAP_AUX) 5547 5548 #define S_FW_PORT_CAP_SPEED 0 5549 #define M_FW_PORT_CAP_SPEED 0x3f 5550 #define V_FW_PORT_CAP_SPEED(x) ((x) << S_FW_PORT_CAP_SPEED) 5551 #define G_FW_PORT_CAP_SPEED(x) \ 5552 (((x) >> S_FW_PORT_CAP_SPEED) & M_FW_PORT_CAP_SPEED) 5553 5554 #define S_FW_PORT_CAP_FC 6 5555 #define M_FW_PORT_CAP_FC 0x3 5556 #define V_FW_PORT_CAP_FC(x) ((x) << S_FW_PORT_CAP_FC) 5557 #define G_FW_PORT_CAP_FC(x) \ 5558 (((x) >> S_FW_PORT_CAP_FC) & M_FW_PORT_CAP_FC) 5559 5560 #define S_FW_PORT_CAP_ANEG 8 5561 #define M_FW_PORT_CAP_ANEG 0x1 5562 #define V_FW_PORT_CAP_ANEG(x) ((x) << S_FW_PORT_CAP_ANEG) 5563 #define G_FW_PORT_CAP_ANEG(x) \ 5564 (((x) >> S_FW_PORT_CAP_ANEG) & M_FW_PORT_CAP_ANEG) 5565 5566 enum fw_port_mdi { 5567 FW_PORT_CAP_MDI_UNCHANGED, 5568 FW_PORT_CAP_MDI_AUTO, 5569 FW_PORT_CAP_MDI_F_STRAIGHT, 5570 FW_PORT_CAP_MDI_F_CROSSOVER 5571 }; 5572 5573 #define S_FW_PORT_CAP_MDI 9 5574 #define M_FW_PORT_CAP_MDI 3 5575 #define V_FW_PORT_CAP_MDI(x) ((x) << S_FW_PORT_CAP_MDI) 5576 #define G_FW_PORT_CAP_MDI(x) (((x) >> S_FW_PORT_CAP_MDI) & M_FW_PORT_CAP_MDI) 5577 5578 enum fw_port_action { 5579 FW_PORT_ACTION_L1_CFG = 0x0001, 5580 FW_PORT_ACTION_L2_CFG = 0x0002, 5581 FW_PORT_ACTION_GET_PORT_INFO = 0x0003, 5582 FW_PORT_ACTION_L2_PPP_CFG = 0x0004, 5583 FW_PORT_ACTION_L2_DCB_CFG = 0x0005, 5584 FW_PORT_ACTION_DCB_READ_TRANS = 0x0006, 5585 FW_PORT_ACTION_DCB_READ_RECV = 0x0007, 5586 FW_PORT_ACTION_DCB_READ_DET = 0x0008, 5587 FW_PORT_ACTION_LOW_PWR_TO_NORMAL = 0x0010, 5588 FW_PORT_ACTION_L1_LOW_PWR_EN = 0x0011, 5589 FW_PORT_ACTION_L2_WOL_MODE_EN = 0x0012, 5590 FW_PORT_ACTION_LPBK_TO_NORMAL = 0x0020, 5591 FW_PORT_ACTION_L1_SS_LPBK_ASIC = 0x0021, 5592 FW_PORT_ACTION_MAC_LPBK = 0x0022, 5593 FW_PORT_ACTION_L1_WS_LPBK_ASIC = 0x0023, 5594 FW_PORT_ACTION_L1_EXT_LPBK = 0x0026, 5595 FW_PORT_ACTION_DIAGNOSTICS = 0x0027, 5596 FW_PORT_ACTION_PCS_LPBK = 0x0028, 5597 FW_PORT_ACTION_PHY_RESET = 0x0040, 5598 FW_PORT_ACTION_PMA_RESET = 0x0041, 5599 FW_PORT_ACTION_PCS_RESET = 0x0042, 5600 FW_PORT_ACTION_PHYXS_RESET = 0x0043, 5601 FW_PORT_ACTION_DTEXS_REEST = 0x0044, 5602 FW_PORT_ACTION_AN_RESET = 0x0045, 5603 }; 5604 5605 enum fw_port_l2cfg_ctlbf { 5606 FW_PORT_L2_CTLBF_OVLAN0 = 0x01, 5607 FW_PORT_L2_CTLBF_OVLAN1 = 0x02, 5608 FW_PORT_L2_CTLBF_OVLAN2 = 0x04, 5609 FW_PORT_L2_CTLBF_OVLAN3 = 0x08, 5610 FW_PORT_L2_CTLBF_IVLAN = 0x10, 5611 FW_PORT_L2_CTLBF_TXIPG = 0x20, 5612 FW_PORT_L2_CTLBF_MTU = 0x40 5613 }; 5614 5615 enum fw_port_dcb_cfg { 5616 FW_PORT_DCB_CFG_PG = 0x01, 5617 FW_PORT_DCB_CFG_PFC = 0x02, 5618 FW_PORT_DCB_CFG_APPL = 0x04 5619 }; 5620 5621 enum fw_port_dcb_cfg_rc { 5622 FW_PORT_DCB_CFG_SUCCESS = 0x0, 5623 FW_PORT_DCB_CFG_ERROR = 0x1 5624 }; 5625 5626 enum fw_port_dcb_type { 5627 FW_PORT_DCB_TYPE_PGID = 0x00, 5628 FW_PORT_DCB_TYPE_PGRATE = 0x01, 5629 FW_PORT_DCB_TYPE_PRIORATE = 0x02, 5630 FW_PORT_DCB_TYPE_PFC = 0x03, 5631 FW_PORT_DCB_TYPE_APP_ID = 0x04, 5632 FW_PORT_DCB_TYPE_CONTROL = 0x05, 5633 }; 5634 5635 enum fw_port_diag_ops { 5636 FW_PORT_DIAGS_TEMP = 0x00, 5637 FW_PORT_DIAGS_TX_POWER = 0x01, 5638 FW_PORT_DIAGS_RX_POWER = 0x02, 5639 }; 5640 5641 struct fw_port_cmd { 5642 __be32 op_to_portid; 5643 __be32 action_to_len16; 5644 union fw_port { 5645 struct fw_port_l1cfg { 5646 __be32 rcap; 5647 __be32 r; 5648 } l1cfg; 5649 struct fw_port_l2cfg { 5650 __u8 ctlbf; 5651 __u8 ovlan3_to_ivlan0; 5652 __be16 ivlantype; 5653 __be16 txipg_force_pinfo; 5654 __be16 mtu; 5655 __be16 ovlan0mask; 5656 __be16 ovlan0type; 5657 __be16 ovlan1mask; 5658 __be16 ovlan1type; 5659 __be16 ovlan2mask; 5660 __be16 ovlan2type; 5661 __be16 ovlan3mask; 5662 __be16 ovlan3type; 5663 } l2cfg; 5664 struct fw_port_info { 5665 __be32 lstatus_to_modtype; 5666 __be16 pcap; 5667 __be16 acap; 5668 __be16 mtu; 5669 __u8 cbllen; 5670 __u8 auxlinfo; 5671 __be32 r8; 5672 __be64 r9; 5673 } info; 5674 struct fw_port_diags { 5675 __u8 diagop; 5676 __u8 r[3]; 5677 __be32 diagval; 5678 } diags; 5679 union fw_port_dcb { 5680 struct fw_port_dcb_pgid { 5681 __u8 type; 5682 __u8 apply_pkd; 5683 __u8 r10_lo[2]; 5684 __be32 pgid; 5685 __be64 r11; 5686 } pgid; 5687 struct fw_port_dcb_pgrate { 5688 __u8 type; 5689 __u8 apply_pkd; 5690 __u8 r10_lo[5]; 5691 __u8 num_tcs_supported; 5692 __u8 pgrate[8]; 5693 } pgrate; 5694 struct fw_port_dcb_priorate { 5695 __u8 type; 5696 __u8 apply_pkd; 5697 __u8 r10_lo[6]; 5698 __u8 strict_priorate[8]; 5699 } priorate; 5700 struct fw_port_dcb_pfc { 5701 __u8 type; 5702 __u8 pfcen; 5703 __be16 r10[3]; 5704 __be64 r11; 5705 } pfc; 5706 struct fw_port_app_priority { 5707 __u8 type; 5708 __u8 r10[2]; 5709 __u8 idx; 5710 __u8 user_prio_map; 5711 __u8 sel_field; 5712 __be16 protocolid; 5713 __be64 r12; 5714 } app_priority; 5715 struct fw_port_dcb_control { 5716 __u8 type; 5717 __u8 all_syncd_pkd; 5718 __be16 r10_lo[3]; 5719 __be64 r11; 5720 } control; 5721 } dcb; 5722 } u; 5723 }; 5724 5725 #define S_FW_PORT_CMD_READ 22 5726 #define M_FW_PORT_CMD_READ 0x1 5727 #define V_FW_PORT_CMD_READ(x) ((x) << S_FW_PORT_CMD_READ) 5728 #define G_FW_PORT_CMD_READ(x) \ 5729 (((x) >> S_FW_PORT_CMD_READ) & M_FW_PORT_CMD_READ) 5730 #define F_FW_PORT_CMD_READ V_FW_PORT_CMD_READ(1U) 5731 5732 #define S_FW_PORT_CMD_PORTID 0 5733 #define M_FW_PORT_CMD_PORTID 0xf 5734 #define V_FW_PORT_CMD_PORTID(x) ((x) << S_FW_PORT_CMD_PORTID) 5735 #define G_FW_PORT_CMD_PORTID(x) \ 5736 (((x) >> S_FW_PORT_CMD_PORTID) & M_FW_PORT_CMD_PORTID) 5737 5738 #define S_FW_PORT_CMD_ACTION 16 5739 #define M_FW_PORT_CMD_ACTION 0xffff 5740 #define V_FW_PORT_CMD_ACTION(x) ((x) << S_FW_PORT_CMD_ACTION) 5741 #define G_FW_PORT_CMD_ACTION(x) \ 5742 (((x) >> S_FW_PORT_CMD_ACTION) & M_FW_PORT_CMD_ACTION) 5743 5744 #define S_FW_PORT_CMD_OVLAN3 7 5745 #define M_FW_PORT_CMD_OVLAN3 0x1 5746 #define V_FW_PORT_CMD_OVLAN3(x) ((x) << S_FW_PORT_CMD_OVLAN3) 5747 #define G_FW_PORT_CMD_OVLAN3(x) \ 5748 (((x) >> S_FW_PORT_CMD_OVLAN3) & M_FW_PORT_CMD_OVLAN3) 5749 #define F_FW_PORT_CMD_OVLAN3 V_FW_PORT_CMD_OVLAN3(1U) 5750 5751 #define S_FW_PORT_CMD_OVLAN2 6 5752 #define M_FW_PORT_CMD_OVLAN2 0x1 5753 #define V_FW_PORT_CMD_OVLAN2(x) ((x) << S_FW_PORT_CMD_OVLAN2) 5754 #define G_FW_PORT_CMD_OVLAN2(x) \ 5755 (((x) >> S_FW_PORT_CMD_OVLAN2) & M_FW_PORT_CMD_OVLAN2) 5756 #define F_FW_PORT_CMD_OVLAN2 V_FW_PORT_CMD_OVLAN2(1U) 5757 5758 #define S_FW_PORT_CMD_OVLAN1 5 5759 #define M_FW_PORT_CMD_OVLAN1 0x1 5760 #define V_FW_PORT_CMD_OVLAN1(x) ((x) << S_FW_PORT_CMD_OVLAN1) 5761 #define G_FW_PORT_CMD_OVLAN1(x) \ 5762 (((x) >> S_FW_PORT_CMD_OVLAN1) & M_FW_PORT_CMD_OVLAN1) 5763 #define F_FW_PORT_CMD_OVLAN1 V_FW_PORT_CMD_OVLAN1(1U) 5764 5765 #define S_FW_PORT_CMD_OVLAN0 4 5766 #define M_FW_PORT_CMD_OVLAN0 0x1 5767 #define V_FW_PORT_CMD_OVLAN0(x) ((x) << S_FW_PORT_CMD_OVLAN0) 5768 #define G_FW_PORT_CMD_OVLAN0(x) \ 5769 (((x) >> S_FW_PORT_CMD_OVLAN0) & M_FW_PORT_CMD_OVLAN0) 5770 #define F_FW_PORT_CMD_OVLAN0 V_FW_PORT_CMD_OVLAN0(1U) 5771 5772 #define S_FW_PORT_CMD_IVLAN0 3 5773 #define M_FW_PORT_CMD_IVLAN0 0x1 5774 #define V_FW_PORT_CMD_IVLAN0(x) ((x) << S_FW_PORT_CMD_IVLAN0) 5775 #define G_FW_PORT_CMD_IVLAN0(x) \ 5776 (((x) >> S_FW_PORT_CMD_IVLAN0) & M_FW_PORT_CMD_IVLAN0) 5777 #define F_FW_PORT_CMD_IVLAN0 V_FW_PORT_CMD_IVLAN0(1U) 5778 5779 #define S_FW_PORT_CMD_TXIPG 3 5780 #define M_FW_PORT_CMD_TXIPG 0x1fff 5781 #define V_FW_PORT_CMD_TXIPG(x) ((x) << S_FW_PORT_CMD_TXIPG) 5782 #define G_FW_PORT_CMD_TXIPG(x) \ 5783 (((x) >> S_FW_PORT_CMD_TXIPG) & M_FW_PORT_CMD_TXIPG) 5784 5785 #define S_FW_PORT_CMD_FORCE_PINFO 0 5786 #define M_FW_PORT_CMD_FORCE_PINFO 0x1 5787 #define V_FW_PORT_CMD_FORCE_PINFO(x) ((x) << S_FW_PORT_CMD_FORCE_PINFO) 5788 #define G_FW_PORT_CMD_FORCE_PINFO(x) \ 5789 (((x) >> S_FW_PORT_CMD_FORCE_PINFO) & M_FW_PORT_CMD_FORCE_PINFO) 5790 #define F_FW_PORT_CMD_FORCE_PINFO V_FW_PORT_CMD_FORCE_PINFO(1U) 5791 5792 #define S_FW_PORT_CMD_LSTATUS 31 5793 #define M_FW_PORT_CMD_LSTATUS 0x1 5794 #define V_FW_PORT_CMD_LSTATUS(x) ((x) << S_FW_PORT_CMD_LSTATUS) 5795 #define G_FW_PORT_CMD_LSTATUS(x) \ 5796 (((x) >> S_FW_PORT_CMD_LSTATUS) & M_FW_PORT_CMD_LSTATUS) 5797 #define F_FW_PORT_CMD_LSTATUS V_FW_PORT_CMD_LSTATUS(1U) 5798 5799 #define S_FW_PORT_CMD_LSPEED 24 5800 #define M_FW_PORT_CMD_LSPEED 0x3f 5801 #define V_FW_PORT_CMD_LSPEED(x) ((x) << S_FW_PORT_CMD_LSPEED) 5802 #define G_FW_PORT_CMD_LSPEED(x) \ 5803 (((x) >> S_FW_PORT_CMD_LSPEED) & M_FW_PORT_CMD_LSPEED) 5804 5805 #define S_FW_PORT_CMD_TXPAUSE 23 5806 #define M_FW_PORT_CMD_TXPAUSE 0x1 5807 #define V_FW_PORT_CMD_TXPAUSE(x) ((x) << S_FW_PORT_CMD_TXPAUSE) 5808 #define G_FW_PORT_CMD_TXPAUSE(x) \ 5809 (((x) >> S_FW_PORT_CMD_TXPAUSE) & M_FW_PORT_CMD_TXPAUSE) 5810 #define F_FW_PORT_CMD_TXPAUSE V_FW_PORT_CMD_TXPAUSE(1U) 5811 5812 #define S_FW_PORT_CMD_RXPAUSE 22 5813 #define M_FW_PORT_CMD_RXPAUSE 0x1 5814 #define V_FW_PORT_CMD_RXPAUSE(x) ((x) << S_FW_PORT_CMD_RXPAUSE) 5815 #define G_FW_PORT_CMD_RXPAUSE(x) \ 5816 (((x) >> S_FW_PORT_CMD_RXPAUSE) & M_FW_PORT_CMD_RXPAUSE) 5817 #define F_FW_PORT_CMD_RXPAUSE V_FW_PORT_CMD_RXPAUSE(1U) 5818 5819 #define S_FW_PORT_CMD_MDIOCAP 21 5820 #define M_FW_PORT_CMD_MDIOCAP 0x1 5821 #define V_FW_PORT_CMD_MDIOCAP(x) ((x) << S_FW_PORT_CMD_MDIOCAP) 5822 #define G_FW_PORT_CMD_MDIOCAP(x) \ 5823 (((x) >> S_FW_PORT_CMD_MDIOCAP) & M_FW_PORT_CMD_MDIOCAP) 5824 #define F_FW_PORT_CMD_MDIOCAP V_FW_PORT_CMD_MDIOCAP(1U) 5825 5826 #define S_FW_PORT_CMD_MDIOADDR 16 5827 #define M_FW_PORT_CMD_MDIOADDR 0x1f 5828 #define V_FW_PORT_CMD_MDIOADDR(x) ((x) << S_FW_PORT_CMD_MDIOADDR) 5829 #define G_FW_PORT_CMD_MDIOADDR(x) \ 5830 (((x) >> S_FW_PORT_CMD_MDIOADDR) & M_FW_PORT_CMD_MDIOADDR) 5831 5832 #define S_FW_PORT_CMD_LPTXPAUSE 15 5833 #define M_FW_PORT_CMD_LPTXPAUSE 0x1 5834 #define V_FW_PORT_CMD_LPTXPAUSE(x) ((x) << S_FW_PORT_CMD_LPTXPAUSE) 5835 #define G_FW_PORT_CMD_LPTXPAUSE(x) \ 5836 (((x) >> S_FW_PORT_CMD_LPTXPAUSE) & M_FW_PORT_CMD_LPTXPAUSE) 5837 #define F_FW_PORT_CMD_LPTXPAUSE V_FW_PORT_CMD_LPTXPAUSE(1U) 5838 5839 #define S_FW_PORT_CMD_LPRXPAUSE 14 5840 #define M_FW_PORT_CMD_LPRXPAUSE 0x1 5841 #define V_FW_PORT_CMD_LPRXPAUSE(x) ((x) << S_FW_PORT_CMD_LPRXPAUSE) 5842 #define G_FW_PORT_CMD_LPRXPAUSE(x) \ 5843 (((x) >> S_FW_PORT_CMD_LPRXPAUSE) & M_FW_PORT_CMD_LPRXPAUSE) 5844 #define F_FW_PORT_CMD_LPRXPAUSE V_FW_PORT_CMD_LPRXPAUSE(1U) 5845 5846 #define S_FW_PORT_CMD_PTYPE 8 5847 #define M_FW_PORT_CMD_PTYPE 0x1f 5848 #define V_FW_PORT_CMD_PTYPE(x) ((x) << S_FW_PORT_CMD_PTYPE) 5849 #define G_FW_PORT_CMD_PTYPE(x) \ 5850 (((x) >> S_FW_PORT_CMD_PTYPE) & M_FW_PORT_CMD_PTYPE) 5851 5852 #define S_FW_PORT_CMD_LINKDNRC 5 5853 #define M_FW_PORT_CMD_LINKDNRC 0x7 5854 #define V_FW_PORT_CMD_LINKDNRC(x) ((x) << S_FW_PORT_CMD_LINKDNRC) 5855 #define G_FW_PORT_CMD_LINKDNRC(x) \ 5856 (((x) >> S_FW_PORT_CMD_LINKDNRC) & M_FW_PORT_CMD_LINKDNRC) 5857 5858 #define S_FW_PORT_CMD_MODTYPE 0 5859 #define M_FW_PORT_CMD_MODTYPE 0x1f 5860 #define V_FW_PORT_CMD_MODTYPE(x) ((x) << S_FW_PORT_CMD_MODTYPE) 5861 #define G_FW_PORT_CMD_MODTYPE(x) \ 5862 (((x) >> S_FW_PORT_CMD_MODTYPE) & M_FW_PORT_CMD_MODTYPE) 5863 5864 #define S_FW_PORT_CMD_APPLY 7 5865 #define M_FW_PORT_CMD_APPLY 0x1 5866 #define V_FW_PORT_CMD_APPLY(x) ((x) << S_FW_PORT_CMD_APPLY) 5867 #define G_FW_PORT_CMD_APPLY(x) \ 5868 (((x) >> S_FW_PORT_CMD_APPLY) & M_FW_PORT_CMD_APPLY) 5869 #define F_FW_PORT_CMD_APPLY V_FW_PORT_CMD_APPLY(1U) 5870 5871 #define S_FW_PORT_CMD_ALL_SYNCD 7 5872 #define M_FW_PORT_CMD_ALL_SYNCD 0x1 5873 #define V_FW_PORT_CMD_ALL_SYNCD(x) ((x) << S_FW_PORT_CMD_ALL_SYNCD) 5874 #define G_FW_PORT_CMD_ALL_SYNCD(x) \ 5875 (((x) >> S_FW_PORT_CMD_ALL_SYNCD) & M_FW_PORT_CMD_ALL_SYNCD) 5876 #define F_FW_PORT_CMD_ALL_SYNCD V_FW_PORT_CMD_ALL_SYNCD(1U) 5877 5878 /* 5879 * These are configured into the VPD and hence tools that generate 5880 * VPD may use this enumeration. 5881 * extPHY #lanes T4_I2C extI2C BP_Eq BP_ANEG Speed 5882 */ 5883 enum fw_port_type { 5884 FW_PORT_TYPE_FIBER_XFI = 0, /* Y, 1, N, Y, N, N, 10G */ 5885 FW_PORT_TYPE_FIBER_XAUI = 1, /* Y, 4, N, Y, N, N, 10G */ 5886 FW_PORT_TYPE_BT_SGMII = 2, /* Y, 1, No, No, No, No, 1G/100M */ 5887 FW_PORT_TYPE_BT_XFI = 3, /* Y, 1, No, No, No, No, 10G */ 5888 FW_PORT_TYPE_BT_XAUI = 4, /* Y, 4, No, No, No, No, 10G/1G/100M? */ 5889 FW_PORT_TYPE_KX4 = 5, /* No, 4, No, No, Yes, Yes, 10G */ 5890 FW_PORT_TYPE_CX4 = 6, /* No, 4, No, No, No, No, 10G */ 5891 FW_PORT_TYPE_KX = 7, /* No, 1, No, No, Yes, No, 1G */ 5892 FW_PORT_TYPE_KR = 8, /* No, 1, No, No, Yes, Yes, 10G */ 5893 FW_PORT_TYPE_SFP = 9, /* No, 1, Yes, No, No, No, 10G */ 5894 FW_PORT_TYPE_BP_AP = 10, /* No, 1, No, No, Yes, Yes, 10G, BP ANGE */ 5895 FW_PORT_TYPE_BP4_AP = 11, /* No, 4, No, No, Yes, Yes, 10G, BP ANGE */ 5896 FW_PORT_TYPE_QSFP_10G = 12, /* No, 1, Yes, No, No, No, 10G */ 5897 FW_PORT_TYPE_QSFP = 14, /* No, 4, Yes, No, No, No, 40G */ 5898 FW_PORT_TYPE_BP40_BA = 15, /* No, 4, No, No, Yes, Yes, 40G/10G/1G, BP ANGE */ 5899 5900 FW_PORT_TYPE_NONE = M_FW_PORT_CMD_PTYPE 5901 }; 5902 5903 /* These are read from module's EEPROM and determined once the 5904 module is inserted. */ 5905 enum fw_port_module_type { 5906 FW_PORT_MOD_TYPE_NA = 0x0, 5907 FW_PORT_MOD_TYPE_LR = 0x1, 5908 FW_PORT_MOD_TYPE_SR = 0x2, 5909 FW_PORT_MOD_TYPE_ER = 0x3, 5910 FW_PORT_MOD_TYPE_TWINAX_PASSIVE = 0x4, 5911 FW_PORT_MOD_TYPE_TWINAX_ACTIVE = 0x5, 5912 FW_PORT_MOD_TYPE_LRM = 0x6, 5913 FW_PORT_MOD_TYPE_ERROR = M_FW_PORT_CMD_MODTYPE - 3, 5914 FW_PORT_MOD_TYPE_UNKNOWN = M_FW_PORT_CMD_MODTYPE - 2, 5915 FW_PORT_MOD_TYPE_NOTSUPPORTED = M_FW_PORT_CMD_MODTYPE - 1, 5916 FW_PORT_MOD_TYPE_NONE = M_FW_PORT_CMD_MODTYPE 5917 }; 5918 5919 /* used by FW and tools may use this to generate VPD */ 5920 enum fw_port_mod_sub_type { 5921 FW_PORT_MOD_SUB_TYPE_NA, 5922 FW_PORT_MOD_SUB_TYPE_MV88E114X=0x1, 5923 FW_PORT_MOD_SUB_TYPE_TN8022=0x2, 5924 FW_PORT_MOD_SUB_TYPE_AQ1202=0x3, 5925 FW_PORT_MOD_SUB_TYPE_88x3120=0x4, 5926 FW_PORT_MOD_SUB_TYPE_BCM84834=0x5, 5927 FW_PORT_MOD_SUB_TYPE_BT_VSC8634=0x8, 5928 5929 /* 5930 * The following will never been in the VPD. They are TWINAX cable 5931 * lengths decoded from SFP+ module i2c PROMs. These should almost 5932 * certainly go somewhere else ... 5933 */ 5934 FW_PORT_MOD_SUB_TYPE_TWINAX_1=0x9, 5935 FW_PORT_MOD_SUB_TYPE_TWINAX_3=0xA, 5936 FW_PORT_MOD_SUB_TYPE_TWINAX_5=0xB, 5937 FW_PORT_MOD_SUB_TYPE_TWINAX_7=0xC, 5938 }; 5939 5940 /* link down reason codes (3b) */ 5941 enum fw_port_link_dn_rc { 5942 FW_PORT_LINK_DN_RC_NONE, 5943 FW_PORT_LINK_DN_RC_REMFLT, /* Remote fault detected */ 5944 FW_PORT_LINK_DN_ANEG_F, /* Auto-negotiation fault */ 5945 FW_PORT_LINK_DN_RESERVED3, 5946 FW_PORT_LINK_DN_OVERHEAT, /* Port overheated */ 5947 FW_PORT_LINK_DN_UNKNOWN, /* Unable to determine reason */ 5948 FW_PORT_LINK_DN_RX_LOS, /* No RX signal detected */ 5949 FW_PORT_LINK_DN_RESERVED7 5950 }; 5951 5952 /* port stats */ 5953 #define FW_NUM_PORT_STATS 50 5954 #define FW_NUM_PORT_TX_STATS 23 5955 #define FW_NUM_PORT_RX_STATS 27 5956 5957 enum fw_port_stats_tx_index { 5958 FW_STAT_TX_PORT_BYTES_IX, 5959 FW_STAT_TX_PORT_FRAMES_IX, 5960 FW_STAT_TX_PORT_BCAST_IX, 5961 FW_STAT_TX_PORT_MCAST_IX, 5962 FW_STAT_TX_PORT_UCAST_IX, 5963 FW_STAT_TX_PORT_ERROR_IX, 5964 FW_STAT_TX_PORT_64B_IX, 5965 FW_STAT_TX_PORT_65B_127B_IX, 5966 FW_STAT_TX_PORT_128B_255B_IX, 5967 FW_STAT_TX_PORT_256B_511B_IX, 5968 FW_STAT_TX_PORT_512B_1023B_IX, 5969 FW_STAT_TX_PORT_1024B_1518B_IX, 5970 FW_STAT_TX_PORT_1519B_MAX_IX, 5971 FW_STAT_TX_PORT_DROP_IX, 5972 FW_STAT_TX_PORT_PAUSE_IX, 5973 FW_STAT_TX_PORT_PPP0_IX, 5974 FW_STAT_TX_PORT_PPP1_IX, 5975 FW_STAT_TX_PORT_PPP2_IX, 5976 FW_STAT_TX_PORT_PPP3_IX, 5977 FW_STAT_TX_PORT_PPP4_IX, 5978 FW_STAT_TX_PORT_PPP5_IX, 5979 FW_STAT_TX_PORT_PPP6_IX, 5980 FW_STAT_TX_PORT_PPP7_IX 5981 }; 5982 5983 enum fw_port_stat_rx_index { 5984 FW_STAT_RX_PORT_BYTES_IX, 5985 FW_STAT_RX_PORT_FRAMES_IX, 5986 FW_STAT_RX_PORT_BCAST_IX, 5987 FW_STAT_RX_PORT_MCAST_IX, 5988 FW_STAT_RX_PORT_UCAST_IX, 5989 FW_STAT_RX_PORT_MTU_ERROR_IX, 5990 FW_STAT_RX_PORT_MTU_CRC_ERROR_IX, 5991 FW_STAT_RX_PORT_CRC_ERROR_IX, 5992 FW_STAT_RX_PORT_LEN_ERROR_IX, 5993 FW_STAT_RX_PORT_SYM_ERROR_IX, 5994 FW_STAT_RX_PORT_64B_IX, 5995 FW_STAT_RX_PORT_65B_127B_IX, 5996 FW_STAT_RX_PORT_128B_255B_IX, 5997 FW_STAT_RX_PORT_256B_511B_IX, 5998 FW_STAT_RX_PORT_512B_1023B_IX, 5999 FW_STAT_RX_PORT_1024B_1518B_IX, 6000 FW_STAT_RX_PORT_1519B_MAX_IX, 6001 FW_STAT_RX_PORT_PAUSE_IX, 6002 FW_STAT_RX_PORT_PPP0_IX, 6003 FW_STAT_RX_PORT_PPP1_IX, 6004 FW_STAT_RX_PORT_PPP2_IX, 6005 FW_STAT_RX_PORT_PPP3_IX, 6006 FW_STAT_RX_PORT_PPP4_IX, 6007 FW_STAT_RX_PORT_PPP5_IX, 6008 FW_STAT_RX_PORT_PPP6_IX, 6009 FW_STAT_RX_PORT_PPP7_IX, 6010 FW_STAT_RX_PORT_LESS_64B_IX 6011 }; 6012 6013 struct fw_port_stats_cmd { 6014 __be32 op_to_portid; 6015 __be32 retval_len16; 6016 union fw_port_stats { 6017 struct fw_port_stats_ctl { 6018 __u8 nstats_bg_bm; 6019 __u8 tx_ix; 6020 __be16 r6; 6021 __be32 r7; 6022 __be64 stat0; 6023 __be64 stat1; 6024 __be64 stat2; 6025 __be64 stat3; 6026 __be64 stat4; 6027 __be64 stat5; 6028 } ctl; 6029 struct fw_port_stats_all { 6030 __be64 tx_bytes; 6031 __be64 tx_frames; 6032 __be64 tx_bcast; 6033 __be64 tx_mcast; 6034 __be64 tx_ucast; 6035 __be64 tx_error; 6036 __be64 tx_64b; 6037 __be64 tx_65b_127b; 6038 __be64 tx_128b_255b; 6039 __be64 tx_256b_511b; 6040 __be64 tx_512b_1023b; 6041 __be64 tx_1024b_1518b; 6042 __be64 tx_1519b_max; 6043 __be64 tx_drop; 6044 __be64 tx_pause; 6045 __be64 tx_ppp0; 6046 __be64 tx_ppp1; 6047 __be64 tx_ppp2; 6048 __be64 tx_ppp3; 6049 __be64 tx_ppp4; 6050 __be64 tx_ppp5; 6051 __be64 tx_ppp6; 6052 __be64 tx_ppp7; 6053 __be64 rx_bytes; 6054 __be64 rx_frames; 6055 __be64 rx_bcast; 6056 __be64 rx_mcast; 6057 __be64 rx_ucast; 6058 __be64 rx_mtu_error; 6059 __be64 rx_mtu_crc_error; 6060 __be64 rx_crc_error; 6061 __be64 rx_len_error; 6062 __be64 rx_sym_error; 6063 __be64 rx_64b; 6064 __be64 rx_65b_127b; 6065 __be64 rx_128b_255b; 6066 __be64 rx_256b_511b; 6067 __be64 rx_512b_1023b; 6068 __be64 rx_1024b_1518b; 6069 __be64 rx_1519b_max; 6070 __be64 rx_pause; 6071 __be64 rx_ppp0; 6072 __be64 rx_ppp1; 6073 __be64 rx_ppp2; 6074 __be64 rx_ppp3; 6075 __be64 rx_ppp4; 6076 __be64 rx_ppp5; 6077 __be64 rx_ppp6; 6078 __be64 rx_ppp7; 6079 __be64 rx_less_64b; 6080 __be64 rx_bg_drop; 6081 __be64 rx_bg_trunc; 6082 } all; 6083 } u; 6084 }; 6085 6086 #define S_FW_PORT_STATS_CMD_NSTATS 4 6087 #define M_FW_PORT_STATS_CMD_NSTATS 0x7 6088 #define V_FW_PORT_STATS_CMD_NSTATS(x) ((x) << S_FW_PORT_STATS_CMD_NSTATS) 6089 #define G_FW_PORT_STATS_CMD_NSTATS(x) \ 6090 (((x) >> S_FW_PORT_STATS_CMD_NSTATS) & M_FW_PORT_STATS_CMD_NSTATS) 6091 6092 #define S_FW_PORT_STATS_CMD_BG_BM 0 6093 #define M_FW_PORT_STATS_CMD_BG_BM 0x3 6094 #define V_FW_PORT_STATS_CMD_BG_BM(x) ((x) << S_FW_PORT_STATS_CMD_BG_BM) 6095 #define G_FW_PORT_STATS_CMD_BG_BM(x) \ 6096 (((x) >> S_FW_PORT_STATS_CMD_BG_BM) & M_FW_PORT_STATS_CMD_BG_BM) 6097 6098 #define S_FW_PORT_STATS_CMD_TX 7 6099 #define M_FW_PORT_STATS_CMD_TX 0x1 6100 #define V_FW_PORT_STATS_CMD_TX(x) ((x) << S_FW_PORT_STATS_CMD_TX) 6101 #define G_FW_PORT_STATS_CMD_TX(x) \ 6102 (((x) >> S_FW_PORT_STATS_CMD_TX) & M_FW_PORT_STATS_CMD_TX) 6103 #define F_FW_PORT_STATS_CMD_TX V_FW_PORT_STATS_CMD_TX(1U) 6104 6105 #define S_FW_PORT_STATS_CMD_IX 0 6106 #define M_FW_PORT_STATS_CMD_IX 0x3f 6107 #define V_FW_PORT_STATS_CMD_IX(x) ((x) << S_FW_PORT_STATS_CMD_IX) 6108 #define G_FW_PORT_STATS_CMD_IX(x) \ 6109 (((x) >> S_FW_PORT_STATS_CMD_IX) & M_FW_PORT_STATS_CMD_IX) 6110 6111 /* port loopback stats */ 6112 #define FW_NUM_LB_STATS 14 6113 enum fw_port_lb_stats_index { 6114 FW_STAT_LB_PORT_BYTES_IX, 6115 FW_STAT_LB_PORT_FRAMES_IX, 6116 FW_STAT_LB_PORT_BCAST_IX, 6117 FW_STAT_LB_PORT_MCAST_IX, 6118 FW_STAT_LB_PORT_UCAST_IX, 6119 FW_STAT_LB_PORT_ERROR_IX, 6120 FW_STAT_LB_PORT_64B_IX, 6121 FW_STAT_LB_PORT_65B_127B_IX, 6122 FW_STAT_LB_PORT_128B_255B_IX, 6123 FW_STAT_LB_PORT_256B_511B_IX, 6124 FW_STAT_LB_PORT_512B_1023B_IX, 6125 FW_STAT_LB_PORT_1024B_1518B_IX, 6126 FW_STAT_LB_PORT_1519B_MAX_IX, 6127 FW_STAT_LB_PORT_DROP_FRAMES_IX 6128 }; 6129 6130 struct fw_port_lb_stats_cmd { 6131 __be32 op_to_lbport; 6132 __be32 retval_len16; 6133 union fw_port_lb_stats { 6134 struct fw_port_lb_stats_ctl { 6135 __u8 nstats_bg_bm; 6136 __u8 ix_pkd; 6137 __be16 r6; 6138 __be32 r7; 6139 __be64 stat0; 6140 __be64 stat1; 6141 __be64 stat2; 6142 __be64 stat3; 6143 __be64 stat4; 6144 __be64 stat5; 6145 } ctl; 6146 struct fw_port_lb_stats_all { 6147 __be64 tx_bytes; 6148 __be64 tx_frames; 6149 __be64 tx_bcast; 6150 __be64 tx_mcast; 6151 __be64 tx_ucast; 6152 __be64 tx_error; 6153 __be64 tx_64b; 6154 __be64 tx_65b_127b; 6155 __be64 tx_128b_255b; 6156 __be64 tx_256b_511b; 6157 __be64 tx_512b_1023b; 6158 __be64 tx_1024b_1518b; 6159 __be64 tx_1519b_max; 6160 __be64 rx_lb_drop; 6161 __be64 rx_lb_trunc; 6162 } all; 6163 } u; 6164 }; 6165 6166 #define S_FW_PORT_LB_STATS_CMD_LBPORT 0 6167 #define M_FW_PORT_LB_STATS_CMD_LBPORT 0xf 6168 #define V_FW_PORT_LB_STATS_CMD_LBPORT(x) \ 6169 ((x) << S_FW_PORT_LB_STATS_CMD_LBPORT) 6170 #define G_FW_PORT_LB_STATS_CMD_LBPORT(x) \ 6171 (((x) >> S_FW_PORT_LB_STATS_CMD_LBPORT) & M_FW_PORT_LB_STATS_CMD_LBPORT) 6172 6173 #define S_FW_PORT_LB_STATS_CMD_NSTATS 4 6174 #define M_FW_PORT_LB_STATS_CMD_NSTATS 0x7 6175 #define V_FW_PORT_LB_STATS_CMD_NSTATS(x) \ 6176 ((x) << S_FW_PORT_LB_STATS_CMD_NSTATS) 6177 #define G_FW_PORT_LB_STATS_CMD_NSTATS(x) \ 6178 (((x) >> S_FW_PORT_LB_STATS_CMD_NSTATS) & M_FW_PORT_LB_STATS_CMD_NSTATS) 6179 6180 #define S_FW_PORT_LB_STATS_CMD_BG_BM 0 6181 #define M_FW_PORT_LB_STATS_CMD_BG_BM 0x3 6182 #define V_FW_PORT_LB_STATS_CMD_BG_BM(x) ((x) << S_FW_PORT_LB_STATS_CMD_BG_BM) 6183 #define G_FW_PORT_LB_STATS_CMD_BG_BM(x) \ 6184 (((x) >> S_FW_PORT_LB_STATS_CMD_BG_BM) & M_FW_PORT_LB_STATS_CMD_BG_BM) 6185 6186 #define S_FW_PORT_LB_STATS_CMD_IX 0 6187 #define M_FW_PORT_LB_STATS_CMD_IX 0xf 6188 #define V_FW_PORT_LB_STATS_CMD_IX(x) ((x) << S_FW_PORT_LB_STATS_CMD_IX) 6189 #define G_FW_PORT_LB_STATS_CMD_IX(x) \ 6190 (((x) >> S_FW_PORT_LB_STATS_CMD_IX) & M_FW_PORT_LB_STATS_CMD_IX) 6191 6192 /* Trace related defines */ 6193 #define FW_TRACE_CAPTURE_MAX_SINGLE_FLT_MODE 10240 6194 #define FW_TRACE_CAPTURE_MAX_MULTI_FLT_MODE 2560 6195 6196 struct fw_port_trace_cmd { 6197 __be32 op_to_portid; 6198 __be32 retval_len16; 6199 __be16 traceen_to_pciech; 6200 __be16 qnum; 6201 __be32 r5; 6202 }; 6203 6204 #define S_FW_PORT_TRACE_CMD_PORTID 0 6205 #define M_FW_PORT_TRACE_CMD_PORTID 0xf 6206 #define V_FW_PORT_TRACE_CMD_PORTID(x) ((x) << S_FW_PORT_TRACE_CMD_PORTID) 6207 #define G_FW_PORT_TRACE_CMD_PORTID(x) \ 6208 (((x) >> S_FW_PORT_TRACE_CMD_PORTID) & M_FW_PORT_TRACE_CMD_PORTID) 6209 6210 #define S_FW_PORT_TRACE_CMD_TRACEEN 15 6211 #define M_FW_PORT_TRACE_CMD_TRACEEN 0x1 6212 #define V_FW_PORT_TRACE_CMD_TRACEEN(x) ((x) << S_FW_PORT_TRACE_CMD_TRACEEN) 6213 #define G_FW_PORT_TRACE_CMD_TRACEEN(x) \ 6214 (((x) >> S_FW_PORT_TRACE_CMD_TRACEEN) & M_FW_PORT_TRACE_CMD_TRACEEN) 6215 #define F_FW_PORT_TRACE_CMD_TRACEEN V_FW_PORT_TRACE_CMD_TRACEEN(1U) 6216 6217 #define S_FW_PORT_TRACE_CMD_FLTMODE 14 6218 #define M_FW_PORT_TRACE_CMD_FLTMODE 0x1 6219 #define V_FW_PORT_TRACE_CMD_FLTMODE(x) ((x) << S_FW_PORT_TRACE_CMD_FLTMODE) 6220 #define G_FW_PORT_TRACE_CMD_FLTMODE(x) \ 6221 (((x) >> S_FW_PORT_TRACE_CMD_FLTMODE) & M_FW_PORT_TRACE_CMD_FLTMODE) 6222 #define F_FW_PORT_TRACE_CMD_FLTMODE V_FW_PORT_TRACE_CMD_FLTMODE(1U) 6223 6224 #define S_FW_PORT_TRACE_CMD_DUPLEN 13 6225 #define M_FW_PORT_TRACE_CMD_DUPLEN 0x1 6226 #define V_FW_PORT_TRACE_CMD_DUPLEN(x) ((x) << S_FW_PORT_TRACE_CMD_DUPLEN) 6227 #define G_FW_PORT_TRACE_CMD_DUPLEN(x) \ 6228 (((x) >> S_FW_PORT_TRACE_CMD_DUPLEN) & M_FW_PORT_TRACE_CMD_DUPLEN) 6229 #define F_FW_PORT_TRACE_CMD_DUPLEN V_FW_PORT_TRACE_CMD_DUPLEN(1U) 6230 6231 #define S_FW_PORT_TRACE_CMD_RUNTFLTSIZE 8 6232 #define M_FW_PORT_TRACE_CMD_RUNTFLTSIZE 0x1f 6233 #define V_FW_PORT_TRACE_CMD_RUNTFLTSIZE(x) \ 6234 ((x) << S_FW_PORT_TRACE_CMD_RUNTFLTSIZE) 6235 #define G_FW_PORT_TRACE_CMD_RUNTFLTSIZE(x) \ 6236 (((x) >> S_FW_PORT_TRACE_CMD_RUNTFLTSIZE) & \ 6237 M_FW_PORT_TRACE_CMD_RUNTFLTSIZE) 6238 6239 #define S_FW_PORT_TRACE_CMD_PCIECH 6 6240 #define M_FW_PORT_TRACE_CMD_PCIECH 0x3 6241 #define V_FW_PORT_TRACE_CMD_PCIECH(x) ((x) << S_FW_PORT_TRACE_CMD_PCIECH) 6242 #define G_FW_PORT_TRACE_CMD_PCIECH(x) \ 6243 (((x) >> S_FW_PORT_TRACE_CMD_PCIECH) & M_FW_PORT_TRACE_CMD_PCIECH) 6244 6245 struct fw_port_trace_mmap_cmd { 6246 __be32 op_to_portid; 6247 __be32 retval_len16; 6248 __be32 fid_to_skipoffset; 6249 __be32 minpktsize_capturemax; 6250 __u8 map[224]; 6251 }; 6252 6253 #define S_FW_PORT_TRACE_MMAP_CMD_PORTID 0 6254 #define M_FW_PORT_TRACE_MMAP_CMD_PORTID 0xf 6255 #define V_FW_PORT_TRACE_MMAP_CMD_PORTID(x) \ 6256 ((x) << S_FW_PORT_TRACE_MMAP_CMD_PORTID) 6257 #define G_FW_PORT_TRACE_MMAP_CMD_PORTID(x) \ 6258 (((x) >> S_FW_PORT_TRACE_MMAP_CMD_PORTID) & \ 6259 M_FW_PORT_TRACE_MMAP_CMD_PORTID) 6260 6261 #define S_FW_PORT_TRACE_MMAP_CMD_FID 30 6262 #define M_FW_PORT_TRACE_MMAP_CMD_FID 0x3 6263 #define V_FW_PORT_TRACE_MMAP_CMD_FID(x) ((x) << S_FW_PORT_TRACE_MMAP_CMD_FID) 6264 #define G_FW_PORT_TRACE_MMAP_CMD_FID(x) \ 6265 (((x) >> S_FW_PORT_TRACE_MMAP_CMD_FID) & M_FW_PORT_TRACE_MMAP_CMD_FID) 6266 6267 #define S_FW_PORT_TRACE_MMAP_CMD_MMAPEN 29 6268 #define M_FW_PORT_TRACE_MMAP_CMD_MMAPEN 0x1 6269 #define V_FW_PORT_TRACE_MMAP_CMD_MMAPEN(x) \ 6270 ((x) << S_FW_PORT_TRACE_MMAP_CMD_MMAPEN) 6271 #define G_FW_PORT_TRACE_MMAP_CMD_MMAPEN(x) \ 6272 (((x) >> S_FW_PORT_TRACE_MMAP_CMD_MMAPEN) & \ 6273 M_FW_PORT_TRACE_MMAP_CMD_MMAPEN) 6274 #define F_FW_PORT_TRACE_MMAP_CMD_MMAPEN V_FW_PORT_TRACE_MMAP_CMD_MMAPEN(1U) 6275 6276 #define S_FW_PORT_TRACE_MMAP_CMD_DCMAPEN 28 6277 #define M_FW_PORT_TRACE_MMAP_CMD_DCMAPEN 0x1 6278 #define V_FW_PORT_TRACE_MMAP_CMD_DCMAPEN(x) \ 6279 ((x) << S_FW_PORT_TRACE_MMAP_CMD_DCMAPEN) 6280 #define G_FW_PORT_TRACE_MMAP_CMD_DCMAPEN(x) \ 6281 (((x) >> S_FW_PORT_TRACE_MMAP_CMD_DCMAPEN) & \ 6282 M_FW_PORT_TRACE_MMAP_CMD_DCMAPEN) 6283 #define F_FW_PORT_TRACE_MMAP_CMD_DCMAPEN \ 6284 V_FW_PORT_TRACE_MMAP_CMD_DCMAPEN(1U) 6285 6286 #define S_FW_PORT_TRACE_MMAP_CMD_SKIPLENGTH 8 6287 #define M_FW_PORT_TRACE_MMAP_CMD_SKIPLENGTH 0x1f 6288 #define V_FW_PORT_TRACE_MMAP_CMD_SKIPLENGTH(x) \ 6289 ((x) << S_FW_PORT_TRACE_MMAP_CMD_SKIPLENGTH) 6290 #define G_FW_PORT_TRACE_MMAP_CMD_SKIPLENGTH(x) \ 6291 (((x) >> S_FW_PORT_TRACE_MMAP_CMD_SKIPLENGTH) & \ 6292 M_FW_PORT_TRACE_MMAP_CMD_SKIPLENGTH) 6293 6294 #define S_FW_PORT_TRACE_MMAP_CMD_SKIPOFFSET 0 6295 #define M_FW_PORT_TRACE_MMAP_CMD_SKIPOFFSET 0x1f 6296 #define V_FW_PORT_TRACE_MMAP_CMD_SKIPOFFSET(x) \ 6297 ((x) << S_FW_PORT_TRACE_MMAP_CMD_SKIPOFFSET) 6298 #define G_FW_PORT_TRACE_MMAP_CMD_SKIPOFFSET(x) \ 6299 (((x) >> S_FW_PORT_TRACE_MMAP_CMD_SKIPOFFSET) & \ 6300 M_FW_PORT_TRACE_MMAP_CMD_SKIPOFFSET) 6301 6302 #define S_FW_PORT_TRACE_MMAP_CMD_MINPKTSIZE 18 6303 #define M_FW_PORT_TRACE_MMAP_CMD_MINPKTSIZE 0x3fff 6304 #define V_FW_PORT_TRACE_MMAP_CMD_MINPKTSIZE(x) \ 6305 ((x) << S_FW_PORT_TRACE_MMAP_CMD_MINPKTSIZE) 6306 #define G_FW_PORT_TRACE_MMAP_CMD_MINPKTSIZE(x) \ 6307 (((x) >> S_FW_PORT_TRACE_MMAP_CMD_MINPKTSIZE) & \ 6308 M_FW_PORT_TRACE_MMAP_CMD_MINPKTSIZE) 6309 6310 #define S_FW_PORT_TRACE_MMAP_CMD_CAPTUREMAX 0 6311 #define M_FW_PORT_TRACE_MMAP_CMD_CAPTUREMAX 0x3fff 6312 #define V_FW_PORT_TRACE_MMAP_CMD_CAPTUREMAX(x) \ 6313 ((x) << S_FW_PORT_TRACE_MMAP_CMD_CAPTUREMAX) 6314 #define G_FW_PORT_TRACE_MMAP_CMD_CAPTUREMAX(x) \ 6315 (((x) >> S_FW_PORT_TRACE_MMAP_CMD_CAPTUREMAX) & \ 6316 M_FW_PORT_TRACE_MMAP_CMD_CAPTUREMAX) 6317 6318 struct fw_rss_ind_tbl_cmd { 6319 __be32 op_to_viid; 6320 __be32 retval_len16; 6321 __be16 niqid; 6322 __be16 startidx; 6323 __be32 r3; 6324 __be32 iq0_to_iq2; 6325 __be32 iq3_to_iq5; 6326 __be32 iq6_to_iq8; 6327 __be32 iq9_to_iq11; 6328 __be32 iq12_to_iq14; 6329 __be32 iq15_to_iq17; 6330 __be32 iq18_to_iq20; 6331 __be32 iq21_to_iq23; 6332 __be32 iq24_to_iq26; 6333 __be32 iq27_to_iq29; 6334 __be32 iq30_iq31; 6335 __be32 r15_lo; 6336 }; 6337 6338 #define S_FW_RSS_IND_TBL_CMD_VIID 0 6339 #define M_FW_RSS_IND_TBL_CMD_VIID 0xfff 6340 #define V_FW_RSS_IND_TBL_CMD_VIID(x) ((x) << S_FW_RSS_IND_TBL_CMD_VIID) 6341 #define G_FW_RSS_IND_TBL_CMD_VIID(x) \ 6342 (((x) >> S_FW_RSS_IND_TBL_CMD_VIID) & M_FW_RSS_IND_TBL_CMD_VIID) 6343 6344 #define S_FW_RSS_IND_TBL_CMD_IQ0 20 6345 #define M_FW_RSS_IND_TBL_CMD_IQ0 0x3ff 6346 #define V_FW_RSS_IND_TBL_CMD_IQ0(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ0) 6347 #define G_FW_RSS_IND_TBL_CMD_IQ0(x) \ 6348 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ0) & M_FW_RSS_IND_TBL_CMD_IQ0) 6349 6350 #define S_FW_RSS_IND_TBL_CMD_IQ1 10 6351 #define M_FW_RSS_IND_TBL_CMD_IQ1 0x3ff 6352 #define V_FW_RSS_IND_TBL_CMD_IQ1(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ1) 6353 #define G_FW_RSS_IND_TBL_CMD_IQ1(x) \ 6354 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ1) & M_FW_RSS_IND_TBL_CMD_IQ1) 6355 6356 #define S_FW_RSS_IND_TBL_CMD_IQ2 0 6357 #define M_FW_RSS_IND_TBL_CMD_IQ2 0x3ff 6358 #define V_FW_RSS_IND_TBL_CMD_IQ2(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ2) 6359 #define G_FW_RSS_IND_TBL_CMD_IQ2(x) \ 6360 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ2) & M_FW_RSS_IND_TBL_CMD_IQ2) 6361 6362 #define S_FW_RSS_IND_TBL_CMD_IQ3 20 6363 #define M_FW_RSS_IND_TBL_CMD_IQ3 0x3ff 6364 #define V_FW_RSS_IND_TBL_CMD_IQ3(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ3) 6365 #define G_FW_RSS_IND_TBL_CMD_IQ3(x) \ 6366 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ3) & M_FW_RSS_IND_TBL_CMD_IQ3) 6367 6368 #define S_FW_RSS_IND_TBL_CMD_IQ4 10 6369 #define M_FW_RSS_IND_TBL_CMD_IQ4 0x3ff 6370 #define V_FW_RSS_IND_TBL_CMD_IQ4(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ4) 6371 #define G_FW_RSS_IND_TBL_CMD_IQ4(x) \ 6372 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ4) & M_FW_RSS_IND_TBL_CMD_IQ4) 6373 6374 #define S_FW_RSS_IND_TBL_CMD_IQ5 0 6375 #define M_FW_RSS_IND_TBL_CMD_IQ5 0x3ff 6376 #define V_FW_RSS_IND_TBL_CMD_IQ5(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ5) 6377 #define G_FW_RSS_IND_TBL_CMD_IQ5(x) \ 6378 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ5) & M_FW_RSS_IND_TBL_CMD_IQ5) 6379 6380 #define S_FW_RSS_IND_TBL_CMD_IQ6 20 6381 #define M_FW_RSS_IND_TBL_CMD_IQ6 0x3ff 6382 #define V_FW_RSS_IND_TBL_CMD_IQ6(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ6) 6383 #define G_FW_RSS_IND_TBL_CMD_IQ6(x) \ 6384 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ6) & M_FW_RSS_IND_TBL_CMD_IQ6) 6385 6386 #define S_FW_RSS_IND_TBL_CMD_IQ7 10 6387 #define M_FW_RSS_IND_TBL_CMD_IQ7 0x3ff 6388 #define V_FW_RSS_IND_TBL_CMD_IQ7(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ7) 6389 #define G_FW_RSS_IND_TBL_CMD_IQ7(x) \ 6390 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ7) & M_FW_RSS_IND_TBL_CMD_IQ7) 6391 6392 #define S_FW_RSS_IND_TBL_CMD_IQ8 0 6393 #define M_FW_RSS_IND_TBL_CMD_IQ8 0x3ff 6394 #define V_FW_RSS_IND_TBL_CMD_IQ8(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ8) 6395 #define G_FW_RSS_IND_TBL_CMD_IQ8(x) \ 6396 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ8) & M_FW_RSS_IND_TBL_CMD_IQ8) 6397 6398 #define S_FW_RSS_IND_TBL_CMD_IQ9 20 6399 #define M_FW_RSS_IND_TBL_CMD_IQ9 0x3ff 6400 #define V_FW_RSS_IND_TBL_CMD_IQ9(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ9) 6401 #define G_FW_RSS_IND_TBL_CMD_IQ9(x) \ 6402 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ9) & M_FW_RSS_IND_TBL_CMD_IQ9) 6403 6404 #define S_FW_RSS_IND_TBL_CMD_IQ10 10 6405 #define M_FW_RSS_IND_TBL_CMD_IQ10 0x3ff 6406 #define V_FW_RSS_IND_TBL_CMD_IQ10(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ10) 6407 #define G_FW_RSS_IND_TBL_CMD_IQ10(x) \ 6408 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ10) & M_FW_RSS_IND_TBL_CMD_IQ10) 6409 6410 #define S_FW_RSS_IND_TBL_CMD_IQ11 0 6411 #define M_FW_RSS_IND_TBL_CMD_IQ11 0x3ff 6412 #define V_FW_RSS_IND_TBL_CMD_IQ11(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ11) 6413 #define G_FW_RSS_IND_TBL_CMD_IQ11(x) \ 6414 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ11) & M_FW_RSS_IND_TBL_CMD_IQ11) 6415 6416 #define S_FW_RSS_IND_TBL_CMD_IQ12 20 6417 #define M_FW_RSS_IND_TBL_CMD_IQ12 0x3ff 6418 #define V_FW_RSS_IND_TBL_CMD_IQ12(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ12) 6419 #define G_FW_RSS_IND_TBL_CMD_IQ12(x) \ 6420 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ12) & M_FW_RSS_IND_TBL_CMD_IQ12) 6421 6422 #define S_FW_RSS_IND_TBL_CMD_IQ13 10 6423 #define M_FW_RSS_IND_TBL_CMD_IQ13 0x3ff 6424 #define V_FW_RSS_IND_TBL_CMD_IQ13(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ13) 6425 #define G_FW_RSS_IND_TBL_CMD_IQ13(x) \ 6426 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ13) & M_FW_RSS_IND_TBL_CMD_IQ13) 6427 6428 #define S_FW_RSS_IND_TBL_CMD_IQ14 0 6429 #define M_FW_RSS_IND_TBL_CMD_IQ14 0x3ff 6430 #define V_FW_RSS_IND_TBL_CMD_IQ14(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ14) 6431 #define G_FW_RSS_IND_TBL_CMD_IQ14(x) \ 6432 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ14) & M_FW_RSS_IND_TBL_CMD_IQ14) 6433 6434 #define S_FW_RSS_IND_TBL_CMD_IQ15 20 6435 #define M_FW_RSS_IND_TBL_CMD_IQ15 0x3ff 6436 #define V_FW_RSS_IND_TBL_CMD_IQ15(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ15) 6437 #define G_FW_RSS_IND_TBL_CMD_IQ15(x) \ 6438 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ15) & M_FW_RSS_IND_TBL_CMD_IQ15) 6439 6440 #define S_FW_RSS_IND_TBL_CMD_IQ16 10 6441 #define M_FW_RSS_IND_TBL_CMD_IQ16 0x3ff 6442 #define V_FW_RSS_IND_TBL_CMD_IQ16(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ16) 6443 #define G_FW_RSS_IND_TBL_CMD_IQ16(x) \ 6444 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ16) & M_FW_RSS_IND_TBL_CMD_IQ16) 6445 6446 #define S_FW_RSS_IND_TBL_CMD_IQ17 0 6447 #define M_FW_RSS_IND_TBL_CMD_IQ17 0x3ff 6448 #define V_FW_RSS_IND_TBL_CMD_IQ17(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ17) 6449 #define G_FW_RSS_IND_TBL_CMD_IQ17(x) \ 6450 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ17) & M_FW_RSS_IND_TBL_CMD_IQ17) 6451 6452 #define S_FW_RSS_IND_TBL_CMD_IQ18 20 6453 #define M_FW_RSS_IND_TBL_CMD_IQ18 0x3ff 6454 #define V_FW_RSS_IND_TBL_CMD_IQ18(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ18) 6455 #define G_FW_RSS_IND_TBL_CMD_IQ18(x) \ 6456 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ18) & M_FW_RSS_IND_TBL_CMD_IQ18) 6457 6458 #define S_FW_RSS_IND_TBL_CMD_IQ19 10 6459 #define M_FW_RSS_IND_TBL_CMD_IQ19 0x3ff 6460 #define V_FW_RSS_IND_TBL_CMD_IQ19(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ19) 6461 #define G_FW_RSS_IND_TBL_CMD_IQ19(x) \ 6462 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ19) & M_FW_RSS_IND_TBL_CMD_IQ19) 6463 6464 #define S_FW_RSS_IND_TBL_CMD_IQ20 0 6465 #define M_FW_RSS_IND_TBL_CMD_IQ20 0x3ff 6466 #define V_FW_RSS_IND_TBL_CMD_IQ20(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ20) 6467 #define G_FW_RSS_IND_TBL_CMD_IQ20(x) \ 6468 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ20) & M_FW_RSS_IND_TBL_CMD_IQ20) 6469 6470 #define S_FW_RSS_IND_TBL_CMD_IQ21 20 6471 #define M_FW_RSS_IND_TBL_CMD_IQ21 0x3ff 6472 #define V_FW_RSS_IND_TBL_CMD_IQ21(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ21) 6473 #define G_FW_RSS_IND_TBL_CMD_IQ21(x) \ 6474 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ21) & M_FW_RSS_IND_TBL_CMD_IQ21) 6475 6476 #define S_FW_RSS_IND_TBL_CMD_IQ22 10 6477 #define M_FW_RSS_IND_TBL_CMD_IQ22 0x3ff 6478 #define V_FW_RSS_IND_TBL_CMD_IQ22(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ22) 6479 #define G_FW_RSS_IND_TBL_CMD_IQ22(x) \ 6480 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ22) & M_FW_RSS_IND_TBL_CMD_IQ22) 6481 6482 #define S_FW_RSS_IND_TBL_CMD_IQ23 0 6483 #define M_FW_RSS_IND_TBL_CMD_IQ23 0x3ff 6484 #define V_FW_RSS_IND_TBL_CMD_IQ23(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ23) 6485 #define G_FW_RSS_IND_TBL_CMD_IQ23(x) \ 6486 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ23) & M_FW_RSS_IND_TBL_CMD_IQ23) 6487 6488 #define S_FW_RSS_IND_TBL_CMD_IQ24 20 6489 #define M_FW_RSS_IND_TBL_CMD_IQ24 0x3ff 6490 #define V_FW_RSS_IND_TBL_CMD_IQ24(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ24) 6491 #define G_FW_RSS_IND_TBL_CMD_IQ24(x) \ 6492 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ24) & M_FW_RSS_IND_TBL_CMD_IQ24) 6493 6494 #define S_FW_RSS_IND_TBL_CMD_IQ25 10 6495 #define M_FW_RSS_IND_TBL_CMD_IQ25 0x3ff 6496 #define V_FW_RSS_IND_TBL_CMD_IQ25(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ25) 6497 #define G_FW_RSS_IND_TBL_CMD_IQ25(x) \ 6498 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ25) & M_FW_RSS_IND_TBL_CMD_IQ25) 6499 6500 #define S_FW_RSS_IND_TBL_CMD_IQ26 0 6501 #define M_FW_RSS_IND_TBL_CMD_IQ26 0x3ff 6502 #define V_FW_RSS_IND_TBL_CMD_IQ26(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ26) 6503 #define G_FW_RSS_IND_TBL_CMD_IQ26(x) \ 6504 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ26) & M_FW_RSS_IND_TBL_CMD_IQ26) 6505 6506 #define S_FW_RSS_IND_TBL_CMD_IQ27 20 6507 #define M_FW_RSS_IND_TBL_CMD_IQ27 0x3ff 6508 #define V_FW_RSS_IND_TBL_CMD_IQ27(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ27) 6509 #define G_FW_RSS_IND_TBL_CMD_IQ27(x) \ 6510 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ27) & M_FW_RSS_IND_TBL_CMD_IQ27) 6511 6512 #define S_FW_RSS_IND_TBL_CMD_IQ28 10 6513 #define M_FW_RSS_IND_TBL_CMD_IQ28 0x3ff 6514 #define V_FW_RSS_IND_TBL_CMD_IQ28(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ28) 6515 #define G_FW_RSS_IND_TBL_CMD_IQ28(x) \ 6516 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ28) & M_FW_RSS_IND_TBL_CMD_IQ28) 6517 6518 #define S_FW_RSS_IND_TBL_CMD_IQ29 0 6519 #define M_FW_RSS_IND_TBL_CMD_IQ29 0x3ff 6520 #define V_FW_RSS_IND_TBL_CMD_IQ29(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ29) 6521 #define G_FW_RSS_IND_TBL_CMD_IQ29(x) \ 6522 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ29) & M_FW_RSS_IND_TBL_CMD_IQ29) 6523 6524 #define S_FW_RSS_IND_TBL_CMD_IQ30 20 6525 #define M_FW_RSS_IND_TBL_CMD_IQ30 0x3ff 6526 #define V_FW_RSS_IND_TBL_CMD_IQ30(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ30) 6527 #define G_FW_RSS_IND_TBL_CMD_IQ30(x) \ 6528 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ30) & M_FW_RSS_IND_TBL_CMD_IQ30) 6529 6530 #define S_FW_RSS_IND_TBL_CMD_IQ31 10 6531 #define M_FW_RSS_IND_TBL_CMD_IQ31 0x3ff 6532 #define V_FW_RSS_IND_TBL_CMD_IQ31(x) ((x) << S_FW_RSS_IND_TBL_CMD_IQ31) 6533 #define G_FW_RSS_IND_TBL_CMD_IQ31(x) \ 6534 (((x) >> S_FW_RSS_IND_TBL_CMD_IQ31) & M_FW_RSS_IND_TBL_CMD_IQ31) 6535 6536 struct fw_rss_glb_config_cmd { 6537 __be32 op_to_write; 6538 __be32 retval_len16; 6539 union fw_rss_glb_config { 6540 struct fw_rss_glb_config_manual { 6541 __be32 mode_pkd; 6542 __be32 r3; 6543 __be64 r4; 6544 __be64 r5; 6545 } manual; 6546 struct fw_rss_glb_config_basicvirtual { 6547 __be32 mode_pkd; 6548 __be32 synmapen_to_hashtoeplitz; 6549 __be64 r8; 6550 __be64 r9; 6551 } basicvirtual; 6552 } u; 6553 }; 6554 6555 #define S_FW_RSS_GLB_CONFIG_CMD_MODE 28 6556 #define M_FW_RSS_GLB_CONFIG_CMD_MODE 0xf 6557 #define V_FW_RSS_GLB_CONFIG_CMD_MODE(x) ((x) << S_FW_RSS_GLB_CONFIG_CMD_MODE) 6558 #define G_FW_RSS_GLB_CONFIG_CMD_MODE(x) \ 6559 (((x) >> S_FW_RSS_GLB_CONFIG_CMD_MODE) & M_FW_RSS_GLB_CONFIG_CMD_MODE) 6560 6561 #define FW_RSS_GLB_CONFIG_CMD_MODE_MANUAL 0 6562 #define FW_RSS_GLB_CONFIG_CMD_MODE_BASICVIRTUAL 1 6563 #define FW_RSS_GLB_CONFIG_CMD_MODE_MAX 1 6564 6565 #define S_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN 8 6566 #define M_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN 0x1 6567 #define V_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN(x) \ 6568 ((x) << S_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN) 6569 #define G_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN(x) \ 6570 (((x) >> S_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN) & \ 6571 M_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN) 6572 #define F_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN \ 6573 V_FW_RSS_GLB_CONFIG_CMD_SYNMAPEN(1U) 6574 6575 #define S_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6 7 6576 #define M_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6 0x1 6577 #define V_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6(x) \ 6578 ((x) << S_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6) 6579 #define G_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6(x) \ 6580 (((x) >> S_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6) & \ 6581 M_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6) 6582 #define F_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6 \ 6583 V_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6(1U) 6584 6585 #define S_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6 6 6586 #define M_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6 0x1 6587 #define V_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6(x) \ 6588 ((x) << S_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6) 6589 #define G_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6(x) \ 6590 (((x) >> S_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6) & \ 6591 M_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6) 6592 #define F_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6 \ 6593 V_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6(1U) 6594 6595 #define S_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4 5 6596 #define M_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4 0x1 6597 #define V_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4(x) \ 6598 ((x) << S_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4) 6599 #define G_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4(x) \ 6600 (((x) >> S_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4) & \ 6601 M_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4) 6602 #define F_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4 \ 6603 V_FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4(1U) 6604 6605 #define S_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4 4 6606 #define M_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4 0x1 6607 #define V_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4(x) \ 6608 ((x) << S_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4) 6609 #define G_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4(x) \ 6610 (((x) >> S_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4) & \ 6611 M_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4) 6612 #define F_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4 \ 6613 V_FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4(1U) 6614 6615 #define S_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN 3 6616 #define M_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN 0x1 6617 #define V_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN(x) \ 6618 ((x) << S_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN) 6619 #define G_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN(x) \ 6620 (((x) >> S_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN) & \ 6621 M_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN) 6622 #define F_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN \ 6623 V_FW_RSS_GLB_CONFIG_CMD_OFDMAPEN(1U) 6624 6625 #define S_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN 2 6626 #define M_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN 0x1 6627 #define V_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN(x) \ 6628 ((x) << S_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN) 6629 #define G_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN(x) \ 6630 (((x) >> S_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN) & \ 6631 M_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN) 6632 #define F_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN \ 6633 V_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN(1U) 6634 6635 #define S_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP 1 6636 #define M_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP 0x1 6637 #define V_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP(x) \ 6638 ((x) << S_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP) 6639 #define G_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP(x) \ 6640 (((x) >> S_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP) & \ 6641 M_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP) 6642 #define F_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP \ 6643 V_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP(1U) 6644 6645 #define S_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ 0 6646 #define M_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ 0x1 6647 #define V_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ(x) \ 6648 ((x) << S_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ) 6649 #define G_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ(x) \ 6650 (((x) >> S_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ) & \ 6651 M_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ) 6652 #define F_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ \ 6653 V_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ(1U) 6654 6655 struct fw_rss_vi_config_cmd { 6656 __be32 op_to_viid; 6657 __be32 retval_len16; 6658 union fw_rss_vi_config { 6659 struct fw_rss_vi_config_manual { 6660 __be64 r3; 6661 __be64 r4; 6662 __be64 r5; 6663 } manual; 6664 struct fw_rss_vi_config_basicvirtual { 6665 __be32 r6; 6666 __be32 defaultq_to_udpen; 6667 __be64 r9; 6668 __be64 r10; 6669 } basicvirtual; 6670 } u; 6671 }; 6672 6673 #define S_FW_RSS_VI_CONFIG_CMD_VIID 0 6674 #define M_FW_RSS_VI_CONFIG_CMD_VIID 0xfff 6675 #define V_FW_RSS_VI_CONFIG_CMD_VIID(x) ((x) << S_FW_RSS_VI_CONFIG_CMD_VIID) 6676 #define G_FW_RSS_VI_CONFIG_CMD_VIID(x) \ 6677 (((x) >> S_FW_RSS_VI_CONFIG_CMD_VIID) & M_FW_RSS_VI_CONFIG_CMD_VIID) 6678 6679 #define S_FW_RSS_VI_CONFIG_CMD_DEFAULTQ 16 6680 #define M_FW_RSS_VI_CONFIG_CMD_DEFAULTQ 0x3ff 6681 #define V_FW_RSS_VI_CONFIG_CMD_DEFAULTQ(x) \ 6682 ((x) << S_FW_RSS_VI_CONFIG_CMD_DEFAULTQ) 6683 #define G_FW_RSS_VI_CONFIG_CMD_DEFAULTQ(x) \ 6684 (((x) >> S_FW_RSS_VI_CONFIG_CMD_DEFAULTQ) & \ 6685 M_FW_RSS_VI_CONFIG_CMD_DEFAULTQ) 6686 6687 #define S_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN 4 6688 #define M_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN 0x1 6689 #define V_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN(x) \ 6690 ((x) << S_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN) 6691 #define G_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN(x) \ 6692 (((x) >> S_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN) & \ 6693 M_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN) 6694 #define F_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN \ 6695 V_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN(1U) 6696 6697 #define S_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN 3 6698 #define M_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN 0x1 6699 #define V_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN(x) \ 6700 ((x) << S_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN) 6701 #define G_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN(x) \ 6702 (((x) >> S_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN) & \ 6703 M_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN) 6704 #define F_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN \ 6705 V_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN(1U) 6706 6707 #define S_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN 2 6708 #define M_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN 0x1 6709 #define V_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN(x) \ 6710 ((x) << S_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN) 6711 #define G_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN(x) \ 6712 (((x) >> S_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN) & \ 6713 M_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN) 6714 #define F_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN \ 6715 V_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN(1U) 6716 6717 #define S_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN 1 6718 #define M_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN 0x1 6719 #define V_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN(x) \ 6720 ((x) << S_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN) 6721 #define G_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN(x) \ 6722 (((x) >> S_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN) & \ 6723 M_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN) 6724 #define F_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN \ 6725 V_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN(1U) 6726 6727 #define S_FW_RSS_VI_CONFIG_CMD_UDPEN 0 6728 #define M_FW_RSS_VI_CONFIG_CMD_UDPEN 0x1 6729 #define V_FW_RSS_VI_CONFIG_CMD_UDPEN(x) ((x) << S_FW_RSS_VI_CONFIG_CMD_UDPEN) 6730 #define G_FW_RSS_VI_CONFIG_CMD_UDPEN(x) \ 6731 (((x) >> S_FW_RSS_VI_CONFIG_CMD_UDPEN) & M_FW_RSS_VI_CONFIG_CMD_UDPEN) 6732 #define F_FW_RSS_VI_CONFIG_CMD_UDPEN V_FW_RSS_VI_CONFIG_CMD_UDPEN(1U) 6733 6734 enum fw_sched_sc { 6735 FW_SCHED_SC_CONFIG = 0, 6736 FW_SCHED_SC_PARAMS = 1, 6737 }; 6738 6739 enum fw_sched_type { 6740 FW_SCHED_TYPE_PKTSCHED = 0, 6741 FW_SCHED_TYPE_STREAMSCHED = 1, 6742 }; 6743 6744 enum fw_sched_params_level { 6745 FW_SCHED_PARAMS_LEVEL_CL_RL = 0, 6746 FW_SCHED_PARAMS_LEVEL_CL_WRR = 1, 6747 FW_SCHED_PARAMS_LEVEL_CH_RL = 2, 6748 }; 6749 6750 enum fw_sched_params_mode { 6751 FW_SCHED_PARAMS_MODE_CLASS = 0, 6752 FW_SCHED_PARAMS_MODE_FLOW = 1, 6753 }; 6754 6755 enum fw_sched_params_unit { 6756 FW_SCHED_PARAMS_UNIT_BITRATE = 0, 6757 FW_SCHED_PARAMS_UNIT_PKTRATE = 1, 6758 }; 6759 6760 enum fw_sched_params_rate { 6761 FW_SCHED_PARAMS_RATE_REL = 0, 6762 FW_SCHED_PARAMS_RATE_ABS = 1, 6763 }; 6764 6765 struct fw_sched_cmd { 6766 __be32 op_to_write; 6767 __be32 retval_len16; 6768 union fw_sched { 6769 struct fw_sched_config { 6770 __u8 sc; 6771 __u8 type; 6772 __u8 minmaxen; 6773 __u8 r3[5]; 6774 __u8 nclasses[4]; 6775 __be32 r4; 6776 } config; 6777 struct fw_sched_params { 6778 __u8 sc; 6779 __u8 type; 6780 __u8 level; 6781 __u8 mode; 6782 __u8 unit; 6783 __u8 rate; 6784 __u8 ch; 6785 __u8 cl; 6786 __be32 min; 6787 __be32 max; 6788 __be16 weight; 6789 __be16 pktsize; 6790 __be16 burstsize; 6791 __be16 r4; 6792 } params; 6793 } u; 6794 }; 6795 6796 /* 6797 * length of the formatting string 6798 */ 6799 #define FW_DEVLOG_FMT_LEN 192 6800 6801 /* 6802 * maximum number of the formatting string parameters 6803 */ 6804 #define FW_DEVLOG_FMT_PARAMS_NUM 8 6805 6806 /* 6807 * priority levels 6808 */ 6809 enum fw_devlog_level { 6810 FW_DEVLOG_LEVEL_EMERG = 0x0, 6811 FW_DEVLOG_LEVEL_CRIT = 0x1, 6812 FW_DEVLOG_LEVEL_ERR = 0x2, 6813 FW_DEVLOG_LEVEL_NOTICE = 0x3, 6814 FW_DEVLOG_LEVEL_INFO = 0x4, 6815 FW_DEVLOG_LEVEL_DEBUG = 0x5, 6816 FW_DEVLOG_LEVEL_MAX = 0x5, 6817 }; 6818 6819 /* 6820 * facilities that may send a log message 6821 */ 6822 enum fw_devlog_facility { 6823 FW_DEVLOG_FACILITY_CORE = 0x00, 6824 FW_DEVLOG_FACILITY_CF = 0x01, 6825 FW_DEVLOG_FACILITY_SCHED = 0x02, 6826 FW_DEVLOG_FACILITY_TIMER = 0x04, 6827 FW_DEVLOG_FACILITY_RES = 0x06, 6828 FW_DEVLOG_FACILITY_HW = 0x08, 6829 FW_DEVLOG_FACILITY_FLR = 0x10, 6830 FW_DEVLOG_FACILITY_DMAQ = 0x12, 6831 FW_DEVLOG_FACILITY_PHY = 0x14, 6832 FW_DEVLOG_FACILITY_MAC = 0x16, 6833 FW_DEVLOG_FACILITY_PORT = 0x18, 6834 FW_DEVLOG_FACILITY_VI = 0x1A, 6835 FW_DEVLOG_FACILITY_FILTER = 0x1C, 6836 FW_DEVLOG_FACILITY_ACL = 0x1E, 6837 FW_DEVLOG_FACILITY_TM = 0x20, 6838 FW_DEVLOG_FACILITY_QFC = 0x22, 6839 FW_DEVLOG_FACILITY_DCB = 0x24, 6840 FW_DEVLOG_FACILITY_ETH = 0x26, 6841 FW_DEVLOG_FACILITY_OFLD = 0x28, 6842 FW_DEVLOG_FACILITY_RI = 0x2A, 6843 FW_DEVLOG_FACILITY_ISCSI = 0x2C, 6844 FW_DEVLOG_FACILITY_FCOE = 0x2E, 6845 FW_DEVLOG_FACILITY_FOISCSI = 0x30, 6846 FW_DEVLOG_FACILITY_FOFCOE = 0x32, 6847 FW_DEVLOG_FACILITY_MAX = 0x32, 6848 }; 6849 6850 /* 6851 * log message format 6852 */ 6853 struct fw_devlog_e { 6854 __be64 timestamp; 6855 __be32 seqno; 6856 __be16 reserved1; 6857 __u8 level; 6858 __u8 facility; 6859 __u8 fmt[FW_DEVLOG_FMT_LEN]; 6860 __be32 params[FW_DEVLOG_FMT_PARAMS_NUM]; 6861 __be32 reserved3[4]; 6862 }; 6863 6864 struct fw_devlog_cmd { 6865 __be32 op_to_write; 6866 __be32 retval_len16; 6867 __u8 level; 6868 __u8 r2[7]; 6869 __be32 memtype_devlog_memaddr16_devlog; 6870 __be32 memsize_devlog; 6871 __be32 r3[2]; 6872 }; 6873 6874 #define S_FW_DEVLOG_CMD_MEMTYPE_DEVLOG 28 6875 #define M_FW_DEVLOG_CMD_MEMTYPE_DEVLOG 0xf 6876 #define V_FW_DEVLOG_CMD_MEMTYPE_DEVLOG(x) \ 6877 ((x) << S_FW_DEVLOG_CMD_MEMTYPE_DEVLOG) 6878 #define G_FW_DEVLOG_CMD_MEMTYPE_DEVLOG(x) \ 6879 (((x) >> S_FW_DEVLOG_CMD_MEMTYPE_DEVLOG) & M_FW_DEVLOG_CMD_MEMTYPE_DEVLOG) 6880 6881 #define S_FW_DEVLOG_CMD_MEMADDR16_DEVLOG 0 6882 #define M_FW_DEVLOG_CMD_MEMADDR16_DEVLOG 0xfffffff 6883 #define V_FW_DEVLOG_CMD_MEMADDR16_DEVLOG(x) \ 6884 ((x) << S_FW_DEVLOG_CMD_MEMADDR16_DEVLOG) 6885 #define G_FW_DEVLOG_CMD_MEMADDR16_DEVLOG(x) \ 6886 (((x) >> S_FW_DEVLOG_CMD_MEMADDR16_DEVLOG) & \ 6887 M_FW_DEVLOG_CMD_MEMADDR16_DEVLOG) 6888 6889 enum fw_watchdog_actions { 6890 FW_WATCHDOG_ACTION_SHUTDOWN = 0, 6891 FW_WATCHDOG_ACTION_FLR = 1, 6892 FW_WATCHDOG_ACTION_BYPASS = 2, 6893 FW_WATCHDOG_ACTION_TMPCHK = 3, 6894 6895 FW_WATCHDOG_ACTION_MAX = 4, 6896 }; 6897 6898 #define FW_WATCHDOG_MAX_TIMEOUT_SECS 60 6899 6900 struct fw_watchdog_cmd { 6901 __be32 op_to_vfn; 6902 __be32 retval_len16; 6903 __be32 timeout; 6904 __be32 action; 6905 }; 6906 6907 #define S_FW_WATCHDOG_CMD_PFN 8 6908 #define M_FW_WATCHDOG_CMD_PFN 0x7 6909 #define V_FW_WATCHDOG_CMD_PFN(x) ((x) << S_FW_WATCHDOG_CMD_PFN) 6910 #define G_FW_WATCHDOG_CMD_PFN(x) \ 6911 (((x) >> S_FW_WATCHDOG_CMD_PFN) & M_FW_WATCHDOG_CMD_PFN) 6912 6913 #define S_FW_WATCHDOG_CMD_VFN 0 6914 #define M_FW_WATCHDOG_CMD_VFN 0xff 6915 #define V_FW_WATCHDOG_CMD_VFN(x) ((x) << S_FW_WATCHDOG_CMD_VFN) 6916 #define G_FW_WATCHDOG_CMD_VFN(x) \ 6917 (((x) >> S_FW_WATCHDOG_CMD_VFN) & M_FW_WATCHDOG_CMD_VFN) 6918 6919 struct fw_clip_cmd { 6920 __be32 op_to_write; 6921 __be32 alloc_to_len16; 6922 __be64 ip_hi; 6923 __be64 ip_lo; 6924 __be32 r4[2]; 6925 }; 6926 6927 #define S_FW_CLIP_CMD_ALLOC 31 6928 #define M_FW_CLIP_CMD_ALLOC 0x1 6929 #define V_FW_CLIP_CMD_ALLOC(x) ((x) << S_FW_CLIP_CMD_ALLOC) 6930 #define G_FW_CLIP_CMD_ALLOC(x) \ 6931 (((x) >> S_FW_CLIP_CMD_ALLOC) & M_FW_CLIP_CMD_ALLOC) 6932 #define F_FW_CLIP_CMD_ALLOC V_FW_CLIP_CMD_ALLOC(1U) 6933 6934 #define S_FW_CLIP_CMD_FREE 30 6935 #define M_FW_CLIP_CMD_FREE 0x1 6936 #define V_FW_CLIP_CMD_FREE(x) ((x) << S_FW_CLIP_CMD_FREE) 6937 #define G_FW_CLIP_CMD_FREE(x) \ 6938 (((x) >> S_FW_CLIP_CMD_FREE) & M_FW_CLIP_CMD_FREE) 6939 #define F_FW_CLIP_CMD_FREE V_FW_CLIP_CMD_FREE(1U) 6940 6941 /****************************************************************************** 6942 * F O i S C S I C O M M A N D s 6943 **************************************/ 6944 6945 #define FW_CHNET_IFACE_ADDR_MAX 3 6946 6947 enum fw_chnet_iface_cmd_subop { 6948 FW_CHNET_IFACE_CMD_SUBOP_NOOP = 0, 6949 6950 FW_CHNET_IFACE_CMD_SUBOP_LINK_UP, 6951 FW_CHNET_IFACE_CMD_SUBOP_LINK_DOWN, 6952 6953 FW_CHNET_IFACE_CMD_SUBOP_MTU_SET, 6954 FW_CHNET_IFACE_CMD_SUBOP_MTU_GET, 6955 6956 FW_CHNET_IFACE_CMD_SUBOP_MAX, 6957 }; 6958 6959 struct fw_chnet_iface_cmd { 6960 __be32 op_to_portid; 6961 __be32 retval_len16; 6962 __u8 subop; 6963 __u8 r2[3]; 6964 __be32 ifid_ifstate; 6965 __be16 mtu; 6966 __be16 vlanid; 6967 __be32 r3; 6968 __be16 r4; 6969 __u8 mac[6]; 6970 }; 6971 6972 #define S_FW_CHNET_IFACE_CMD_PORTID 0 6973 #define M_FW_CHNET_IFACE_CMD_PORTID 0xf 6974 #define V_FW_CHNET_IFACE_CMD_PORTID(x) ((x) << S_FW_CHNET_IFACE_CMD_PORTID) 6975 #define G_FW_CHNET_IFACE_CMD_PORTID(x) \ 6976 (((x) >> S_FW_CHNET_IFACE_CMD_PORTID) & M_FW_CHNET_IFACE_CMD_PORTID) 6977 6978 #define S_FW_CHNET_IFACE_CMD_IFID 8 6979 #define M_FW_CHNET_IFACE_CMD_IFID 0xffffff 6980 #define V_FW_CHNET_IFACE_CMD_IFID(x) ((x) << S_FW_CHNET_IFACE_CMD_IFID) 6981 #define G_FW_CHNET_IFACE_CMD_IFID(x) \ 6982 (((x) >> S_FW_CHNET_IFACE_CMD_IFID) & M_FW_CHNET_IFACE_CMD_IFID) 6983 6984 #define S_FW_CHNET_IFACE_CMD_IFSTATE 0 6985 #define M_FW_CHNET_IFACE_CMD_IFSTATE 0xff 6986 #define V_FW_CHNET_IFACE_CMD_IFSTATE(x) ((x) << S_FW_CHNET_IFACE_CMD_IFSTATE) 6987 #define G_FW_CHNET_IFACE_CMD_IFSTATE(x) \ 6988 (((x) >> S_FW_CHNET_IFACE_CMD_IFSTATE) & M_FW_CHNET_IFACE_CMD_IFSTATE) 6989 6990 /****************************************************************************** 6991 * F O F C O E C O M M A N D s 6992 ************************************/ 6993 6994 struct fw_fcoe_res_info_cmd { 6995 __be32 op_to_read; 6996 __be32 retval_len16; 6997 __be16 e_d_tov; 6998 __be16 r_a_tov_seq; 6999 __be16 r_a_tov_els; 7000 __be16 r_r_tov; 7001 __be32 max_xchgs; 7002 __be32 max_ssns; 7003 __be32 used_xchgs; 7004 __be32 used_ssns; 7005 __be32 max_fcfs; 7006 __be32 max_vnps; 7007 __be32 used_fcfs; 7008 __be32 used_vnps; 7009 }; 7010 7011 struct fw_fcoe_link_cmd { 7012 __be32 op_to_portid; 7013 __be32 retval_len16; 7014 __be32 sub_opcode_fcfi; 7015 __u8 r3; 7016 __u8 lstatus; 7017 __be16 flags; 7018 __u8 r4; 7019 __u8 set_vlan; 7020 __be16 vlan_id; 7021 __be32 vnpi_pkd; 7022 __be16 r6; 7023 __u8 phy_mac[6]; 7024 __u8 vnport_wwnn[8]; 7025 __u8 vnport_wwpn[8]; 7026 }; 7027 7028 #define S_FW_FCOE_LINK_CMD_PORTID 0 7029 #define M_FW_FCOE_LINK_CMD_PORTID 0xf 7030 #define V_FW_FCOE_LINK_CMD_PORTID(x) ((x) << S_FW_FCOE_LINK_CMD_PORTID) 7031 #define G_FW_FCOE_LINK_CMD_PORTID(x) \ 7032 (((x) >> S_FW_FCOE_LINK_CMD_PORTID) & M_FW_FCOE_LINK_CMD_PORTID) 7033 7034 #define S_FW_FCOE_LINK_CMD_SUB_OPCODE 24 7035 #define M_FW_FCOE_LINK_CMD_SUB_OPCODE 0xff 7036 #define V_FW_FCOE_LINK_CMD_SUB_OPCODE(x) \ 7037 ((x) << S_FW_FCOE_LINK_CMD_SUB_OPCODE) 7038 #define G_FW_FCOE_LINK_CMD_SUB_OPCODE(x) \ 7039 (((x) >> S_FW_FCOE_LINK_CMD_SUB_OPCODE) & M_FW_FCOE_LINK_CMD_SUB_OPCODE) 7040 7041 #define S_FW_FCOE_LINK_CMD_FCFI 0 7042 #define M_FW_FCOE_LINK_CMD_FCFI 0xffffff 7043 #define V_FW_FCOE_LINK_CMD_FCFI(x) ((x) << S_FW_FCOE_LINK_CMD_FCFI) 7044 #define G_FW_FCOE_LINK_CMD_FCFI(x) \ 7045 (((x) >> S_FW_FCOE_LINK_CMD_FCFI) & M_FW_FCOE_LINK_CMD_FCFI) 7046 7047 #define S_FW_FCOE_LINK_CMD_VNPI 0 7048 #define M_FW_FCOE_LINK_CMD_VNPI 0xfffff 7049 #define V_FW_FCOE_LINK_CMD_VNPI(x) ((x) << S_FW_FCOE_LINK_CMD_VNPI) 7050 #define G_FW_FCOE_LINK_CMD_VNPI(x) \ 7051 (((x) >> S_FW_FCOE_LINK_CMD_VNPI) & M_FW_FCOE_LINK_CMD_VNPI) 7052 7053 struct fw_fcoe_vnp_cmd { 7054 __be32 op_to_fcfi; 7055 __be32 alloc_to_len16; 7056 __be32 gen_wwn_to_vnpi; 7057 __be32 vf_id; 7058 __be16 iqid; 7059 __u8 vnport_mac[6]; 7060 __u8 vnport_wwnn[8]; 7061 __u8 vnport_wwpn[8]; 7062 __u8 cmn_srv_parms[16]; 7063 __u8 clsp_word_0_1[8]; 7064 }; 7065 7066 #define S_FW_FCOE_VNP_CMD_FCFI 0 7067 #define M_FW_FCOE_VNP_CMD_FCFI 0xfffff 7068 #define V_FW_FCOE_VNP_CMD_FCFI(x) ((x) << S_FW_FCOE_VNP_CMD_FCFI) 7069 #define G_FW_FCOE_VNP_CMD_FCFI(x) \ 7070 (((x) >> S_FW_FCOE_VNP_CMD_FCFI) & M_FW_FCOE_VNP_CMD_FCFI) 7071 7072 #define S_FW_FCOE_VNP_CMD_ALLOC 31 7073 #define M_FW_FCOE_VNP_CMD_ALLOC 0x1 7074 #define V_FW_FCOE_VNP_CMD_ALLOC(x) ((x) << S_FW_FCOE_VNP_CMD_ALLOC) 7075 #define G_FW_FCOE_VNP_CMD_ALLOC(x) \ 7076 (((x) >> S_FW_FCOE_VNP_CMD_ALLOC) & M_FW_FCOE_VNP_CMD_ALLOC) 7077 #define F_FW_FCOE_VNP_CMD_ALLOC V_FW_FCOE_VNP_CMD_ALLOC(1U) 7078 7079 #define S_FW_FCOE_VNP_CMD_FREE 30 7080 #define M_FW_FCOE_VNP_CMD_FREE 0x1 7081 #define V_FW_FCOE_VNP_CMD_FREE(x) ((x) << S_FW_FCOE_VNP_CMD_FREE) 7082 #define G_FW_FCOE_VNP_CMD_FREE(x) \ 7083 (((x) >> S_FW_FCOE_VNP_CMD_FREE) & M_FW_FCOE_VNP_CMD_FREE) 7084 #define F_FW_FCOE_VNP_CMD_FREE V_FW_FCOE_VNP_CMD_FREE(1U) 7085 7086 #define S_FW_FCOE_VNP_CMD_MODIFY 29 7087 #define M_FW_FCOE_VNP_CMD_MODIFY 0x1 7088 #define V_FW_FCOE_VNP_CMD_MODIFY(x) ((x) << S_FW_FCOE_VNP_CMD_MODIFY) 7089 #define G_FW_FCOE_VNP_CMD_MODIFY(x) \ 7090 (((x) >> S_FW_FCOE_VNP_CMD_MODIFY) & M_FW_FCOE_VNP_CMD_MODIFY) 7091 #define F_FW_FCOE_VNP_CMD_MODIFY V_FW_FCOE_VNP_CMD_MODIFY(1U) 7092 7093 #define S_FW_FCOE_VNP_CMD_GEN_WWN 22 7094 #define M_FW_FCOE_VNP_CMD_GEN_WWN 0x1 7095 #define V_FW_FCOE_VNP_CMD_GEN_WWN(x) ((x) << S_FW_FCOE_VNP_CMD_GEN_WWN) 7096 #define G_FW_FCOE_VNP_CMD_GEN_WWN(x) \ 7097 (((x) >> S_FW_FCOE_VNP_CMD_GEN_WWN) & M_FW_FCOE_VNP_CMD_GEN_WWN) 7098 #define F_FW_FCOE_VNP_CMD_GEN_WWN V_FW_FCOE_VNP_CMD_GEN_WWN(1U) 7099 7100 #define S_FW_FCOE_VNP_CMD_PERSIST 21 7101 #define M_FW_FCOE_VNP_CMD_PERSIST 0x1 7102 #define V_FW_FCOE_VNP_CMD_PERSIST(x) ((x) << S_FW_FCOE_VNP_CMD_PERSIST) 7103 #define G_FW_FCOE_VNP_CMD_PERSIST(x) \ 7104 (((x) >> S_FW_FCOE_VNP_CMD_PERSIST) & M_FW_FCOE_VNP_CMD_PERSIST) 7105 #define F_FW_FCOE_VNP_CMD_PERSIST V_FW_FCOE_VNP_CMD_PERSIST(1U) 7106 7107 #define S_FW_FCOE_VNP_CMD_VFID_EN 20 7108 #define M_FW_FCOE_VNP_CMD_VFID_EN 0x1 7109 #define V_FW_FCOE_VNP_CMD_VFID_EN(x) ((x) << S_FW_FCOE_VNP_CMD_VFID_EN) 7110 #define G_FW_FCOE_VNP_CMD_VFID_EN(x) \ 7111 (((x) >> S_FW_FCOE_VNP_CMD_VFID_EN) & M_FW_FCOE_VNP_CMD_VFID_EN) 7112 #define F_FW_FCOE_VNP_CMD_VFID_EN V_FW_FCOE_VNP_CMD_VFID_EN(1U) 7113 7114 #define S_FW_FCOE_VNP_CMD_VNPI 0 7115 #define M_FW_FCOE_VNP_CMD_VNPI 0xfffff 7116 #define V_FW_FCOE_VNP_CMD_VNPI(x) ((x) << S_FW_FCOE_VNP_CMD_VNPI) 7117 #define G_FW_FCOE_VNP_CMD_VNPI(x) \ 7118 (((x) >> S_FW_FCOE_VNP_CMD_VNPI) & M_FW_FCOE_VNP_CMD_VNPI) 7119 7120 struct fw_fcoe_sparams_cmd { 7121 __be32 op_to_portid; 7122 __be32 retval_len16; 7123 __u8 r3[7]; 7124 __u8 cos; 7125 __u8 lport_wwnn[8]; 7126 __u8 lport_wwpn[8]; 7127 __u8 cmn_srv_parms[16]; 7128 __u8 cls_srv_parms[16]; 7129 }; 7130 7131 #define S_FW_FCOE_SPARAMS_CMD_PORTID 0 7132 #define M_FW_FCOE_SPARAMS_CMD_PORTID 0xf 7133 #define V_FW_FCOE_SPARAMS_CMD_PORTID(x) ((x) << S_FW_FCOE_SPARAMS_CMD_PORTID) 7134 #define G_FW_FCOE_SPARAMS_CMD_PORTID(x) \ 7135 (((x) >> S_FW_FCOE_SPARAMS_CMD_PORTID) & M_FW_FCOE_SPARAMS_CMD_PORTID) 7136 7137 struct fw_fcoe_stats_cmd { 7138 __be32 op_to_flowid; 7139 __be32 free_to_len16; 7140 union fw_fcoe_stats { 7141 struct fw_fcoe_stats_ctl { 7142 __u8 nstats_port; 7143 __u8 port_valid_ix; 7144 __be16 r6; 7145 __be32 r7; 7146 __be64 stat0; 7147 __be64 stat1; 7148 __be64 stat2; 7149 __be64 stat3; 7150 __be64 stat4; 7151 __be64 stat5; 7152 } ctl; 7153 struct fw_fcoe_port_stats { 7154 __be64 tx_bcast_bytes; 7155 __be64 tx_bcast_frames; 7156 __be64 tx_mcast_bytes; 7157 __be64 tx_mcast_frames; 7158 __be64 tx_ucast_bytes; 7159 __be64 tx_ucast_frames; 7160 __be64 tx_drop_frames; 7161 __be64 tx_offload_bytes; 7162 __be64 tx_offload_frames; 7163 __be64 rx_bcast_bytes; 7164 __be64 rx_bcast_frames; 7165 __be64 rx_mcast_bytes; 7166 __be64 rx_mcast_frames; 7167 __be64 rx_ucast_bytes; 7168 __be64 rx_ucast_frames; 7169 __be64 rx_err_frames; 7170 } port_stats; 7171 struct fw_fcoe_fcf_stats { 7172 __be32 fip_tx_bytes; 7173 __be32 fip_tx_fr; 7174 __be64 fcf_ka; 7175 __be64 mcast_adv_rcvd; 7176 __be16 ucast_adv_rcvd; 7177 __be16 sol_sent; 7178 __be16 vlan_req; 7179 __be16 vlan_rpl; 7180 __be16 clr_vlink; 7181 __be16 link_down; 7182 __be16 link_up; 7183 __be16 logo; 7184 __be16 flogi_req; 7185 __be16 flogi_rpl; 7186 __be16 fdisc_req; 7187 __be16 fdisc_rpl; 7188 __be16 fka_prd_chg; 7189 __be16 fc_map_chg; 7190 __be16 vfid_chg; 7191 __u8 no_fka_req; 7192 __u8 no_vnp; 7193 } fcf_stats; 7194 struct fw_fcoe_pcb_stats { 7195 __be64 tx_bytes; 7196 __be64 tx_frames; 7197 __be64 rx_bytes; 7198 __be64 rx_frames; 7199 __be32 vnp_ka; 7200 __be32 unsol_els_rcvd; 7201 __be64 unsol_cmd_rcvd; 7202 __be16 implicit_logo; 7203 __be16 flogi_inv_sparm; 7204 __be16 fdisc_inv_sparm; 7205 __be16 flogi_rjt; 7206 __be16 fdisc_rjt; 7207 __be16 no_ssn; 7208 __be16 mac_flt_fail; 7209 __be16 inv_fr_rcvd; 7210 } pcb_stats; 7211 struct fw_fcoe_scb_stats { 7212 __be64 tx_bytes; 7213 __be64 tx_frames; 7214 __be64 rx_bytes; 7215 __be64 rx_frames; 7216 __be32 host_abrt_req; 7217 __be32 adap_auto_abrt; 7218 __be32 adap_abrt_rsp; 7219 __be32 host_ios_req; 7220 __be16 ssn_offl_ios; 7221 __be16 ssn_not_rdy_ios; 7222 __u8 rx_data_ddp_err; 7223 __u8 ddp_flt_set_err; 7224 __be16 rx_data_fr_err; 7225 __u8 bad_st_abrt_req; 7226 __u8 no_io_abrt_req; 7227 __u8 abort_tmo; 7228 __u8 abort_tmo_2; 7229 __be32 abort_req; 7230 __u8 no_ppod_res_tmo; 7231 __u8 bp_tmo; 7232 __u8 adap_auto_cls; 7233 __u8 no_io_cls_req; 7234 __be32 host_cls_req; 7235 __be64 unsol_cmd_rcvd; 7236 __be32 plogi_req_rcvd; 7237 __be32 prli_req_rcvd; 7238 __be16 logo_req_rcvd; 7239 __be16 prlo_req_rcvd; 7240 __be16 plogi_rjt_rcvd; 7241 __be16 prli_rjt_rcvd; 7242 __be32 adisc_req_rcvd; 7243 __be32 rscn_rcvd; 7244 __be32 rrq_req_rcvd; 7245 __be32 unsol_els_rcvd; 7246 __u8 adisc_rjt_rcvd; 7247 __u8 scr_rjt; 7248 __u8 ct_rjt; 7249 __u8 inval_bls_rcvd; 7250 __be32 ba_rjt_rcvd; 7251 } scb_stats; 7252 } u; 7253 }; 7254 7255 #define S_FW_FCOE_STATS_CMD_FLOWID 0 7256 #define M_FW_FCOE_STATS_CMD_FLOWID 0xfffff 7257 #define V_FW_FCOE_STATS_CMD_FLOWID(x) ((x) << S_FW_FCOE_STATS_CMD_FLOWID) 7258 #define G_FW_FCOE_STATS_CMD_FLOWID(x) \ 7259 (((x) >> S_FW_FCOE_STATS_CMD_FLOWID) & M_FW_FCOE_STATS_CMD_FLOWID) 7260 7261 #define S_FW_FCOE_STATS_CMD_FREE 30 7262 #define M_FW_FCOE_STATS_CMD_FREE 0x1 7263 #define V_FW_FCOE_STATS_CMD_FREE(x) ((x) << S_FW_FCOE_STATS_CMD_FREE) 7264 #define G_FW_FCOE_STATS_CMD_FREE(x) \ 7265 (((x) >> S_FW_FCOE_STATS_CMD_FREE) & M_FW_FCOE_STATS_CMD_FREE) 7266 #define F_FW_FCOE_STATS_CMD_FREE V_FW_FCOE_STATS_CMD_FREE(1U) 7267 7268 #define S_FW_FCOE_STATS_CMD_NSTATS 4 7269 #define M_FW_FCOE_STATS_CMD_NSTATS 0x7 7270 #define V_FW_FCOE_STATS_CMD_NSTATS(x) ((x) << S_FW_FCOE_STATS_CMD_NSTATS) 7271 #define G_FW_FCOE_STATS_CMD_NSTATS(x) \ 7272 (((x) >> S_FW_FCOE_STATS_CMD_NSTATS) & M_FW_FCOE_STATS_CMD_NSTATS) 7273 7274 #define S_FW_FCOE_STATS_CMD_PORT 0 7275 #define M_FW_FCOE_STATS_CMD_PORT 0x3 7276 #define V_FW_FCOE_STATS_CMD_PORT(x) ((x) << S_FW_FCOE_STATS_CMD_PORT) 7277 #define G_FW_FCOE_STATS_CMD_PORT(x) \ 7278 (((x) >> S_FW_FCOE_STATS_CMD_PORT) & M_FW_FCOE_STATS_CMD_PORT) 7279 7280 #define S_FW_FCOE_STATS_CMD_PORT_VALID 7 7281 #define M_FW_FCOE_STATS_CMD_PORT_VALID 0x1 7282 #define V_FW_FCOE_STATS_CMD_PORT_VALID(x) \ 7283 ((x) << S_FW_FCOE_STATS_CMD_PORT_VALID) 7284 #define G_FW_FCOE_STATS_CMD_PORT_VALID(x) \ 7285 (((x) >> S_FW_FCOE_STATS_CMD_PORT_VALID) & M_FW_FCOE_STATS_CMD_PORT_VALID) 7286 #define F_FW_FCOE_STATS_CMD_PORT_VALID V_FW_FCOE_STATS_CMD_PORT_VALID(1U) 7287 7288 #define S_FW_FCOE_STATS_CMD_IX 0 7289 #define M_FW_FCOE_STATS_CMD_IX 0x3f 7290 #define V_FW_FCOE_STATS_CMD_IX(x) ((x) << S_FW_FCOE_STATS_CMD_IX) 7291 #define G_FW_FCOE_STATS_CMD_IX(x) \ 7292 (((x) >> S_FW_FCOE_STATS_CMD_IX) & M_FW_FCOE_STATS_CMD_IX) 7293 7294 struct fw_fcoe_fcf_cmd { 7295 __be32 op_to_fcfi; 7296 __be32 retval_len16; 7297 __be16 priority_pkd; 7298 __u8 mac[6]; 7299 __u8 name_id[8]; 7300 __u8 fabric[8]; 7301 __be16 vf_id; 7302 __be16 max_fcoe_size; 7303 __u8 vlan_id; 7304 __u8 fc_map[3]; 7305 __be32 fka_adv; 7306 __be32 r6; 7307 __u8 r7_hi; 7308 __u8 fpma_to_portid; 7309 __u8 spma_mac[6]; 7310 __be64 r8; 7311 }; 7312 7313 #define S_FW_FCOE_FCF_CMD_FCFI 0 7314 #define M_FW_FCOE_FCF_CMD_FCFI 0xfffff 7315 #define V_FW_FCOE_FCF_CMD_FCFI(x) ((x) << S_FW_FCOE_FCF_CMD_FCFI) 7316 #define G_FW_FCOE_FCF_CMD_FCFI(x) \ 7317 (((x) >> S_FW_FCOE_FCF_CMD_FCFI) & M_FW_FCOE_FCF_CMD_FCFI) 7318 7319 #define S_FW_FCOE_FCF_CMD_PRIORITY 0 7320 #define M_FW_FCOE_FCF_CMD_PRIORITY 0xff 7321 #define V_FW_FCOE_FCF_CMD_PRIORITY(x) ((x) << S_FW_FCOE_FCF_CMD_PRIORITY) 7322 #define G_FW_FCOE_FCF_CMD_PRIORITY(x) \ 7323 (((x) >> S_FW_FCOE_FCF_CMD_PRIORITY) & M_FW_FCOE_FCF_CMD_PRIORITY) 7324 7325 #define S_FW_FCOE_FCF_CMD_FPMA 6 7326 #define M_FW_FCOE_FCF_CMD_FPMA 0x1 7327 #define V_FW_FCOE_FCF_CMD_FPMA(x) ((x) << S_FW_FCOE_FCF_CMD_FPMA) 7328 #define G_FW_FCOE_FCF_CMD_FPMA(x) \ 7329 (((x) >> S_FW_FCOE_FCF_CMD_FPMA) & M_FW_FCOE_FCF_CMD_FPMA) 7330 #define F_FW_FCOE_FCF_CMD_FPMA V_FW_FCOE_FCF_CMD_FPMA(1U) 7331 7332 #define S_FW_FCOE_FCF_CMD_SPMA 5 7333 #define M_FW_FCOE_FCF_CMD_SPMA 0x1 7334 #define V_FW_FCOE_FCF_CMD_SPMA(x) ((x) << S_FW_FCOE_FCF_CMD_SPMA) 7335 #define G_FW_FCOE_FCF_CMD_SPMA(x) \ 7336 (((x) >> S_FW_FCOE_FCF_CMD_SPMA) & M_FW_FCOE_FCF_CMD_SPMA) 7337 #define F_FW_FCOE_FCF_CMD_SPMA V_FW_FCOE_FCF_CMD_SPMA(1U) 7338 7339 #define S_FW_FCOE_FCF_CMD_LOGIN 4 7340 #define M_FW_FCOE_FCF_CMD_LOGIN 0x1 7341 #define V_FW_FCOE_FCF_CMD_LOGIN(x) ((x) << S_FW_FCOE_FCF_CMD_LOGIN) 7342 #define G_FW_FCOE_FCF_CMD_LOGIN(x) \ 7343 (((x) >> S_FW_FCOE_FCF_CMD_LOGIN) & M_FW_FCOE_FCF_CMD_LOGIN) 7344 #define F_FW_FCOE_FCF_CMD_LOGIN V_FW_FCOE_FCF_CMD_LOGIN(1U) 7345 7346 #define S_FW_FCOE_FCF_CMD_PORTID 0 7347 #define M_FW_FCOE_FCF_CMD_PORTID 0xf 7348 #define V_FW_FCOE_FCF_CMD_PORTID(x) ((x) << S_FW_FCOE_FCF_CMD_PORTID) 7349 #define G_FW_FCOE_FCF_CMD_PORTID(x) \ 7350 (((x) >> S_FW_FCOE_FCF_CMD_PORTID) & M_FW_FCOE_FCF_CMD_PORTID) 7351 7352 /****************************************************************************** 7353 * E R R O R a n d D E B U G C O M M A N D s 7354 ******************************************************/ 7355 7356 enum fw_error_type { 7357 FW_ERROR_TYPE_EXCEPTION = 0x0, 7358 FW_ERROR_TYPE_HWMODULE = 0x1, 7359 FW_ERROR_TYPE_WR = 0x2, 7360 FW_ERROR_TYPE_ACL = 0x3, 7361 }; 7362 7363 struct fw_error_cmd { 7364 __be32 op_to_type; 7365 __be32 len16_pkd; 7366 union fw_error { 7367 struct fw_error_exception { 7368 __be32 info[6]; 7369 } exception; 7370 struct fw_error_hwmodule { 7371 __be32 regaddr; 7372 __be32 regval; 7373 } hwmodule; 7374 struct fw_error_wr { 7375 __be16 cidx; 7376 __be16 pfn_vfn; 7377 __be32 eqid; 7378 __u8 wrhdr[16]; 7379 } wr; 7380 struct fw_error_acl { 7381 __be16 cidx; 7382 __be16 pfn_vfn; 7383 __be32 eqid; 7384 __be16 mv_pkd; 7385 __u8 val[6]; 7386 __be64 r4; 7387 } acl; 7388 } u; 7389 }; 7390 7391 #define S_FW_ERROR_CMD_FATAL 4 7392 #define M_FW_ERROR_CMD_FATAL 0x1 7393 #define V_FW_ERROR_CMD_FATAL(x) ((x) << S_FW_ERROR_CMD_FATAL) 7394 #define G_FW_ERROR_CMD_FATAL(x) \ 7395 (((x) >> S_FW_ERROR_CMD_FATAL) & M_FW_ERROR_CMD_FATAL) 7396 #define F_FW_ERROR_CMD_FATAL V_FW_ERROR_CMD_FATAL(1U) 7397 7398 #define S_FW_ERROR_CMD_TYPE 0 7399 #define M_FW_ERROR_CMD_TYPE 0xf 7400 #define V_FW_ERROR_CMD_TYPE(x) ((x) << S_FW_ERROR_CMD_TYPE) 7401 #define G_FW_ERROR_CMD_TYPE(x) \ 7402 (((x) >> S_FW_ERROR_CMD_TYPE) & M_FW_ERROR_CMD_TYPE) 7403 7404 #define S_FW_ERROR_CMD_PFN 8 7405 #define M_FW_ERROR_CMD_PFN 0x7 7406 #define V_FW_ERROR_CMD_PFN(x) ((x) << S_FW_ERROR_CMD_PFN) 7407 #define G_FW_ERROR_CMD_PFN(x) \ 7408 (((x) >> S_FW_ERROR_CMD_PFN) & M_FW_ERROR_CMD_PFN) 7409 7410 #define S_FW_ERROR_CMD_VFN 0 7411 #define M_FW_ERROR_CMD_VFN 0xff 7412 #define V_FW_ERROR_CMD_VFN(x) ((x) << S_FW_ERROR_CMD_VFN) 7413 #define G_FW_ERROR_CMD_VFN(x) \ 7414 (((x) >> S_FW_ERROR_CMD_VFN) & M_FW_ERROR_CMD_VFN) 7415 7416 #define S_FW_ERROR_CMD_PFN 8 7417 #define M_FW_ERROR_CMD_PFN 0x7 7418 #define V_FW_ERROR_CMD_PFN(x) ((x) << S_FW_ERROR_CMD_PFN) 7419 #define G_FW_ERROR_CMD_PFN(x) \ 7420 (((x) >> S_FW_ERROR_CMD_PFN) & M_FW_ERROR_CMD_PFN) 7421 7422 #define S_FW_ERROR_CMD_VFN 0 7423 #define M_FW_ERROR_CMD_VFN 0xff 7424 #define V_FW_ERROR_CMD_VFN(x) ((x) << S_FW_ERROR_CMD_VFN) 7425 #define G_FW_ERROR_CMD_VFN(x) \ 7426 (((x) >> S_FW_ERROR_CMD_VFN) & M_FW_ERROR_CMD_VFN) 7427 7428 #define S_FW_ERROR_CMD_MV 15 7429 #define M_FW_ERROR_CMD_MV 0x1 7430 #define V_FW_ERROR_CMD_MV(x) ((x) << S_FW_ERROR_CMD_MV) 7431 #define G_FW_ERROR_CMD_MV(x) \ 7432 (((x) >> S_FW_ERROR_CMD_MV) & M_FW_ERROR_CMD_MV) 7433 #define F_FW_ERROR_CMD_MV V_FW_ERROR_CMD_MV(1U) 7434 7435 struct fw_debug_cmd { 7436 __be32 op_type; 7437 __be32 len16_pkd; 7438 union fw_debug { 7439 struct fw_debug_assert { 7440 __be32 fcid; 7441 __be32 line; 7442 __be32 x; 7443 __be32 y; 7444 __u8 filename_0_7[8]; 7445 __u8 filename_8_15[8]; 7446 __be64 r3; 7447 } assert; 7448 struct fw_debug_prt { 7449 __be16 dprtstridx; 7450 __be16 r3[3]; 7451 __be32 dprtstrparam0; 7452 __be32 dprtstrparam1; 7453 __be32 dprtstrparam2; 7454 __be32 dprtstrparam3; 7455 } prt; 7456 } u; 7457 }; 7458 7459 #define S_FW_DEBUG_CMD_TYPE 0 7460 #define M_FW_DEBUG_CMD_TYPE 0xff 7461 #define V_FW_DEBUG_CMD_TYPE(x) ((x) << S_FW_DEBUG_CMD_TYPE) 7462 #define G_FW_DEBUG_CMD_TYPE(x) \ 7463 (((x) >> S_FW_DEBUG_CMD_TYPE) & M_FW_DEBUG_CMD_TYPE) 7464 7465 /****************************************************************************** 7466 * P C I E F W R E G I S T E R 7467 **************************************/ 7468 7469 enum pcie_fw_eval { 7470 PCIE_FW_EVAL_CRASH = 0, 7471 PCIE_FW_EVAL_PREP = 1, 7472 PCIE_FW_EVAL_CONF = 2, 7473 PCIE_FW_EVAL_INIT = 3, 7474 PCIE_FW_EVAL_UNEXPECTEDEVENT = 4, 7475 PCIE_FW_EVAL_OVERHEAT = 5, 7476 PCIE_FW_EVAL_DEVICESHUTDOWN = 6, 7477 }; 7478 7479 /** 7480 * Register definitions for the PCIE_FW register which the firmware uses 7481 * to retain status across RESETs. This register should be considered 7482 * as a READ-ONLY register for Host Software and only to be used to 7483 * track firmware initialization/error state, etc. 7484 */ 7485 #define S_PCIE_FW_ERR 31 7486 #define M_PCIE_FW_ERR 0x1 7487 #define V_PCIE_FW_ERR(x) ((x) << S_PCIE_FW_ERR) 7488 #define G_PCIE_FW_ERR(x) (((x) >> S_PCIE_FW_ERR) & M_PCIE_FW_ERR) 7489 #define F_PCIE_FW_ERR V_PCIE_FW_ERR(1U) 7490 7491 #define S_PCIE_FW_INIT 30 7492 #define M_PCIE_FW_INIT 0x1 7493 #define V_PCIE_FW_INIT(x) ((x) << S_PCIE_FW_INIT) 7494 #define G_PCIE_FW_INIT(x) (((x) >> S_PCIE_FW_INIT) & M_PCIE_FW_INIT) 7495 #define F_PCIE_FW_INIT V_PCIE_FW_INIT(1U) 7496 7497 #define S_PCIE_FW_HALT 29 7498 #define M_PCIE_FW_HALT 0x1 7499 #define V_PCIE_FW_HALT(x) ((x) << S_PCIE_FW_HALT) 7500 #define G_PCIE_FW_HALT(x) (((x) >> S_PCIE_FW_HALT) & M_PCIE_FW_HALT) 7501 #define F_PCIE_FW_HALT V_PCIE_FW_HALT(1U) 7502 7503 #define S_PCIE_FW_EVAL 24 7504 #define M_PCIE_FW_EVAL 0x7 7505 #define V_PCIE_FW_EVAL(x) ((x) << S_PCIE_FW_EVAL) 7506 #define G_PCIE_FW_EVAL(x) (((x) >> S_PCIE_FW_EVAL) & M_PCIE_FW_EVAL) 7507 7508 #define S_PCIE_FW_STAGE 21 7509 #define M_PCIE_FW_STAGE 0x7 7510 #define V_PCIE_FW_STAGE(x) ((x) << S_PCIE_FW_STAGE) 7511 #define G_PCIE_FW_STAGE(x) (((x) >> S_PCIE_FW_STAGE) & M_PCIE_FW_STAGE) 7512 7513 #define S_PCIE_FW_ASYNCNOT_VLD 20 7514 #define M_PCIE_FW_ASYNCNOT_VLD 0x1 7515 #define V_PCIE_FW_ASYNCNOT_VLD(x) \ 7516 ((x) << S_PCIE_FW_ASYNCNOT_VLD) 7517 #define G_PCIE_FW_ASYNCNOT_VLD(x) \ 7518 (((x) >> S_PCIE_FW_ASYNCNOT_VLD) & M_PCIE_FW_ASYNCNOT_VLD) 7519 #define F_PCIE_FW_ASYNCNOT_VLD V_PCIE_FW_ASYNCNOT_VLD(1U) 7520 7521 #define S_PCIE_FW_ASYNCNOTINT 19 7522 #define M_PCIE_FW_ASYNCNOTINT 0x1 7523 #define V_PCIE_FW_ASYNCNOTINT(x) \ 7524 ((x) << S_PCIE_FW_ASYNCNOTINT) 7525 #define G_PCIE_FW_ASYNCNOTINT(x) \ 7526 (((x) >> S_PCIE_FW_ASYNCNOTINT) & M_PCIE_FW_ASYNCNOTINT) 7527 #define F_PCIE_FW_ASYNCNOTINT V_PCIE_FW_ASYNCNOTINT(1U) 7528 7529 #define S_PCIE_FW_ASYNCNOT 16 7530 #define M_PCIE_FW_ASYNCNOT 0x7 7531 #define V_PCIE_FW_ASYNCNOT(x) ((x) << S_PCIE_FW_ASYNCNOT) 7532 #define G_PCIE_FW_ASYNCNOT(x) \ 7533 (((x) >> S_PCIE_FW_ASYNCNOT) & M_PCIE_FW_ASYNCNOT) 7534 7535 #define S_PCIE_FW_MASTER_VLD 15 7536 #define M_PCIE_FW_MASTER_VLD 0x1 7537 #define V_PCIE_FW_MASTER_VLD(x) ((x) << S_PCIE_FW_MASTER_VLD) 7538 #define G_PCIE_FW_MASTER_VLD(x) \ 7539 (((x) >> S_PCIE_FW_MASTER_VLD) & M_PCIE_FW_MASTER_VLD) 7540 #define F_PCIE_FW_MASTER_VLD V_PCIE_FW_MASTER_VLD(1U) 7541 7542 #define S_PCIE_FW_MASTER 12 7543 #define M_PCIE_FW_MASTER 0x7 7544 #define V_PCIE_FW_MASTER(x) ((x) << S_PCIE_FW_MASTER) 7545 #define G_PCIE_FW_MASTER(x) (((x) >> S_PCIE_FW_MASTER) & M_PCIE_FW_MASTER) 7546 7547 #define S_PCIE_FW_RESET_VLD 11 7548 #define M_PCIE_FW_RESET_VLD 0x1 7549 #define V_PCIE_FW_RESET_VLD(x) ((x) << S_PCIE_FW_RESET_VLD) 7550 #define G_PCIE_FW_RESET_VLD(x) \ 7551 (((x) >> S_PCIE_FW_RESET_VLD) & M_PCIE_FW_RESET_VLD) 7552 #define F_PCIE_FW_RESET_VLD V_PCIE_FW_RESET_VLD(1U) 7553 7554 #define S_PCIE_FW_RESET 8 7555 #define M_PCIE_FW_RESET 0x7 7556 #define V_PCIE_FW_RESET(x) ((x) << S_PCIE_FW_RESET) 7557 #define G_PCIE_FW_RESET(x) \ 7558 (((x) >> S_PCIE_FW_RESET) & M_PCIE_FW_RESET) 7559 7560 #define S_PCIE_FW_REGISTERED 0 7561 #define M_PCIE_FW_REGISTERED 0xff 7562 #define V_PCIE_FW_REGISTERED(x) ((x) << S_PCIE_FW_REGISTERED) 7563 #define G_PCIE_FW_REGISTERED(x) \ 7564 (((x) >> S_PCIE_FW_REGISTERED) & M_PCIE_FW_REGISTERED) 7565 7566 7567 /****************************************************************************** 7568 * B I N A R Y H E A D E R F O R M A T 7569 **********************************************/ 7570 7571 /* 7572 * firmware binary header format 7573 */ 7574 struct fw_hdr { 7575 __u8 ver; 7576 __u8 chip; /* terminator chip family */ 7577 __be16 len512; /* bin length in units of 512-bytes */ 7578 __be32 fw_ver; /* firmware version */ 7579 __be32 tp_microcode_ver; /* tcp processor microcode version */ 7580 __u8 intfver_nic; 7581 __u8 intfver_vnic; 7582 __u8 intfver_ofld; 7583 __u8 intfver_ri; 7584 __u8 intfver_iscsipdu; 7585 __u8 intfver_iscsi; 7586 __u8 intfver_fcoepdu; 7587 __u8 intfver_fcoe; 7588 __u32 reserved2; 7589 __u32 reserved3; 7590 __u32 magic; /* runtime or bootstrap fw */ 7591 __be32 flags; 7592 __be32 reserved6[23]; 7593 }; 7594 7595 enum fw_hdr_chip { 7596 FW_HDR_CHIP_T4, 7597 FW_HDR_CHIP_T5 7598 }; 7599 7600 #define S_FW_HDR_FW_VER_MAJOR 24 7601 #define M_FW_HDR_FW_VER_MAJOR 0xff 7602 #define V_FW_HDR_FW_VER_MAJOR(x) \ 7603 ((x) << S_FW_HDR_FW_VER_MAJOR) 7604 #define G_FW_HDR_FW_VER_MAJOR(x) \ 7605 (((x) >> S_FW_HDR_FW_VER_MAJOR) & M_FW_HDR_FW_VER_MAJOR) 7606 7607 #define S_FW_HDR_FW_VER_MINOR 16 7608 #define M_FW_HDR_FW_VER_MINOR 0xff 7609 #define V_FW_HDR_FW_VER_MINOR(x) \ 7610 ((x) << S_FW_HDR_FW_VER_MINOR) 7611 #define G_FW_HDR_FW_VER_MINOR(x) \ 7612 (((x) >> S_FW_HDR_FW_VER_MINOR) & M_FW_HDR_FW_VER_MINOR) 7613 7614 #define S_FW_HDR_FW_VER_MICRO 8 7615 #define M_FW_HDR_FW_VER_MICRO 0xff 7616 #define V_FW_HDR_FW_VER_MICRO(x) \ 7617 ((x) << S_FW_HDR_FW_VER_MICRO) 7618 #define G_FW_HDR_FW_VER_MICRO(x) \ 7619 (((x) >> S_FW_HDR_FW_VER_MICRO) & M_FW_HDR_FW_VER_MICRO) 7620 7621 #define S_FW_HDR_FW_VER_BUILD 0 7622 #define M_FW_HDR_FW_VER_BUILD 0xff 7623 #define V_FW_HDR_FW_VER_BUILD(x) \ 7624 ((x) << S_FW_HDR_FW_VER_BUILD) 7625 #define G_FW_HDR_FW_VER_BUILD(x) \ 7626 (((x) >> S_FW_HDR_FW_VER_BUILD) & M_FW_HDR_FW_VER_BUILD) 7627 7628 enum { 7629 T4FW_VERSION_MAJOR = 0x01, 7630 T4FW_VERSION_MINOR = 0x08, 7631 T4FW_VERSION_MICRO = 0x0b, 7632 T4FW_VERSION_BUILD = 0x00, 7633 7634 T5FW_VERSION_MAJOR = 0x01, 7635 T5FW_VERSION_MINOR = 0x08, 7636 T5FW_VERSION_MICRO = 0x16, 7637 T5FW_VERSION_BUILD = 0x00, 7638 }; 7639 7640 enum { 7641 T4FW_HDR_INTFVER_NIC = 0x00, 7642 T4FW_HDR_INTFVER_VNIC = 0x00, 7643 T4FW_HDR_INTFVER_OFLD = 0x00, 7644 T4FW_HDR_INTFVER_RI = 0x00, 7645 T4FW_HDR_INTFVER_ISCSIPDU = 0x00, 7646 T4FW_HDR_INTFVER_ISCSI = 0x00, 7647 T4FW_HDR_INTFVER_FCOEPDU = 0x00, 7648 T4FW_HDR_INTFVER_FCOE = 0x00, 7649 7650 T5FW_HDR_INTFVER_NIC = 0x00, 7651 T5FW_HDR_INTFVER_VNIC = 0x00, 7652 T5FW_HDR_INTFVER_OFLD = 0x00, 7653 T5FW_HDR_INTFVER_RI = 0x00, 7654 T5FW_HDR_INTFVER_ISCSIPDU= 0x00, 7655 T5FW_HDR_INTFVER_ISCSI = 0x00, 7656 T5FW_HDR_INTFVER_FCOEPDU= 0x00, 7657 T5FW_HDR_INTFVER_FCOE = 0x00, 7658 }; 7659 7660 enum { 7661 FW_HDR_MAGIC_RUNTIME = 0x00000000, 7662 FW_HDR_MAGIC_BOOTSTRAP = 0x626f6f74, 7663 }; 7664 7665 enum fw_hdr_flags { 7666 FW_HDR_FLAGS_RESET_HALT = 0x00000001, 7667 }; 7668 7669 #endif /* _T4FW_INTERFACE_H_ */ 7670