162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * This file is part of the Chelsio T4 Ethernet driver for Linux. 362306a36Sopenharmony_ci * 462306a36Sopenharmony_ci * Copyright (c) 2009-2016 Chelsio Communications, Inc. All rights reserved. 562306a36Sopenharmony_ci * 662306a36Sopenharmony_ci * This software is available to you under a choice of one of two 762306a36Sopenharmony_ci * licenses. You may choose to be licensed under the terms of the GNU 862306a36Sopenharmony_ci * General Public License (GPL) Version 2, available from the file 962306a36Sopenharmony_ci * COPYING in the main directory of this source tree, or the 1062306a36Sopenharmony_ci * OpenIB.org BSD license below: 1162306a36Sopenharmony_ci * 1262306a36Sopenharmony_ci * Redistribution and use in source and binary forms, with or 1362306a36Sopenharmony_ci * without modification, are permitted provided that the following 1462306a36Sopenharmony_ci * conditions are met: 1562306a36Sopenharmony_ci * 1662306a36Sopenharmony_ci * - Redistributions of source code must retain the above 1762306a36Sopenharmony_ci * copyright notice, this list of conditions and the following 1862306a36Sopenharmony_ci * disclaimer. 1962306a36Sopenharmony_ci * 2062306a36Sopenharmony_ci * - Redistributions in binary form must reproduce the above 2162306a36Sopenharmony_ci * copyright notice, this list of conditions and the following 2262306a36Sopenharmony_ci * disclaimer in the documentation and/or other materials 2362306a36Sopenharmony_ci * provided with the distribution. 2462306a36Sopenharmony_ci * 2562306a36Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 2662306a36Sopenharmony_ci * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 2762306a36Sopenharmony_ci * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 2862306a36Sopenharmony_ci * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 2962306a36Sopenharmony_ci * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 3062306a36Sopenharmony_ci * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 3162306a36Sopenharmony_ci * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 3262306a36Sopenharmony_ci * SOFTWARE. 3362306a36Sopenharmony_ci */ 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ci#ifndef _T4FW_INTERFACE_H_ 3662306a36Sopenharmony_ci#define _T4FW_INTERFACE_H_ 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_cienum fw_retval { 3962306a36Sopenharmony_ci FW_SUCCESS = 0, /* completed successfully */ 4062306a36Sopenharmony_ci FW_EPERM = 1, /* operation not permitted */ 4162306a36Sopenharmony_ci FW_ENOENT = 2, /* no such file or directory */ 4262306a36Sopenharmony_ci FW_EIO = 5, /* input/output error; hw bad */ 4362306a36Sopenharmony_ci FW_ENOEXEC = 8, /* exec format error; inv microcode */ 4462306a36Sopenharmony_ci FW_EAGAIN = 11, /* try again */ 4562306a36Sopenharmony_ci FW_ENOMEM = 12, /* out of memory */ 4662306a36Sopenharmony_ci FW_EFAULT = 14, /* bad address; fw bad */ 4762306a36Sopenharmony_ci FW_EBUSY = 16, /* resource busy */ 4862306a36Sopenharmony_ci FW_EEXIST = 17, /* file exists */ 4962306a36Sopenharmony_ci FW_ENODEV = 19, /* no such device */ 5062306a36Sopenharmony_ci FW_EINVAL = 22, /* invalid argument */ 5162306a36Sopenharmony_ci FW_ENOSPC = 28, /* no space left on device */ 5262306a36Sopenharmony_ci FW_ENOSYS = 38, /* functionality not implemented */ 5362306a36Sopenharmony_ci FW_ENODATA = 61, /* no data available */ 5462306a36Sopenharmony_ci FW_EPROTO = 71, /* protocol error */ 5562306a36Sopenharmony_ci FW_EADDRINUSE = 98, /* address already in use */ 5662306a36Sopenharmony_ci FW_EADDRNOTAVAIL = 99, /* cannot assigned requested address */ 5762306a36Sopenharmony_ci FW_ENETDOWN = 100, /* network is down */ 5862306a36Sopenharmony_ci FW_ENETUNREACH = 101, /* network is unreachable */ 5962306a36Sopenharmony_ci FW_ENOBUFS = 105, /* no buffer space available */ 6062306a36Sopenharmony_ci FW_ETIMEDOUT = 110, /* timeout */ 6162306a36Sopenharmony_ci FW_EINPROGRESS = 115, /* fw internal */ 6262306a36Sopenharmony_ci FW_SCSI_ABORT_REQUESTED = 128, /* */ 6362306a36Sopenharmony_ci FW_SCSI_ABORT_TIMEDOUT = 129, /* */ 6462306a36Sopenharmony_ci FW_SCSI_ABORTED = 130, /* */ 6562306a36Sopenharmony_ci FW_SCSI_CLOSE_REQUESTED = 131, /* */ 6662306a36Sopenharmony_ci FW_ERR_LINK_DOWN = 132, /* */ 6762306a36Sopenharmony_ci FW_RDEV_NOT_READY = 133, /* */ 6862306a36Sopenharmony_ci FW_ERR_RDEV_LOST = 134, /* */ 6962306a36Sopenharmony_ci FW_ERR_RDEV_LOGO = 135, /* */ 7062306a36Sopenharmony_ci FW_FCOE_NO_XCHG = 136, /* */ 7162306a36Sopenharmony_ci FW_SCSI_RSP_ERR = 137, /* */ 7262306a36Sopenharmony_ci FW_ERR_RDEV_IMPL_LOGO = 138, /* */ 7362306a36Sopenharmony_ci FW_SCSI_UNDER_FLOW_ERR = 139, /* */ 7462306a36Sopenharmony_ci FW_SCSI_OVER_FLOW_ERR = 140, /* */ 7562306a36Sopenharmony_ci FW_SCSI_DDP_ERR = 141, /* DDP error*/ 7662306a36Sopenharmony_ci FW_SCSI_TASK_ERR = 142, /* No SCSI tasks available */ 7762306a36Sopenharmony_ci}; 7862306a36Sopenharmony_ci 7962306a36Sopenharmony_ci#define FW_T4VF_SGE_BASE_ADDR 0x0000 8062306a36Sopenharmony_ci#define FW_T4VF_MPS_BASE_ADDR 0x0100 8162306a36Sopenharmony_ci#define FW_T4VF_PL_BASE_ADDR 0x0200 8262306a36Sopenharmony_ci#define FW_T4VF_MBDATA_BASE_ADDR 0x0240 8362306a36Sopenharmony_ci#define FW_T4VF_CIM_BASE_ADDR 0x0300 8462306a36Sopenharmony_ci 8562306a36Sopenharmony_cienum fw_wr_opcodes { 8662306a36Sopenharmony_ci FW_FILTER_WR = 0x02, 8762306a36Sopenharmony_ci FW_ULPTX_WR = 0x04, 8862306a36Sopenharmony_ci FW_TP_WR = 0x05, 8962306a36Sopenharmony_ci FW_ETH_TX_PKT_WR = 0x08, 9062306a36Sopenharmony_ci FW_ETH_TX_EO_WR = 0x1c, 9162306a36Sopenharmony_ci FW_OFLD_CONNECTION_WR = 0x2f, 9262306a36Sopenharmony_ci FW_FLOWC_WR = 0x0a, 9362306a36Sopenharmony_ci FW_OFLD_TX_DATA_WR = 0x0b, 9462306a36Sopenharmony_ci FW_CMD_WR = 0x10, 9562306a36Sopenharmony_ci FW_ETH_TX_PKT_VM_WR = 0x11, 9662306a36Sopenharmony_ci FW_RI_RES_WR = 0x0c, 9762306a36Sopenharmony_ci FW_RI_INIT_WR = 0x0d, 9862306a36Sopenharmony_ci FW_RI_RDMA_WRITE_WR = 0x14, 9962306a36Sopenharmony_ci FW_RI_SEND_WR = 0x15, 10062306a36Sopenharmony_ci FW_RI_RDMA_READ_WR = 0x16, 10162306a36Sopenharmony_ci FW_RI_RECV_WR = 0x17, 10262306a36Sopenharmony_ci FW_RI_BIND_MW_WR = 0x18, 10362306a36Sopenharmony_ci FW_RI_FR_NSMR_WR = 0x19, 10462306a36Sopenharmony_ci FW_RI_FR_NSMR_TPTE_WR = 0x20, 10562306a36Sopenharmony_ci FW_RI_RDMA_WRITE_CMPL_WR = 0x21, 10662306a36Sopenharmony_ci FW_RI_INV_LSTAG_WR = 0x1a, 10762306a36Sopenharmony_ci FW_ISCSI_TX_DATA_WR = 0x45, 10862306a36Sopenharmony_ci FW_PTP_TX_PKT_WR = 0x46, 10962306a36Sopenharmony_ci FW_TLSTX_DATA_WR = 0x68, 11062306a36Sopenharmony_ci FW_CRYPTO_LOOKASIDE_WR = 0X6d, 11162306a36Sopenharmony_ci FW_LASTC2E_WR = 0x70, 11262306a36Sopenharmony_ci FW_FILTER2_WR = 0x77 11362306a36Sopenharmony_ci}; 11462306a36Sopenharmony_ci 11562306a36Sopenharmony_cistruct fw_wr_hdr { 11662306a36Sopenharmony_ci __be32 hi; 11762306a36Sopenharmony_ci __be32 lo; 11862306a36Sopenharmony_ci}; 11962306a36Sopenharmony_ci 12062306a36Sopenharmony_ci/* work request opcode (hi) */ 12162306a36Sopenharmony_ci#define FW_WR_OP_S 24 12262306a36Sopenharmony_ci#define FW_WR_OP_M 0xff 12362306a36Sopenharmony_ci#define FW_WR_OP_V(x) ((x) << FW_WR_OP_S) 12462306a36Sopenharmony_ci#define FW_WR_OP_G(x) (((x) >> FW_WR_OP_S) & FW_WR_OP_M) 12562306a36Sopenharmony_ci 12662306a36Sopenharmony_ci/* atomic flag (hi) - firmware encapsulates CPLs in CPL_BARRIER */ 12762306a36Sopenharmony_ci#define FW_WR_ATOMIC_S 23 12862306a36Sopenharmony_ci#define FW_WR_ATOMIC_V(x) ((x) << FW_WR_ATOMIC_S) 12962306a36Sopenharmony_ci 13062306a36Sopenharmony_ci/* flush flag (hi) - firmware flushes flushable work request buffered 13162306a36Sopenharmony_ci * in the flow context. 13262306a36Sopenharmony_ci */ 13362306a36Sopenharmony_ci#define FW_WR_FLUSH_S 22 13462306a36Sopenharmony_ci#define FW_WR_FLUSH_V(x) ((x) << FW_WR_FLUSH_S) 13562306a36Sopenharmony_ci 13662306a36Sopenharmony_ci/* completion flag (hi) - firmware generates a cpl_fw6_ack */ 13762306a36Sopenharmony_ci#define FW_WR_COMPL_S 21 13862306a36Sopenharmony_ci#define FW_WR_COMPL_V(x) ((x) << FW_WR_COMPL_S) 13962306a36Sopenharmony_ci#define FW_WR_COMPL_F FW_WR_COMPL_V(1U) 14062306a36Sopenharmony_ci 14162306a36Sopenharmony_ci/* work request immediate data length (hi) */ 14262306a36Sopenharmony_ci#define FW_WR_IMMDLEN_S 0 14362306a36Sopenharmony_ci#define FW_WR_IMMDLEN_M 0xff 14462306a36Sopenharmony_ci#define FW_WR_IMMDLEN_V(x) ((x) << FW_WR_IMMDLEN_S) 14562306a36Sopenharmony_ci 14662306a36Sopenharmony_ci/* egress queue status update to associated ingress queue entry (lo) */ 14762306a36Sopenharmony_ci#define FW_WR_EQUIQ_S 31 14862306a36Sopenharmony_ci#define FW_WR_EQUIQ_V(x) ((x) << FW_WR_EQUIQ_S) 14962306a36Sopenharmony_ci#define FW_WR_EQUIQ_F FW_WR_EQUIQ_V(1U) 15062306a36Sopenharmony_ci 15162306a36Sopenharmony_ci/* egress queue status update to egress queue status entry (lo) */ 15262306a36Sopenharmony_ci#define FW_WR_EQUEQ_S 30 15362306a36Sopenharmony_ci#define FW_WR_EQUEQ_V(x) ((x) << FW_WR_EQUEQ_S) 15462306a36Sopenharmony_ci#define FW_WR_EQUEQ_F FW_WR_EQUEQ_V(1U) 15562306a36Sopenharmony_ci 15662306a36Sopenharmony_ci/* flow context identifier (lo) */ 15762306a36Sopenharmony_ci#define FW_WR_FLOWID_S 8 15862306a36Sopenharmony_ci#define FW_WR_FLOWID_V(x) ((x) << FW_WR_FLOWID_S) 15962306a36Sopenharmony_ci 16062306a36Sopenharmony_ci/* length in units of 16-bytes (lo) */ 16162306a36Sopenharmony_ci#define FW_WR_LEN16_S 0 16262306a36Sopenharmony_ci#define FW_WR_LEN16_V(x) ((x) << FW_WR_LEN16_S) 16362306a36Sopenharmony_ci 16462306a36Sopenharmony_ci#define HW_TPL_FR_MT_PR_IV_P_FC 0X32B 16562306a36Sopenharmony_ci#define HW_TPL_FR_MT_PR_OV_P_FC 0X327 16662306a36Sopenharmony_ci 16762306a36Sopenharmony_ci/* filter wr reply code in cookie in CPL_SET_TCB_RPL */ 16862306a36Sopenharmony_cienum fw_filter_wr_cookie { 16962306a36Sopenharmony_ci FW_FILTER_WR_SUCCESS, 17062306a36Sopenharmony_ci FW_FILTER_WR_FLT_ADDED, 17162306a36Sopenharmony_ci FW_FILTER_WR_FLT_DELETED, 17262306a36Sopenharmony_ci FW_FILTER_WR_SMT_TBL_FULL, 17362306a36Sopenharmony_ci FW_FILTER_WR_EINVAL, 17462306a36Sopenharmony_ci}; 17562306a36Sopenharmony_ci 17662306a36Sopenharmony_cistruct fw_filter_wr { 17762306a36Sopenharmony_ci __be32 op_pkd; 17862306a36Sopenharmony_ci __be32 len16_pkd; 17962306a36Sopenharmony_ci __be64 r3; 18062306a36Sopenharmony_ci __be32 tid_to_iq; 18162306a36Sopenharmony_ci __be32 del_filter_to_l2tix; 18262306a36Sopenharmony_ci __be16 ethtype; 18362306a36Sopenharmony_ci __be16 ethtypem; 18462306a36Sopenharmony_ci __u8 frag_to_ovlan_vldm; 18562306a36Sopenharmony_ci __u8 smac_sel; 18662306a36Sopenharmony_ci __be16 rx_chan_rx_rpl_iq; 18762306a36Sopenharmony_ci __be32 maci_to_matchtypem; 18862306a36Sopenharmony_ci __u8 ptcl; 18962306a36Sopenharmony_ci __u8 ptclm; 19062306a36Sopenharmony_ci __u8 ttyp; 19162306a36Sopenharmony_ci __u8 ttypm; 19262306a36Sopenharmony_ci __be16 ivlan; 19362306a36Sopenharmony_ci __be16 ivlanm; 19462306a36Sopenharmony_ci __be16 ovlan; 19562306a36Sopenharmony_ci __be16 ovlanm; 19662306a36Sopenharmony_ci __u8 lip[16]; 19762306a36Sopenharmony_ci __u8 lipm[16]; 19862306a36Sopenharmony_ci __u8 fip[16]; 19962306a36Sopenharmony_ci __u8 fipm[16]; 20062306a36Sopenharmony_ci __be16 lp; 20162306a36Sopenharmony_ci __be16 lpm; 20262306a36Sopenharmony_ci __be16 fp; 20362306a36Sopenharmony_ci __be16 fpm; 20462306a36Sopenharmony_ci __be16 r7; 20562306a36Sopenharmony_ci __u8 sma[6]; 20662306a36Sopenharmony_ci}; 20762306a36Sopenharmony_ci 20862306a36Sopenharmony_cistruct fw_filter2_wr { 20962306a36Sopenharmony_ci __be32 op_pkd; 21062306a36Sopenharmony_ci __be32 len16_pkd; 21162306a36Sopenharmony_ci __be64 r3; 21262306a36Sopenharmony_ci __be32 tid_to_iq; 21362306a36Sopenharmony_ci __be32 del_filter_to_l2tix; 21462306a36Sopenharmony_ci __be16 ethtype; 21562306a36Sopenharmony_ci __be16 ethtypem; 21662306a36Sopenharmony_ci __u8 frag_to_ovlan_vldm; 21762306a36Sopenharmony_ci __u8 smac_sel; 21862306a36Sopenharmony_ci __be16 rx_chan_rx_rpl_iq; 21962306a36Sopenharmony_ci __be32 maci_to_matchtypem; 22062306a36Sopenharmony_ci __u8 ptcl; 22162306a36Sopenharmony_ci __u8 ptclm; 22262306a36Sopenharmony_ci __u8 ttyp; 22362306a36Sopenharmony_ci __u8 ttypm; 22462306a36Sopenharmony_ci __be16 ivlan; 22562306a36Sopenharmony_ci __be16 ivlanm; 22662306a36Sopenharmony_ci __be16 ovlan; 22762306a36Sopenharmony_ci __be16 ovlanm; 22862306a36Sopenharmony_ci __u8 lip[16]; 22962306a36Sopenharmony_ci __u8 lipm[16]; 23062306a36Sopenharmony_ci __u8 fip[16]; 23162306a36Sopenharmony_ci __u8 fipm[16]; 23262306a36Sopenharmony_ci __be16 lp; 23362306a36Sopenharmony_ci __be16 lpm; 23462306a36Sopenharmony_ci __be16 fp; 23562306a36Sopenharmony_ci __be16 fpm; 23662306a36Sopenharmony_ci __be16 r7; 23762306a36Sopenharmony_ci __u8 sma[6]; 23862306a36Sopenharmony_ci __be16 r8; 23962306a36Sopenharmony_ci __u8 filter_type_swapmac; 24062306a36Sopenharmony_ci __u8 natmode_to_ulp_type; 24162306a36Sopenharmony_ci __be16 newlport; 24262306a36Sopenharmony_ci __be16 newfport; 24362306a36Sopenharmony_ci __u8 newlip[16]; 24462306a36Sopenharmony_ci __u8 newfip[16]; 24562306a36Sopenharmony_ci __be32 natseqcheck; 24662306a36Sopenharmony_ci __be32 r9; 24762306a36Sopenharmony_ci __be64 r10; 24862306a36Sopenharmony_ci __be64 r11; 24962306a36Sopenharmony_ci __be64 r12; 25062306a36Sopenharmony_ci __be64 r13; 25162306a36Sopenharmony_ci}; 25262306a36Sopenharmony_ci 25362306a36Sopenharmony_ci#define FW_FILTER_WR_TID_S 12 25462306a36Sopenharmony_ci#define FW_FILTER_WR_TID_M 0xfffff 25562306a36Sopenharmony_ci#define FW_FILTER_WR_TID_V(x) ((x) << FW_FILTER_WR_TID_S) 25662306a36Sopenharmony_ci#define FW_FILTER_WR_TID_G(x) \ 25762306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_TID_S) & FW_FILTER_WR_TID_M) 25862306a36Sopenharmony_ci 25962306a36Sopenharmony_ci#define FW_FILTER_WR_RQTYPE_S 11 26062306a36Sopenharmony_ci#define FW_FILTER_WR_RQTYPE_M 0x1 26162306a36Sopenharmony_ci#define FW_FILTER_WR_RQTYPE_V(x) ((x) << FW_FILTER_WR_RQTYPE_S) 26262306a36Sopenharmony_ci#define FW_FILTER_WR_RQTYPE_G(x) \ 26362306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_RQTYPE_S) & FW_FILTER_WR_RQTYPE_M) 26462306a36Sopenharmony_ci#define FW_FILTER_WR_RQTYPE_F FW_FILTER_WR_RQTYPE_V(1U) 26562306a36Sopenharmony_ci 26662306a36Sopenharmony_ci#define FW_FILTER_WR_NOREPLY_S 10 26762306a36Sopenharmony_ci#define FW_FILTER_WR_NOREPLY_M 0x1 26862306a36Sopenharmony_ci#define FW_FILTER_WR_NOREPLY_V(x) ((x) << FW_FILTER_WR_NOREPLY_S) 26962306a36Sopenharmony_ci#define FW_FILTER_WR_NOREPLY_G(x) \ 27062306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_NOREPLY_S) & FW_FILTER_WR_NOREPLY_M) 27162306a36Sopenharmony_ci#define FW_FILTER_WR_NOREPLY_F FW_FILTER_WR_NOREPLY_V(1U) 27262306a36Sopenharmony_ci 27362306a36Sopenharmony_ci#define FW_FILTER_WR_IQ_S 0 27462306a36Sopenharmony_ci#define FW_FILTER_WR_IQ_M 0x3ff 27562306a36Sopenharmony_ci#define FW_FILTER_WR_IQ_V(x) ((x) << FW_FILTER_WR_IQ_S) 27662306a36Sopenharmony_ci#define FW_FILTER_WR_IQ_G(x) \ 27762306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_IQ_S) & FW_FILTER_WR_IQ_M) 27862306a36Sopenharmony_ci 27962306a36Sopenharmony_ci#define FW_FILTER_WR_DEL_FILTER_S 31 28062306a36Sopenharmony_ci#define FW_FILTER_WR_DEL_FILTER_M 0x1 28162306a36Sopenharmony_ci#define FW_FILTER_WR_DEL_FILTER_V(x) ((x) << FW_FILTER_WR_DEL_FILTER_S) 28262306a36Sopenharmony_ci#define FW_FILTER_WR_DEL_FILTER_G(x) \ 28362306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_DEL_FILTER_S) & FW_FILTER_WR_DEL_FILTER_M) 28462306a36Sopenharmony_ci#define FW_FILTER_WR_DEL_FILTER_F FW_FILTER_WR_DEL_FILTER_V(1U) 28562306a36Sopenharmony_ci 28662306a36Sopenharmony_ci#define FW_FILTER_WR_RPTTID_S 25 28762306a36Sopenharmony_ci#define FW_FILTER_WR_RPTTID_M 0x1 28862306a36Sopenharmony_ci#define FW_FILTER_WR_RPTTID_V(x) ((x) << FW_FILTER_WR_RPTTID_S) 28962306a36Sopenharmony_ci#define FW_FILTER_WR_RPTTID_G(x) \ 29062306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_RPTTID_S) & FW_FILTER_WR_RPTTID_M) 29162306a36Sopenharmony_ci#define FW_FILTER_WR_RPTTID_F FW_FILTER_WR_RPTTID_V(1U) 29262306a36Sopenharmony_ci 29362306a36Sopenharmony_ci#define FW_FILTER_WR_DROP_S 24 29462306a36Sopenharmony_ci#define FW_FILTER_WR_DROP_M 0x1 29562306a36Sopenharmony_ci#define FW_FILTER_WR_DROP_V(x) ((x) << FW_FILTER_WR_DROP_S) 29662306a36Sopenharmony_ci#define FW_FILTER_WR_DROP_G(x) \ 29762306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_DROP_S) & FW_FILTER_WR_DROP_M) 29862306a36Sopenharmony_ci#define FW_FILTER_WR_DROP_F FW_FILTER_WR_DROP_V(1U) 29962306a36Sopenharmony_ci 30062306a36Sopenharmony_ci#define FW_FILTER_WR_DIRSTEER_S 23 30162306a36Sopenharmony_ci#define FW_FILTER_WR_DIRSTEER_M 0x1 30262306a36Sopenharmony_ci#define FW_FILTER_WR_DIRSTEER_V(x) ((x) << FW_FILTER_WR_DIRSTEER_S) 30362306a36Sopenharmony_ci#define FW_FILTER_WR_DIRSTEER_G(x) \ 30462306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_DIRSTEER_S) & FW_FILTER_WR_DIRSTEER_M) 30562306a36Sopenharmony_ci#define FW_FILTER_WR_DIRSTEER_F FW_FILTER_WR_DIRSTEER_V(1U) 30662306a36Sopenharmony_ci 30762306a36Sopenharmony_ci#define FW_FILTER_WR_MASKHASH_S 22 30862306a36Sopenharmony_ci#define FW_FILTER_WR_MASKHASH_M 0x1 30962306a36Sopenharmony_ci#define FW_FILTER_WR_MASKHASH_V(x) ((x) << FW_FILTER_WR_MASKHASH_S) 31062306a36Sopenharmony_ci#define FW_FILTER_WR_MASKHASH_G(x) \ 31162306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_MASKHASH_S) & FW_FILTER_WR_MASKHASH_M) 31262306a36Sopenharmony_ci#define FW_FILTER_WR_MASKHASH_F FW_FILTER_WR_MASKHASH_V(1U) 31362306a36Sopenharmony_ci 31462306a36Sopenharmony_ci#define FW_FILTER_WR_DIRSTEERHASH_S 21 31562306a36Sopenharmony_ci#define FW_FILTER_WR_DIRSTEERHASH_M 0x1 31662306a36Sopenharmony_ci#define FW_FILTER_WR_DIRSTEERHASH_V(x) ((x) << FW_FILTER_WR_DIRSTEERHASH_S) 31762306a36Sopenharmony_ci#define FW_FILTER_WR_DIRSTEERHASH_G(x) \ 31862306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_DIRSTEERHASH_S) & FW_FILTER_WR_DIRSTEERHASH_M) 31962306a36Sopenharmony_ci#define FW_FILTER_WR_DIRSTEERHASH_F FW_FILTER_WR_DIRSTEERHASH_V(1U) 32062306a36Sopenharmony_ci 32162306a36Sopenharmony_ci#define FW_FILTER_WR_LPBK_S 20 32262306a36Sopenharmony_ci#define FW_FILTER_WR_LPBK_M 0x1 32362306a36Sopenharmony_ci#define FW_FILTER_WR_LPBK_V(x) ((x) << FW_FILTER_WR_LPBK_S) 32462306a36Sopenharmony_ci#define FW_FILTER_WR_LPBK_G(x) \ 32562306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_LPBK_S) & FW_FILTER_WR_LPBK_M) 32662306a36Sopenharmony_ci#define FW_FILTER_WR_LPBK_F FW_FILTER_WR_LPBK_V(1U) 32762306a36Sopenharmony_ci 32862306a36Sopenharmony_ci#define FW_FILTER_WR_DMAC_S 19 32962306a36Sopenharmony_ci#define FW_FILTER_WR_DMAC_M 0x1 33062306a36Sopenharmony_ci#define FW_FILTER_WR_DMAC_V(x) ((x) << FW_FILTER_WR_DMAC_S) 33162306a36Sopenharmony_ci#define FW_FILTER_WR_DMAC_G(x) \ 33262306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_DMAC_S) & FW_FILTER_WR_DMAC_M) 33362306a36Sopenharmony_ci#define FW_FILTER_WR_DMAC_F FW_FILTER_WR_DMAC_V(1U) 33462306a36Sopenharmony_ci 33562306a36Sopenharmony_ci#define FW_FILTER_WR_SMAC_S 18 33662306a36Sopenharmony_ci#define FW_FILTER_WR_SMAC_M 0x1 33762306a36Sopenharmony_ci#define FW_FILTER_WR_SMAC_V(x) ((x) << FW_FILTER_WR_SMAC_S) 33862306a36Sopenharmony_ci#define FW_FILTER_WR_SMAC_G(x) \ 33962306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_SMAC_S) & FW_FILTER_WR_SMAC_M) 34062306a36Sopenharmony_ci#define FW_FILTER_WR_SMAC_F FW_FILTER_WR_SMAC_V(1U) 34162306a36Sopenharmony_ci 34262306a36Sopenharmony_ci#define FW_FILTER_WR_INSVLAN_S 17 34362306a36Sopenharmony_ci#define FW_FILTER_WR_INSVLAN_M 0x1 34462306a36Sopenharmony_ci#define FW_FILTER_WR_INSVLAN_V(x) ((x) << FW_FILTER_WR_INSVLAN_S) 34562306a36Sopenharmony_ci#define FW_FILTER_WR_INSVLAN_G(x) \ 34662306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_INSVLAN_S) & FW_FILTER_WR_INSVLAN_M) 34762306a36Sopenharmony_ci#define FW_FILTER_WR_INSVLAN_F FW_FILTER_WR_INSVLAN_V(1U) 34862306a36Sopenharmony_ci 34962306a36Sopenharmony_ci#define FW_FILTER_WR_RMVLAN_S 16 35062306a36Sopenharmony_ci#define FW_FILTER_WR_RMVLAN_M 0x1 35162306a36Sopenharmony_ci#define FW_FILTER_WR_RMVLAN_V(x) ((x) << FW_FILTER_WR_RMVLAN_S) 35262306a36Sopenharmony_ci#define FW_FILTER_WR_RMVLAN_G(x) \ 35362306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_RMVLAN_S) & FW_FILTER_WR_RMVLAN_M) 35462306a36Sopenharmony_ci#define FW_FILTER_WR_RMVLAN_F FW_FILTER_WR_RMVLAN_V(1U) 35562306a36Sopenharmony_ci 35662306a36Sopenharmony_ci#define FW_FILTER_WR_HITCNTS_S 15 35762306a36Sopenharmony_ci#define FW_FILTER_WR_HITCNTS_M 0x1 35862306a36Sopenharmony_ci#define FW_FILTER_WR_HITCNTS_V(x) ((x) << FW_FILTER_WR_HITCNTS_S) 35962306a36Sopenharmony_ci#define FW_FILTER_WR_HITCNTS_G(x) \ 36062306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_HITCNTS_S) & FW_FILTER_WR_HITCNTS_M) 36162306a36Sopenharmony_ci#define FW_FILTER_WR_HITCNTS_F FW_FILTER_WR_HITCNTS_V(1U) 36262306a36Sopenharmony_ci 36362306a36Sopenharmony_ci#define FW_FILTER_WR_TXCHAN_S 13 36462306a36Sopenharmony_ci#define FW_FILTER_WR_TXCHAN_M 0x3 36562306a36Sopenharmony_ci#define FW_FILTER_WR_TXCHAN_V(x) ((x) << FW_FILTER_WR_TXCHAN_S) 36662306a36Sopenharmony_ci#define FW_FILTER_WR_TXCHAN_G(x) \ 36762306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_TXCHAN_S) & FW_FILTER_WR_TXCHAN_M) 36862306a36Sopenharmony_ci 36962306a36Sopenharmony_ci#define FW_FILTER_WR_PRIO_S 12 37062306a36Sopenharmony_ci#define FW_FILTER_WR_PRIO_M 0x1 37162306a36Sopenharmony_ci#define FW_FILTER_WR_PRIO_V(x) ((x) << FW_FILTER_WR_PRIO_S) 37262306a36Sopenharmony_ci#define FW_FILTER_WR_PRIO_G(x) \ 37362306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_PRIO_S) & FW_FILTER_WR_PRIO_M) 37462306a36Sopenharmony_ci#define FW_FILTER_WR_PRIO_F FW_FILTER_WR_PRIO_V(1U) 37562306a36Sopenharmony_ci 37662306a36Sopenharmony_ci#define FW_FILTER_WR_L2TIX_S 0 37762306a36Sopenharmony_ci#define FW_FILTER_WR_L2TIX_M 0xfff 37862306a36Sopenharmony_ci#define FW_FILTER_WR_L2TIX_V(x) ((x) << FW_FILTER_WR_L2TIX_S) 37962306a36Sopenharmony_ci#define FW_FILTER_WR_L2TIX_G(x) \ 38062306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_L2TIX_S) & FW_FILTER_WR_L2TIX_M) 38162306a36Sopenharmony_ci 38262306a36Sopenharmony_ci#define FW_FILTER_WR_FRAG_S 7 38362306a36Sopenharmony_ci#define FW_FILTER_WR_FRAG_M 0x1 38462306a36Sopenharmony_ci#define FW_FILTER_WR_FRAG_V(x) ((x) << FW_FILTER_WR_FRAG_S) 38562306a36Sopenharmony_ci#define FW_FILTER_WR_FRAG_G(x) \ 38662306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_FRAG_S) & FW_FILTER_WR_FRAG_M) 38762306a36Sopenharmony_ci#define FW_FILTER_WR_FRAG_F FW_FILTER_WR_FRAG_V(1U) 38862306a36Sopenharmony_ci 38962306a36Sopenharmony_ci#define FW_FILTER_WR_FRAGM_S 6 39062306a36Sopenharmony_ci#define FW_FILTER_WR_FRAGM_M 0x1 39162306a36Sopenharmony_ci#define FW_FILTER_WR_FRAGM_V(x) ((x) << FW_FILTER_WR_FRAGM_S) 39262306a36Sopenharmony_ci#define FW_FILTER_WR_FRAGM_G(x) \ 39362306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_FRAGM_S) & FW_FILTER_WR_FRAGM_M) 39462306a36Sopenharmony_ci#define FW_FILTER_WR_FRAGM_F FW_FILTER_WR_FRAGM_V(1U) 39562306a36Sopenharmony_ci 39662306a36Sopenharmony_ci#define FW_FILTER_WR_IVLAN_VLD_S 5 39762306a36Sopenharmony_ci#define FW_FILTER_WR_IVLAN_VLD_M 0x1 39862306a36Sopenharmony_ci#define FW_FILTER_WR_IVLAN_VLD_V(x) ((x) << FW_FILTER_WR_IVLAN_VLD_S) 39962306a36Sopenharmony_ci#define FW_FILTER_WR_IVLAN_VLD_G(x) \ 40062306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_IVLAN_VLD_S) & FW_FILTER_WR_IVLAN_VLD_M) 40162306a36Sopenharmony_ci#define FW_FILTER_WR_IVLAN_VLD_F FW_FILTER_WR_IVLAN_VLD_V(1U) 40262306a36Sopenharmony_ci 40362306a36Sopenharmony_ci#define FW_FILTER_WR_OVLAN_VLD_S 4 40462306a36Sopenharmony_ci#define FW_FILTER_WR_OVLAN_VLD_M 0x1 40562306a36Sopenharmony_ci#define FW_FILTER_WR_OVLAN_VLD_V(x) ((x) << FW_FILTER_WR_OVLAN_VLD_S) 40662306a36Sopenharmony_ci#define FW_FILTER_WR_OVLAN_VLD_G(x) \ 40762306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_OVLAN_VLD_S) & FW_FILTER_WR_OVLAN_VLD_M) 40862306a36Sopenharmony_ci#define FW_FILTER_WR_OVLAN_VLD_F FW_FILTER_WR_OVLAN_VLD_V(1U) 40962306a36Sopenharmony_ci 41062306a36Sopenharmony_ci#define FW_FILTER_WR_IVLAN_VLDM_S 3 41162306a36Sopenharmony_ci#define FW_FILTER_WR_IVLAN_VLDM_M 0x1 41262306a36Sopenharmony_ci#define FW_FILTER_WR_IVLAN_VLDM_V(x) ((x) << FW_FILTER_WR_IVLAN_VLDM_S) 41362306a36Sopenharmony_ci#define FW_FILTER_WR_IVLAN_VLDM_G(x) \ 41462306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_IVLAN_VLDM_S) & FW_FILTER_WR_IVLAN_VLDM_M) 41562306a36Sopenharmony_ci#define FW_FILTER_WR_IVLAN_VLDM_F FW_FILTER_WR_IVLAN_VLDM_V(1U) 41662306a36Sopenharmony_ci 41762306a36Sopenharmony_ci#define FW_FILTER_WR_OVLAN_VLDM_S 2 41862306a36Sopenharmony_ci#define FW_FILTER_WR_OVLAN_VLDM_M 0x1 41962306a36Sopenharmony_ci#define FW_FILTER_WR_OVLAN_VLDM_V(x) ((x) << FW_FILTER_WR_OVLAN_VLDM_S) 42062306a36Sopenharmony_ci#define FW_FILTER_WR_OVLAN_VLDM_G(x) \ 42162306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_OVLAN_VLDM_S) & FW_FILTER_WR_OVLAN_VLDM_M) 42262306a36Sopenharmony_ci#define FW_FILTER_WR_OVLAN_VLDM_F FW_FILTER_WR_OVLAN_VLDM_V(1U) 42362306a36Sopenharmony_ci 42462306a36Sopenharmony_ci#define FW_FILTER_WR_RX_CHAN_S 15 42562306a36Sopenharmony_ci#define FW_FILTER_WR_RX_CHAN_M 0x1 42662306a36Sopenharmony_ci#define FW_FILTER_WR_RX_CHAN_V(x) ((x) << FW_FILTER_WR_RX_CHAN_S) 42762306a36Sopenharmony_ci#define FW_FILTER_WR_RX_CHAN_G(x) \ 42862306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_RX_CHAN_S) & FW_FILTER_WR_RX_CHAN_M) 42962306a36Sopenharmony_ci#define FW_FILTER_WR_RX_CHAN_F FW_FILTER_WR_RX_CHAN_V(1U) 43062306a36Sopenharmony_ci 43162306a36Sopenharmony_ci#define FW_FILTER_WR_RX_RPL_IQ_S 0 43262306a36Sopenharmony_ci#define FW_FILTER_WR_RX_RPL_IQ_M 0x3ff 43362306a36Sopenharmony_ci#define FW_FILTER_WR_RX_RPL_IQ_V(x) ((x) << FW_FILTER_WR_RX_RPL_IQ_S) 43462306a36Sopenharmony_ci#define FW_FILTER_WR_RX_RPL_IQ_G(x) \ 43562306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_RX_RPL_IQ_S) & FW_FILTER_WR_RX_RPL_IQ_M) 43662306a36Sopenharmony_ci 43762306a36Sopenharmony_ci#define FW_FILTER2_WR_FILTER_TYPE_S 1 43862306a36Sopenharmony_ci#define FW_FILTER2_WR_FILTER_TYPE_M 0x1 43962306a36Sopenharmony_ci#define FW_FILTER2_WR_FILTER_TYPE_V(x) ((x) << FW_FILTER2_WR_FILTER_TYPE_S) 44062306a36Sopenharmony_ci#define FW_FILTER2_WR_FILTER_TYPE_G(x) \ 44162306a36Sopenharmony_ci (((x) >> FW_FILTER2_WR_FILTER_TYPE_S) & FW_FILTER2_WR_FILTER_TYPE_M) 44262306a36Sopenharmony_ci#define FW_FILTER2_WR_FILTER_TYPE_F FW_FILTER2_WR_FILTER_TYPE_V(1U) 44362306a36Sopenharmony_ci 44462306a36Sopenharmony_ci#define FW_FILTER2_WR_NATMODE_S 5 44562306a36Sopenharmony_ci#define FW_FILTER2_WR_NATMODE_M 0x7 44662306a36Sopenharmony_ci#define FW_FILTER2_WR_NATMODE_V(x) ((x) << FW_FILTER2_WR_NATMODE_S) 44762306a36Sopenharmony_ci#define FW_FILTER2_WR_NATMODE_G(x) \ 44862306a36Sopenharmony_ci (((x) >> FW_FILTER2_WR_NATMODE_S) & FW_FILTER2_WR_NATMODE_M) 44962306a36Sopenharmony_ci 45062306a36Sopenharmony_ci#define FW_FILTER2_WR_NATFLAGCHECK_S 4 45162306a36Sopenharmony_ci#define FW_FILTER2_WR_NATFLAGCHECK_M 0x1 45262306a36Sopenharmony_ci#define FW_FILTER2_WR_NATFLAGCHECK_V(x) ((x) << FW_FILTER2_WR_NATFLAGCHECK_S) 45362306a36Sopenharmony_ci#define FW_FILTER2_WR_NATFLAGCHECK_G(x) \ 45462306a36Sopenharmony_ci (((x) >> FW_FILTER2_WR_NATFLAGCHECK_S) & FW_FILTER2_WR_NATFLAGCHECK_M) 45562306a36Sopenharmony_ci#define FW_FILTER2_WR_NATFLAGCHECK_F FW_FILTER2_WR_NATFLAGCHECK_V(1U) 45662306a36Sopenharmony_ci 45762306a36Sopenharmony_ci#define FW_FILTER2_WR_ULP_TYPE_S 0 45862306a36Sopenharmony_ci#define FW_FILTER2_WR_ULP_TYPE_M 0xf 45962306a36Sopenharmony_ci#define FW_FILTER2_WR_ULP_TYPE_V(x) ((x) << FW_FILTER2_WR_ULP_TYPE_S) 46062306a36Sopenharmony_ci#define FW_FILTER2_WR_ULP_TYPE_G(x) \ 46162306a36Sopenharmony_ci (((x) >> FW_FILTER2_WR_ULP_TYPE_S) & FW_FILTER2_WR_ULP_TYPE_M) 46262306a36Sopenharmony_ci 46362306a36Sopenharmony_ci#define FW_FILTER_WR_MACI_S 23 46462306a36Sopenharmony_ci#define FW_FILTER_WR_MACI_M 0x1ff 46562306a36Sopenharmony_ci#define FW_FILTER_WR_MACI_V(x) ((x) << FW_FILTER_WR_MACI_S) 46662306a36Sopenharmony_ci#define FW_FILTER_WR_MACI_G(x) \ 46762306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_MACI_S) & FW_FILTER_WR_MACI_M) 46862306a36Sopenharmony_ci 46962306a36Sopenharmony_ci#define FW_FILTER_WR_MACIM_S 14 47062306a36Sopenharmony_ci#define FW_FILTER_WR_MACIM_M 0x1ff 47162306a36Sopenharmony_ci#define FW_FILTER_WR_MACIM_V(x) ((x) << FW_FILTER_WR_MACIM_S) 47262306a36Sopenharmony_ci#define FW_FILTER_WR_MACIM_G(x) \ 47362306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_MACIM_S) & FW_FILTER_WR_MACIM_M) 47462306a36Sopenharmony_ci 47562306a36Sopenharmony_ci#define FW_FILTER_WR_FCOE_S 13 47662306a36Sopenharmony_ci#define FW_FILTER_WR_FCOE_M 0x1 47762306a36Sopenharmony_ci#define FW_FILTER_WR_FCOE_V(x) ((x) << FW_FILTER_WR_FCOE_S) 47862306a36Sopenharmony_ci#define FW_FILTER_WR_FCOE_G(x) \ 47962306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_FCOE_S) & FW_FILTER_WR_FCOE_M) 48062306a36Sopenharmony_ci#define FW_FILTER_WR_FCOE_F FW_FILTER_WR_FCOE_V(1U) 48162306a36Sopenharmony_ci 48262306a36Sopenharmony_ci#define FW_FILTER_WR_FCOEM_S 12 48362306a36Sopenharmony_ci#define FW_FILTER_WR_FCOEM_M 0x1 48462306a36Sopenharmony_ci#define FW_FILTER_WR_FCOEM_V(x) ((x) << FW_FILTER_WR_FCOEM_S) 48562306a36Sopenharmony_ci#define FW_FILTER_WR_FCOEM_G(x) \ 48662306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_FCOEM_S) & FW_FILTER_WR_FCOEM_M) 48762306a36Sopenharmony_ci#define FW_FILTER_WR_FCOEM_F FW_FILTER_WR_FCOEM_V(1U) 48862306a36Sopenharmony_ci 48962306a36Sopenharmony_ci#define FW_FILTER_WR_PORT_S 9 49062306a36Sopenharmony_ci#define FW_FILTER_WR_PORT_M 0x7 49162306a36Sopenharmony_ci#define FW_FILTER_WR_PORT_V(x) ((x) << FW_FILTER_WR_PORT_S) 49262306a36Sopenharmony_ci#define FW_FILTER_WR_PORT_G(x) \ 49362306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_PORT_S) & FW_FILTER_WR_PORT_M) 49462306a36Sopenharmony_ci 49562306a36Sopenharmony_ci#define FW_FILTER_WR_PORTM_S 6 49662306a36Sopenharmony_ci#define FW_FILTER_WR_PORTM_M 0x7 49762306a36Sopenharmony_ci#define FW_FILTER_WR_PORTM_V(x) ((x) << FW_FILTER_WR_PORTM_S) 49862306a36Sopenharmony_ci#define FW_FILTER_WR_PORTM_G(x) \ 49962306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_PORTM_S) & FW_FILTER_WR_PORTM_M) 50062306a36Sopenharmony_ci 50162306a36Sopenharmony_ci#define FW_FILTER_WR_MATCHTYPE_S 3 50262306a36Sopenharmony_ci#define FW_FILTER_WR_MATCHTYPE_M 0x7 50362306a36Sopenharmony_ci#define FW_FILTER_WR_MATCHTYPE_V(x) ((x) << FW_FILTER_WR_MATCHTYPE_S) 50462306a36Sopenharmony_ci#define FW_FILTER_WR_MATCHTYPE_G(x) \ 50562306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_MATCHTYPE_S) & FW_FILTER_WR_MATCHTYPE_M) 50662306a36Sopenharmony_ci 50762306a36Sopenharmony_ci#define FW_FILTER_WR_MATCHTYPEM_S 0 50862306a36Sopenharmony_ci#define FW_FILTER_WR_MATCHTYPEM_M 0x7 50962306a36Sopenharmony_ci#define FW_FILTER_WR_MATCHTYPEM_V(x) ((x) << FW_FILTER_WR_MATCHTYPEM_S) 51062306a36Sopenharmony_ci#define FW_FILTER_WR_MATCHTYPEM_G(x) \ 51162306a36Sopenharmony_ci (((x) >> FW_FILTER_WR_MATCHTYPEM_S) & FW_FILTER_WR_MATCHTYPEM_M) 51262306a36Sopenharmony_ci 51362306a36Sopenharmony_cistruct fw_ulptx_wr { 51462306a36Sopenharmony_ci __be32 op_to_compl; 51562306a36Sopenharmony_ci __be32 flowid_len16; 51662306a36Sopenharmony_ci u64 cookie; 51762306a36Sopenharmony_ci}; 51862306a36Sopenharmony_ci 51962306a36Sopenharmony_ci#define FW_ULPTX_WR_DATA_S 28 52062306a36Sopenharmony_ci#define FW_ULPTX_WR_DATA_M 0x1 52162306a36Sopenharmony_ci#define FW_ULPTX_WR_DATA_V(x) ((x) << FW_ULPTX_WR_DATA_S) 52262306a36Sopenharmony_ci#define FW_ULPTX_WR_DATA_G(x) \ 52362306a36Sopenharmony_ci (((x) >> FW_ULPTX_WR_DATA_S) & FW_ULPTX_WR_DATA_M) 52462306a36Sopenharmony_ci#define FW_ULPTX_WR_DATA_F FW_ULPTX_WR_DATA_V(1U) 52562306a36Sopenharmony_ci 52662306a36Sopenharmony_cistruct fw_tp_wr { 52762306a36Sopenharmony_ci __be32 op_to_immdlen; 52862306a36Sopenharmony_ci __be32 flowid_len16; 52962306a36Sopenharmony_ci u64 cookie; 53062306a36Sopenharmony_ci}; 53162306a36Sopenharmony_ci 53262306a36Sopenharmony_cistruct fw_eth_tx_pkt_wr { 53362306a36Sopenharmony_ci __be32 op_immdlen; 53462306a36Sopenharmony_ci __be32 equiq_to_len16; 53562306a36Sopenharmony_ci __be64 r3; 53662306a36Sopenharmony_ci}; 53762306a36Sopenharmony_ci 53862306a36Sopenharmony_cienum fw_eth_tx_eo_type { 53962306a36Sopenharmony_ci FW_ETH_TX_EO_TYPE_UDPSEG = 0, 54062306a36Sopenharmony_ci FW_ETH_TX_EO_TYPE_TCPSEG, 54162306a36Sopenharmony_ci}; 54262306a36Sopenharmony_ci 54362306a36Sopenharmony_cistruct fw_eth_tx_eo_wr { 54462306a36Sopenharmony_ci __be32 op_immdlen; 54562306a36Sopenharmony_ci __be32 equiq_to_len16; 54662306a36Sopenharmony_ci __be64 r3; 54762306a36Sopenharmony_ci union fw_eth_tx_eo { 54862306a36Sopenharmony_ci struct fw_eth_tx_eo_udpseg { 54962306a36Sopenharmony_ci __u8 type; 55062306a36Sopenharmony_ci __u8 ethlen; 55162306a36Sopenharmony_ci __be16 iplen; 55262306a36Sopenharmony_ci __u8 udplen; 55362306a36Sopenharmony_ci __u8 rtplen; 55462306a36Sopenharmony_ci __be16 r4; 55562306a36Sopenharmony_ci __be16 mss; 55662306a36Sopenharmony_ci __be16 schedpktsize; 55762306a36Sopenharmony_ci __be32 plen; 55862306a36Sopenharmony_ci } udpseg; 55962306a36Sopenharmony_ci struct fw_eth_tx_eo_tcpseg { 56062306a36Sopenharmony_ci __u8 type; 56162306a36Sopenharmony_ci __u8 ethlen; 56262306a36Sopenharmony_ci __be16 iplen; 56362306a36Sopenharmony_ci __u8 tcplen; 56462306a36Sopenharmony_ci __u8 tsclk_tsoff; 56562306a36Sopenharmony_ci __be16 r4; 56662306a36Sopenharmony_ci __be16 mss; 56762306a36Sopenharmony_ci __be16 r5; 56862306a36Sopenharmony_ci __be32 plen; 56962306a36Sopenharmony_ci } tcpseg; 57062306a36Sopenharmony_ci } u; 57162306a36Sopenharmony_ci}; 57262306a36Sopenharmony_ci 57362306a36Sopenharmony_ci#define FW_ETH_TX_EO_WR_IMMDLEN_S 0 57462306a36Sopenharmony_ci#define FW_ETH_TX_EO_WR_IMMDLEN_M 0x1ff 57562306a36Sopenharmony_ci#define FW_ETH_TX_EO_WR_IMMDLEN_V(x) ((x) << FW_ETH_TX_EO_WR_IMMDLEN_S) 57662306a36Sopenharmony_ci#define FW_ETH_TX_EO_WR_IMMDLEN_G(x) \ 57762306a36Sopenharmony_ci (((x) >> FW_ETH_TX_EO_WR_IMMDLEN_S) & FW_ETH_TX_EO_WR_IMMDLEN_M) 57862306a36Sopenharmony_ci 57962306a36Sopenharmony_cistruct fw_ofld_connection_wr { 58062306a36Sopenharmony_ci __be32 op_compl; 58162306a36Sopenharmony_ci __be32 len16_pkd; 58262306a36Sopenharmony_ci __u64 cookie; 58362306a36Sopenharmony_ci __be64 r2; 58462306a36Sopenharmony_ci __be64 r3; 58562306a36Sopenharmony_ci struct fw_ofld_connection_le { 58662306a36Sopenharmony_ci __be32 version_cpl; 58762306a36Sopenharmony_ci __be32 filter; 58862306a36Sopenharmony_ci __be32 r1; 58962306a36Sopenharmony_ci __be16 lport; 59062306a36Sopenharmony_ci __be16 pport; 59162306a36Sopenharmony_ci union fw_ofld_connection_leip { 59262306a36Sopenharmony_ci struct fw_ofld_connection_le_ipv4 { 59362306a36Sopenharmony_ci __be32 pip; 59462306a36Sopenharmony_ci __be32 lip; 59562306a36Sopenharmony_ci __be64 r0; 59662306a36Sopenharmony_ci __be64 r1; 59762306a36Sopenharmony_ci __be64 r2; 59862306a36Sopenharmony_ci } ipv4; 59962306a36Sopenharmony_ci struct fw_ofld_connection_le_ipv6 { 60062306a36Sopenharmony_ci __be64 pip_hi; 60162306a36Sopenharmony_ci __be64 pip_lo; 60262306a36Sopenharmony_ci __be64 lip_hi; 60362306a36Sopenharmony_ci __be64 lip_lo; 60462306a36Sopenharmony_ci } ipv6; 60562306a36Sopenharmony_ci } u; 60662306a36Sopenharmony_ci } le; 60762306a36Sopenharmony_ci struct fw_ofld_connection_tcb { 60862306a36Sopenharmony_ci __be32 t_state_to_astid; 60962306a36Sopenharmony_ci __be16 cplrxdataack_cplpassacceptrpl; 61062306a36Sopenharmony_ci __be16 rcv_adv; 61162306a36Sopenharmony_ci __be32 rcv_nxt; 61262306a36Sopenharmony_ci __be32 tx_max; 61362306a36Sopenharmony_ci __be64 opt0; 61462306a36Sopenharmony_ci __be32 opt2; 61562306a36Sopenharmony_ci __be32 r1; 61662306a36Sopenharmony_ci __be64 r2; 61762306a36Sopenharmony_ci __be64 r3; 61862306a36Sopenharmony_ci } tcb; 61962306a36Sopenharmony_ci}; 62062306a36Sopenharmony_ci 62162306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_VERSION_S 31 62262306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_VERSION_M 0x1 62362306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_VERSION_V(x) \ 62462306a36Sopenharmony_ci ((x) << FW_OFLD_CONNECTION_WR_VERSION_S) 62562306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_VERSION_G(x) \ 62662306a36Sopenharmony_ci (((x) >> FW_OFLD_CONNECTION_WR_VERSION_S) & \ 62762306a36Sopenharmony_ci FW_OFLD_CONNECTION_WR_VERSION_M) 62862306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_VERSION_F \ 62962306a36Sopenharmony_ci FW_OFLD_CONNECTION_WR_VERSION_V(1U) 63062306a36Sopenharmony_ci 63162306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_CPL_S 30 63262306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_CPL_M 0x1 63362306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_CPL_V(x) ((x) << FW_OFLD_CONNECTION_WR_CPL_S) 63462306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_CPL_G(x) \ 63562306a36Sopenharmony_ci (((x) >> FW_OFLD_CONNECTION_WR_CPL_S) & FW_OFLD_CONNECTION_WR_CPL_M) 63662306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_CPL_F FW_OFLD_CONNECTION_WR_CPL_V(1U) 63762306a36Sopenharmony_ci 63862306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_T_STATE_S 28 63962306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_T_STATE_M 0xf 64062306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_T_STATE_V(x) \ 64162306a36Sopenharmony_ci ((x) << FW_OFLD_CONNECTION_WR_T_STATE_S) 64262306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_T_STATE_G(x) \ 64362306a36Sopenharmony_ci (((x) >> FW_OFLD_CONNECTION_WR_T_STATE_S) & \ 64462306a36Sopenharmony_ci FW_OFLD_CONNECTION_WR_T_STATE_M) 64562306a36Sopenharmony_ci 64662306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_RCV_SCALE_S 24 64762306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_RCV_SCALE_M 0xf 64862306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_RCV_SCALE_V(x) \ 64962306a36Sopenharmony_ci ((x) << FW_OFLD_CONNECTION_WR_RCV_SCALE_S) 65062306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_RCV_SCALE_G(x) \ 65162306a36Sopenharmony_ci (((x) >> FW_OFLD_CONNECTION_WR_RCV_SCALE_S) & \ 65262306a36Sopenharmony_ci FW_OFLD_CONNECTION_WR_RCV_SCALE_M) 65362306a36Sopenharmony_ci 65462306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_ASTID_S 0 65562306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_ASTID_M 0xffffff 65662306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_ASTID_V(x) \ 65762306a36Sopenharmony_ci ((x) << FW_OFLD_CONNECTION_WR_ASTID_S) 65862306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_ASTID_G(x) \ 65962306a36Sopenharmony_ci (((x) >> FW_OFLD_CONNECTION_WR_ASTID_S) & FW_OFLD_CONNECTION_WR_ASTID_M) 66062306a36Sopenharmony_ci 66162306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_CPLRXDATAACK_S 15 66262306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_CPLRXDATAACK_M 0x1 66362306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_CPLRXDATAACK_V(x) \ 66462306a36Sopenharmony_ci ((x) << FW_OFLD_CONNECTION_WR_CPLRXDATAACK_S) 66562306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_CPLRXDATAACK_G(x) \ 66662306a36Sopenharmony_ci (((x) >> FW_OFLD_CONNECTION_WR_CPLRXDATAACK_S) & \ 66762306a36Sopenharmony_ci FW_OFLD_CONNECTION_WR_CPLRXDATAACK_M) 66862306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_CPLRXDATAACK_F \ 66962306a36Sopenharmony_ci FW_OFLD_CONNECTION_WR_CPLRXDATAACK_V(1U) 67062306a36Sopenharmony_ci 67162306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_CPLPASSACCEPTRPL_S 14 67262306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_CPLPASSACCEPTRPL_M 0x1 67362306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_CPLPASSACCEPTRPL_V(x) \ 67462306a36Sopenharmony_ci ((x) << FW_OFLD_CONNECTION_WR_CPLPASSACCEPTRPL_S) 67562306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_CPLPASSACCEPTRPL_G(x) \ 67662306a36Sopenharmony_ci (((x) >> FW_OFLD_CONNECTION_WR_CPLPASSACCEPTRPL_S) & \ 67762306a36Sopenharmony_ci FW_OFLD_CONNECTION_WR_CPLPASSACCEPTRPL_M) 67862306a36Sopenharmony_ci#define FW_OFLD_CONNECTION_WR_CPLPASSACCEPTRPL_F \ 67962306a36Sopenharmony_ci FW_OFLD_CONNECTION_WR_CPLPASSACCEPTRPL_V(1U) 68062306a36Sopenharmony_ci 68162306a36Sopenharmony_cienum fw_flowc_mnem_tcpstate { 68262306a36Sopenharmony_ci FW_FLOWC_MNEM_TCPSTATE_CLOSED = 0, /* illegal */ 68362306a36Sopenharmony_ci FW_FLOWC_MNEM_TCPSTATE_LISTEN = 1, /* illegal */ 68462306a36Sopenharmony_ci FW_FLOWC_MNEM_TCPSTATE_SYNSENT = 2, /* illegal */ 68562306a36Sopenharmony_ci FW_FLOWC_MNEM_TCPSTATE_SYNRECEIVED = 3, /* illegal */ 68662306a36Sopenharmony_ci FW_FLOWC_MNEM_TCPSTATE_ESTABLISHED = 4, /* default */ 68762306a36Sopenharmony_ci FW_FLOWC_MNEM_TCPSTATE_CLOSEWAIT = 5, /* got peer close already */ 68862306a36Sopenharmony_ci FW_FLOWC_MNEM_TCPSTATE_FINWAIT1 = 6, /* haven't gotten ACK for FIN and 68962306a36Sopenharmony_ci * will resend FIN - equiv ESTAB 69062306a36Sopenharmony_ci */ 69162306a36Sopenharmony_ci FW_FLOWC_MNEM_TCPSTATE_CLOSING = 7, /* haven't gotten ACK for FIN and 69262306a36Sopenharmony_ci * will resend FIN but have 69362306a36Sopenharmony_ci * received FIN 69462306a36Sopenharmony_ci */ 69562306a36Sopenharmony_ci FW_FLOWC_MNEM_TCPSTATE_LASTACK = 8, /* haven't gotten ACK for FIN and 69662306a36Sopenharmony_ci * will resend FIN but have 69762306a36Sopenharmony_ci * received FIN 69862306a36Sopenharmony_ci */ 69962306a36Sopenharmony_ci FW_FLOWC_MNEM_TCPSTATE_FINWAIT2 = 9, /* sent FIN and got FIN + ACK, 70062306a36Sopenharmony_ci * waiting for FIN 70162306a36Sopenharmony_ci */ 70262306a36Sopenharmony_ci FW_FLOWC_MNEM_TCPSTATE_TIMEWAIT = 10, /* not expected */ 70362306a36Sopenharmony_ci}; 70462306a36Sopenharmony_ci 70562306a36Sopenharmony_cienum fw_flowc_mnem_eostate { 70662306a36Sopenharmony_ci FW_FLOWC_MNEM_EOSTATE_ESTABLISHED = 1, /* default */ 70762306a36Sopenharmony_ci /* graceful close, after sending outstanding payload */ 70862306a36Sopenharmony_ci FW_FLOWC_MNEM_EOSTATE_CLOSING = 2, 70962306a36Sopenharmony_ci}; 71062306a36Sopenharmony_ci 71162306a36Sopenharmony_cienum fw_flowc_mnem { 71262306a36Sopenharmony_ci FW_FLOWC_MNEM_PFNVFN, /* PFN [15:8] VFN [7:0] */ 71362306a36Sopenharmony_ci FW_FLOWC_MNEM_CH, 71462306a36Sopenharmony_ci FW_FLOWC_MNEM_PORT, 71562306a36Sopenharmony_ci FW_FLOWC_MNEM_IQID, 71662306a36Sopenharmony_ci FW_FLOWC_MNEM_SNDNXT, 71762306a36Sopenharmony_ci FW_FLOWC_MNEM_RCVNXT, 71862306a36Sopenharmony_ci FW_FLOWC_MNEM_SNDBUF, 71962306a36Sopenharmony_ci FW_FLOWC_MNEM_MSS, 72062306a36Sopenharmony_ci FW_FLOWC_MNEM_TXDATAPLEN_MAX, 72162306a36Sopenharmony_ci FW_FLOWC_MNEM_TCPSTATE, 72262306a36Sopenharmony_ci FW_FLOWC_MNEM_EOSTATE, 72362306a36Sopenharmony_ci FW_FLOWC_MNEM_SCHEDCLASS, 72462306a36Sopenharmony_ci FW_FLOWC_MNEM_DCBPRIO, 72562306a36Sopenharmony_ci FW_FLOWC_MNEM_SND_SCALE, 72662306a36Sopenharmony_ci FW_FLOWC_MNEM_RCV_SCALE, 72762306a36Sopenharmony_ci FW_FLOWC_MNEM_ULD_MODE, 72862306a36Sopenharmony_ci FW_FLOWC_MNEM_MAX, 72962306a36Sopenharmony_ci}; 73062306a36Sopenharmony_ci 73162306a36Sopenharmony_cistruct fw_flowc_mnemval { 73262306a36Sopenharmony_ci u8 mnemonic; 73362306a36Sopenharmony_ci u8 r4[3]; 73462306a36Sopenharmony_ci __be32 val; 73562306a36Sopenharmony_ci}; 73662306a36Sopenharmony_ci 73762306a36Sopenharmony_cistruct fw_flowc_wr { 73862306a36Sopenharmony_ci __be32 op_to_nparams; 73962306a36Sopenharmony_ci __be32 flowid_len16; 74062306a36Sopenharmony_ci struct fw_flowc_mnemval mnemval[]; 74162306a36Sopenharmony_ci}; 74262306a36Sopenharmony_ci 74362306a36Sopenharmony_ci#define FW_FLOWC_WR_NPARAMS_S 0 74462306a36Sopenharmony_ci#define FW_FLOWC_WR_NPARAMS_V(x) ((x) << FW_FLOWC_WR_NPARAMS_S) 74562306a36Sopenharmony_ci 74662306a36Sopenharmony_cistruct fw_ofld_tx_data_wr { 74762306a36Sopenharmony_ci __be32 op_to_immdlen; 74862306a36Sopenharmony_ci __be32 flowid_len16; 74962306a36Sopenharmony_ci __be32 plen; 75062306a36Sopenharmony_ci __be32 tunnel_to_proxy; 75162306a36Sopenharmony_ci}; 75262306a36Sopenharmony_ci 75362306a36Sopenharmony_ci#define FW_OFLD_TX_DATA_WR_ALIGNPLD_S 30 75462306a36Sopenharmony_ci#define FW_OFLD_TX_DATA_WR_ALIGNPLD_V(x) ((x) << FW_OFLD_TX_DATA_WR_ALIGNPLD_S) 75562306a36Sopenharmony_ci#define FW_OFLD_TX_DATA_WR_ALIGNPLD_F FW_OFLD_TX_DATA_WR_ALIGNPLD_V(1U) 75662306a36Sopenharmony_ci 75762306a36Sopenharmony_ci#define FW_OFLD_TX_DATA_WR_SHOVE_S 29 75862306a36Sopenharmony_ci#define FW_OFLD_TX_DATA_WR_SHOVE_V(x) ((x) << FW_OFLD_TX_DATA_WR_SHOVE_S) 75962306a36Sopenharmony_ci#define FW_OFLD_TX_DATA_WR_SHOVE_F FW_OFLD_TX_DATA_WR_SHOVE_V(1U) 76062306a36Sopenharmony_ci 76162306a36Sopenharmony_ci#define FW_OFLD_TX_DATA_WR_TUNNEL_S 19 76262306a36Sopenharmony_ci#define FW_OFLD_TX_DATA_WR_TUNNEL_V(x) ((x) << FW_OFLD_TX_DATA_WR_TUNNEL_S) 76362306a36Sopenharmony_ci 76462306a36Sopenharmony_ci#define FW_OFLD_TX_DATA_WR_SAVE_S 18 76562306a36Sopenharmony_ci#define FW_OFLD_TX_DATA_WR_SAVE_V(x) ((x) << FW_OFLD_TX_DATA_WR_SAVE_S) 76662306a36Sopenharmony_ci 76762306a36Sopenharmony_ci#define FW_OFLD_TX_DATA_WR_FLUSH_S 17 76862306a36Sopenharmony_ci#define FW_OFLD_TX_DATA_WR_FLUSH_V(x) ((x) << FW_OFLD_TX_DATA_WR_FLUSH_S) 76962306a36Sopenharmony_ci#define FW_OFLD_TX_DATA_WR_FLUSH_F FW_OFLD_TX_DATA_WR_FLUSH_V(1U) 77062306a36Sopenharmony_ci 77162306a36Sopenharmony_ci#define FW_OFLD_TX_DATA_WR_URGENT_S 16 77262306a36Sopenharmony_ci#define FW_OFLD_TX_DATA_WR_URGENT_V(x) ((x) << FW_OFLD_TX_DATA_WR_URGENT_S) 77362306a36Sopenharmony_ci 77462306a36Sopenharmony_ci#define FW_OFLD_TX_DATA_WR_MORE_S 15 77562306a36Sopenharmony_ci#define FW_OFLD_TX_DATA_WR_MORE_V(x) ((x) << FW_OFLD_TX_DATA_WR_MORE_S) 77662306a36Sopenharmony_ci 77762306a36Sopenharmony_ci#define FW_OFLD_TX_DATA_WR_ULPMODE_S 10 77862306a36Sopenharmony_ci#define FW_OFLD_TX_DATA_WR_ULPMODE_V(x) ((x) << FW_OFLD_TX_DATA_WR_ULPMODE_S) 77962306a36Sopenharmony_ci 78062306a36Sopenharmony_ci#define FW_OFLD_TX_DATA_WR_ULPSUBMODE_S 6 78162306a36Sopenharmony_ci#define FW_OFLD_TX_DATA_WR_ULPSUBMODE_V(x) \ 78262306a36Sopenharmony_ci ((x) << FW_OFLD_TX_DATA_WR_ULPSUBMODE_S) 78362306a36Sopenharmony_ci 78462306a36Sopenharmony_cistruct fw_cmd_wr { 78562306a36Sopenharmony_ci __be32 op_dma; 78662306a36Sopenharmony_ci __be32 len16_pkd; 78762306a36Sopenharmony_ci __be64 cookie_daddr; 78862306a36Sopenharmony_ci}; 78962306a36Sopenharmony_ci 79062306a36Sopenharmony_ci#define FW_CMD_WR_DMA_S 17 79162306a36Sopenharmony_ci#define FW_CMD_WR_DMA_V(x) ((x) << FW_CMD_WR_DMA_S) 79262306a36Sopenharmony_ci 79362306a36Sopenharmony_cistruct fw_eth_tx_pkt_vm_wr { 79462306a36Sopenharmony_ci __be32 op_immdlen; 79562306a36Sopenharmony_ci __be32 equiq_to_len16; 79662306a36Sopenharmony_ci __be32 r3[2]; 79762306a36Sopenharmony_ci struct_group(firmware, 79862306a36Sopenharmony_ci u8 ethmacdst[ETH_ALEN]; 79962306a36Sopenharmony_ci u8 ethmacsrc[ETH_ALEN]; 80062306a36Sopenharmony_ci __be16 ethtype; 80162306a36Sopenharmony_ci __be16 vlantci; 80262306a36Sopenharmony_ci ); 80362306a36Sopenharmony_ci}; 80462306a36Sopenharmony_ci 80562306a36Sopenharmony_ci#define FW_CMD_MAX_TIMEOUT 10000 80662306a36Sopenharmony_ci 80762306a36Sopenharmony_ci/* 80862306a36Sopenharmony_ci * If a host driver does a HELLO and discovers that there's already a MASTER 80962306a36Sopenharmony_ci * selected, we may have to wait for that MASTER to finish issuing RESET, 81062306a36Sopenharmony_ci * configuration and INITIALIZE commands. Also, there's a possibility that 81162306a36Sopenharmony_ci * our own HELLO may get lost if it happens right as the MASTER is issuign a 81262306a36Sopenharmony_ci * RESET command, so we need to be willing to make a few retries of our HELLO. 81362306a36Sopenharmony_ci */ 81462306a36Sopenharmony_ci#define FW_CMD_HELLO_TIMEOUT (3 * FW_CMD_MAX_TIMEOUT) 81562306a36Sopenharmony_ci#define FW_CMD_HELLO_RETRIES 3 81662306a36Sopenharmony_ci 81762306a36Sopenharmony_ci 81862306a36Sopenharmony_cienum fw_cmd_opcodes { 81962306a36Sopenharmony_ci FW_LDST_CMD = 0x01, 82062306a36Sopenharmony_ci FW_RESET_CMD = 0x03, 82162306a36Sopenharmony_ci FW_HELLO_CMD = 0x04, 82262306a36Sopenharmony_ci FW_BYE_CMD = 0x05, 82362306a36Sopenharmony_ci FW_INITIALIZE_CMD = 0x06, 82462306a36Sopenharmony_ci FW_CAPS_CONFIG_CMD = 0x07, 82562306a36Sopenharmony_ci FW_PARAMS_CMD = 0x08, 82662306a36Sopenharmony_ci FW_PFVF_CMD = 0x09, 82762306a36Sopenharmony_ci FW_IQ_CMD = 0x10, 82862306a36Sopenharmony_ci FW_EQ_MNGT_CMD = 0x11, 82962306a36Sopenharmony_ci FW_EQ_ETH_CMD = 0x12, 83062306a36Sopenharmony_ci FW_EQ_CTRL_CMD = 0x13, 83162306a36Sopenharmony_ci FW_EQ_OFLD_CMD = 0x21, 83262306a36Sopenharmony_ci FW_VI_CMD = 0x14, 83362306a36Sopenharmony_ci FW_VI_MAC_CMD = 0x15, 83462306a36Sopenharmony_ci FW_VI_RXMODE_CMD = 0x16, 83562306a36Sopenharmony_ci FW_VI_ENABLE_CMD = 0x17, 83662306a36Sopenharmony_ci FW_ACL_MAC_CMD = 0x18, 83762306a36Sopenharmony_ci FW_ACL_VLAN_CMD = 0x19, 83862306a36Sopenharmony_ci FW_VI_STATS_CMD = 0x1a, 83962306a36Sopenharmony_ci FW_PORT_CMD = 0x1b, 84062306a36Sopenharmony_ci FW_PORT_STATS_CMD = 0x1c, 84162306a36Sopenharmony_ci FW_PORT_LB_STATS_CMD = 0x1d, 84262306a36Sopenharmony_ci FW_PORT_TRACE_CMD = 0x1e, 84362306a36Sopenharmony_ci FW_PORT_TRACE_MMAP_CMD = 0x1f, 84462306a36Sopenharmony_ci FW_RSS_IND_TBL_CMD = 0x20, 84562306a36Sopenharmony_ci FW_RSS_GLB_CONFIG_CMD = 0x22, 84662306a36Sopenharmony_ci FW_RSS_VI_CONFIG_CMD = 0x23, 84762306a36Sopenharmony_ci FW_SCHED_CMD = 0x24, 84862306a36Sopenharmony_ci FW_DEVLOG_CMD = 0x25, 84962306a36Sopenharmony_ci FW_CLIP_CMD = 0x28, 85062306a36Sopenharmony_ci FW_PTP_CMD = 0x3e, 85162306a36Sopenharmony_ci FW_HMA_CMD = 0x3f, 85262306a36Sopenharmony_ci FW_LASTC2E_CMD = 0x40, 85362306a36Sopenharmony_ci FW_ERROR_CMD = 0x80, 85462306a36Sopenharmony_ci FW_DEBUG_CMD = 0x81, 85562306a36Sopenharmony_ci}; 85662306a36Sopenharmony_ci 85762306a36Sopenharmony_cienum fw_cmd_cap { 85862306a36Sopenharmony_ci FW_CMD_CAP_PF = 0x01, 85962306a36Sopenharmony_ci FW_CMD_CAP_DMAQ = 0x02, 86062306a36Sopenharmony_ci FW_CMD_CAP_PORT = 0x04, 86162306a36Sopenharmony_ci FW_CMD_CAP_PORTPROMISC = 0x08, 86262306a36Sopenharmony_ci FW_CMD_CAP_PORTSTATS = 0x10, 86362306a36Sopenharmony_ci FW_CMD_CAP_VF = 0x80, 86462306a36Sopenharmony_ci}; 86562306a36Sopenharmony_ci 86662306a36Sopenharmony_ci/* 86762306a36Sopenharmony_ci * Generic command header flit0 86862306a36Sopenharmony_ci */ 86962306a36Sopenharmony_cistruct fw_cmd_hdr { 87062306a36Sopenharmony_ci __be32 hi; 87162306a36Sopenharmony_ci __be32 lo; 87262306a36Sopenharmony_ci}; 87362306a36Sopenharmony_ci 87462306a36Sopenharmony_ci#define FW_CMD_OP_S 24 87562306a36Sopenharmony_ci#define FW_CMD_OP_M 0xff 87662306a36Sopenharmony_ci#define FW_CMD_OP_V(x) ((x) << FW_CMD_OP_S) 87762306a36Sopenharmony_ci#define FW_CMD_OP_G(x) (((x) >> FW_CMD_OP_S) & FW_CMD_OP_M) 87862306a36Sopenharmony_ci 87962306a36Sopenharmony_ci#define FW_CMD_REQUEST_S 23 88062306a36Sopenharmony_ci#define FW_CMD_REQUEST_V(x) ((x) << FW_CMD_REQUEST_S) 88162306a36Sopenharmony_ci#define FW_CMD_REQUEST_F FW_CMD_REQUEST_V(1U) 88262306a36Sopenharmony_ci 88362306a36Sopenharmony_ci#define FW_CMD_READ_S 22 88462306a36Sopenharmony_ci#define FW_CMD_READ_V(x) ((x) << FW_CMD_READ_S) 88562306a36Sopenharmony_ci#define FW_CMD_READ_F FW_CMD_READ_V(1U) 88662306a36Sopenharmony_ci 88762306a36Sopenharmony_ci#define FW_CMD_WRITE_S 21 88862306a36Sopenharmony_ci#define FW_CMD_WRITE_V(x) ((x) << FW_CMD_WRITE_S) 88962306a36Sopenharmony_ci#define FW_CMD_WRITE_F FW_CMD_WRITE_V(1U) 89062306a36Sopenharmony_ci 89162306a36Sopenharmony_ci#define FW_CMD_EXEC_S 20 89262306a36Sopenharmony_ci#define FW_CMD_EXEC_V(x) ((x) << FW_CMD_EXEC_S) 89362306a36Sopenharmony_ci#define FW_CMD_EXEC_F FW_CMD_EXEC_V(1U) 89462306a36Sopenharmony_ci 89562306a36Sopenharmony_ci#define FW_CMD_RAMASK_S 20 89662306a36Sopenharmony_ci#define FW_CMD_RAMASK_V(x) ((x) << FW_CMD_RAMASK_S) 89762306a36Sopenharmony_ci 89862306a36Sopenharmony_ci#define FW_CMD_RETVAL_S 8 89962306a36Sopenharmony_ci#define FW_CMD_RETVAL_M 0xff 90062306a36Sopenharmony_ci#define FW_CMD_RETVAL_V(x) ((x) << FW_CMD_RETVAL_S) 90162306a36Sopenharmony_ci#define FW_CMD_RETVAL_G(x) (((x) >> FW_CMD_RETVAL_S) & FW_CMD_RETVAL_M) 90262306a36Sopenharmony_ci 90362306a36Sopenharmony_ci#define FW_CMD_LEN16_S 0 90462306a36Sopenharmony_ci#define FW_CMD_LEN16_V(x) ((x) << FW_CMD_LEN16_S) 90562306a36Sopenharmony_ci 90662306a36Sopenharmony_ci#define FW_LEN16(fw_struct) FW_CMD_LEN16_V(sizeof(fw_struct) / 16) 90762306a36Sopenharmony_ci 90862306a36Sopenharmony_cienum fw_ldst_addrspc { 90962306a36Sopenharmony_ci FW_LDST_ADDRSPC_FIRMWARE = 0x0001, 91062306a36Sopenharmony_ci FW_LDST_ADDRSPC_SGE_EGRC = 0x0008, 91162306a36Sopenharmony_ci FW_LDST_ADDRSPC_SGE_INGC = 0x0009, 91262306a36Sopenharmony_ci FW_LDST_ADDRSPC_SGE_FLMC = 0x000a, 91362306a36Sopenharmony_ci FW_LDST_ADDRSPC_SGE_CONMC = 0x000b, 91462306a36Sopenharmony_ci FW_LDST_ADDRSPC_TP_PIO = 0x0010, 91562306a36Sopenharmony_ci FW_LDST_ADDRSPC_TP_TM_PIO = 0x0011, 91662306a36Sopenharmony_ci FW_LDST_ADDRSPC_TP_MIB = 0x0012, 91762306a36Sopenharmony_ci FW_LDST_ADDRSPC_MDIO = 0x0018, 91862306a36Sopenharmony_ci FW_LDST_ADDRSPC_MPS = 0x0020, 91962306a36Sopenharmony_ci FW_LDST_ADDRSPC_FUNC = 0x0028, 92062306a36Sopenharmony_ci FW_LDST_ADDRSPC_FUNC_PCIE = 0x0029, 92162306a36Sopenharmony_ci FW_LDST_ADDRSPC_I2C = 0x0038, 92262306a36Sopenharmony_ci}; 92362306a36Sopenharmony_ci 92462306a36Sopenharmony_cienum fw_ldst_mps_fid { 92562306a36Sopenharmony_ci FW_LDST_MPS_ATRB, 92662306a36Sopenharmony_ci FW_LDST_MPS_RPLC 92762306a36Sopenharmony_ci}; 92862306a36Sopenharmony_ci 92962306a36Sopenharmony_cienum fw_ldst_func_access_ctl { 93062306a36Sopenharmony_ci FW_LDST_FUNC_ACC_CTL_VIID, 93162306a36Sopenharmony_ci FW_LDST_FUNC_ACC_CTL_FID 93262306a36Sopenharmony_ci}; 93362306a36Sopenharmony_ci 93462306a36Sopenharmony_cienum fw_ldst_func_mod_index { 93562306a36Sopenharmony_ci FW_LDST_FUNC_MPS 93662306a36Sopenharmony_ci}; 93762306a36Sopenharmony_ci 93862306a36Sopenharmony_cistruct fw_ldst_cmd { 93962306a36Sopenharmony_ci __be32 op_to_addrspace; 94062306a36Sopenharmony_ci __be32 cycles_to_len16; 94162306a36Sopenharmony_ci union fw_ldst { 94262306a36Sopenharmony_ci struct fw_ldst_addrval { 94362306a36Sopenharmony_ci __be32 addr; 94462306a36Sopenharmony_ci __be32 val; 94562306a36Sopenharmony_ci } addrval; 94662306a36Sopenharmony_ci struct fw_ldst_idctxt { 94762306a36Sopenharmony_ci __be32 physid; 94862306a36Sopenharmony_ci __be32 msg_ctxtflush; 94962306a36Sopenharmony_ci __be32 ctxt_data7; 95062306a36Sopenharmony_ci __be32 ctxt_data6; 95162306a36Sopenharmony_ci __be32 ctxt_data5; 95262306a36Sopenharmony_ci __be32 ctxt_data4; 95362306a36Sopenharmony_ci __be32 ctxt_data3; 95462306a36Sopenharmony_ci __be32 ctxt_data2; 95562306a36Sopenharmony_ci __be32 ctxt_data1; 95662306a36Sopenharmony_ci __be32 ctxt_data0; 95762306a36Sopenharmony_ci } idctxt; 95862306a36Sopenharmony_ci struct fw_ldst_mdio { 95962306a36Sopenharmony_ci __be16 paddr_mmd; 96062306a36Sopenharmony_ci __be16 raddr; 96162306a36Sopenharmony_ci __be16 vctl; 96262306a36Sopenharmony_ci __be16 rval; 96362306a36Sopenharmony_ci } mdio; 96462306a36Sopenharmony_ci struct fw_ldst_cim_rq { 96562306a36Sopenharmony_ci u8 req_first64[8]; 96662306a36Sopenharmony_ci u8 req_second64[8]; 96762306a36Sopenharmony_ci u8 resp_first64[8]; 96862306a36Sopenharmony_ci u8 resp_second64[8]; 96962306a36Sopenharmony_ci __be32 r3[2]; 97062306a36Sopenharmony_ci } cim_rq; 97162306a36Sopenharmony_ci union fw_ldst_mps { 97262306a36Sopenharmony_ci struct fw_ldst_mps_rplc { 97362306a36Sopenharmony_ci __be16 fid_idx; 97462306a36Sopenharmony_ci __be16 rplcpf_pkd; 97562306a36Sopenharmony_ci __be32 rplc255_224; 97662306a36Sopenharmony_ci __be32 rplc223_192; 97762306a36Sopenharmony_ci __be32 rplc191_160; 97862306a36Sopenharmony_ci __be32 rplc159_128; 97962306a36Sopenharmony_ci __be32 rplc127_96; 98062306a36Sopenharmony_ci __be32 rplc95_64; 98162306a36Sopenharmony_ci __be32 rplc63_32; 98262306a36Sopenharmony_ci __be32 rplc31_0; 98362306a36Sopenharmony_ci } rplc; 98462306a36Sopenharmony_ci struct fw_ldst_mps_atrb { 98562306a36Sopenharmony_ci __be16 fid_mpsid; 98662306a36Sopenharmony_ci __be16 r2[3]; 98762306a36Sopenharmony_ci __be32 r3[2]; 98862306a36Sopenharmony_ci __be32 r4; 98962306a36Sopenharmony_ci __be32 atrb; 99062306a36Sopenharmony_ci __be16 vlan[16]; 99162306a36Sopenharmony_ci } atrb; 99262306a36Sopenharmony_ci } mps; 99362306a36Sopenharmony_ci struct fw_ldst_func { 99462306a36Sopenharmony_ci u8 access_ctl; 99562306a36Sopenharmony_ci u8 mod_index; 99662306a36Sopenharmony_ci __be16 ctl_id; 99762306a36Sopenharmony_ci __be32 offset; 99862306a36Sopenharmony_ci __be64 data0; 99962306a36Sopenharmony_ci __be64 data1; 100062306a36Sopenharmony_ci } func; 100162306a36Sopenharmony_ci struct fw_ldst_pcie { 100262306a36Sopenharmony_ci u8 ctrl_to_fn; 100362306a36Sopenharmony_ci u8 bnum; 100462306a36Sopenharmony_ci u8 r; 100562306a36Sopenharmony_ci u8 ext_r; 100662306a36Sopenharmony_ci u8 select_naccess; 100762306a36Sopenharmony_ci u8 pcie_fn; 100862306a36Sopenharmony_ci __be16 nset_pkd; 100962306a36Sopenharmony_ci __be32 data[12]; 101062306a36Sopenharmony_ci } pcie; 101162306a36Sopenharmony_ci struct fw_ldst_i2c_deprecated { 101262306a36Sopenharmony_ci u8 pid_pkd; 101362306a36Sopenharmony_ci u8 base; 101462306a36Sopenharmony_ci u8 boffset; 101562306a36Sopenharmony_ci u8 data; 101662306a36Sopenharmony_ci __be32 r9; 101762306a36Sopenharmony_ci } i2c_deprecated; 101862306a36Sopenharmony_ci struct fw_ldst_i2c { 101962306a36Sopenharmony_ci u8 pid; 102062306a36Sopenharmony_ci u8 did; 102162306a36Sopenharmony_ci u8 boffset; 102262306a36Sopenharmony_ci u8 blen; 102362306a36Sopenharmony_ci __be32 r9; 102462306a36Sopenharmony_ci __u8 data[48]; 102562306a36Sopenharmony_ci } i2c; 102662306a36Sopenharmony_ci struct fw_ldst_le { 102762306a36Sopenharmony_ci __be32 index; 102862306a36Sopenharmony_ci __be32 r9; 102962306a36Sopenharmony_ci u8 val[33]; 103062306a36Sopenharmony_ci u8 r11[7]; 103162306a36Sopenharmony_ci } le; 103262306a36Sopenharmony_ci } u; 103362306a36Sopenharmony_ci}; 103462306a36Sopenharmony_ci 103562306a36Sopenharmony_ci#define FW_LDST_CMD_ADDRSPACE_S 0 103662306a36Sopenharmony_ci#define FW_LDST_CMD_ADDRSPACE_V(x) ((x) << FW_LDST_CMD_ADDRSPACE_S) 103762306a36Sopenharmony_ci 103862306a36Sopenharmony_ci#define FW_LDST_CMD_MSG_S 31 103962306a36Sopenharmony_ci#define FW_LDST_CMD_MSG_V(x) ((x) << FW_LDST_CMD_MSG_S) 104062306a36Sopenharmony_ci 104162306a36Sopenharmony_ci#define FW_LDST_CMD_CTXTFLUSH_S 30 104262306a36Sopenharmony_ci#define FW_LDST_CMD_CTXTFLUSH_V(x) ((x) << FW_LDST_CMD_CTXTFLUSH_S) 104362306a36Sopenharmony_ci#define FW_LDST_CMD_CTXTFLUSH_F FW_LDST_CMD_CTXTFLUSH_V(1U) 104462306a36Sopenharmony_ci 104562306a36Sopenharmony_ci#define FW_LDST_CMD_PADDR_S 8 104662306a36Sopenharmony_ci#define FW_LDST_CMD_PADDR_V(x) ((x) << FW_LDST_CMD_PADDR_S) 104762306a36Sopenharmony_ci 104862306a36Sopenharmony_ci#define FW_LDST_CMD_MMD_S 0 104962306a36Sopenharmony_ci#define FW_LDST_CMD_MMD_V(x) ((x) << FW_LDST_CMD_MMD_S) 105062306a36Sopenharmony_ci 105162306a36Sopenharmony_ci#define FW_LDST_CMD_FID_S 15 105262306a36Sopenharmony_ci#define FW_LDST_CMD_FID_V(x) ((x) << FW_LDST_CMD_FID_S) 105362306a36Sopenharmony_ci 105462306a36Sopenharmony_ci#define FW_LDST_CMD_IDX_S 0 105562306a36Sopenharmony_ci#define FW_LDST_CMD_IDX_V(x) ((x) << FW_LDST_CMD_IDX_S) 105662306a36Sopenharmony_ci 105762306a36Sopenharmony_ci#define FW_LDST_CMD_RPLCPF_S 0 105862306a36Sopenharmony_ci#define FW_LDST_CMD_RPLCPF_V(x) ((x) << FW_LDST_CMD_RPLCPF_S) 105962306a36Sopenharmony_ci 106062306a36Sopenharmony_ci#define FW_LDST_CMD_LC_S 4 106162306a36Sopenharmony_ci#define FW_LDST_CMD_LC_V(x) ((x) << FW_LDST_CMD_LC_S) 106262306a36Sopenharmony_ci#define FW_LDST_CMD_LC_F FW_LDST_CMD_LC_V(1U) 106362306a36Sopenharmony_ci 106462306a36Sopenharmony_ci#define FW_LDST_CMD_FN_S 0 106562306a36Sopenharmony_ci#define FW_LDST_CMD_FN_V(x) ((x) << FW_LDST_CMD_FN_S) 106662306a36Sopenharmony_ci 106762306a36Sopenharmony_ci#define FW_LDST_CMD_NACCESS_S 0 106862306a36Sopenharmony_ci#define FW_LDST_CMD_NACCESS_V(x) ((x) << FW_LDST_CMD_NACCESS_S) 106962306a36Sopenharmony_ci 107062306a36Sopenharmony_cistruct fw_reset_cmd { 107162306a36Sopenharmony_ci __be32 op_to_write; 107262306a36Sopenharmony_ci __be32 retval_len16; 107362306a36Sopenharmony_ci __be32 val; 107462306a36Sopenharmony_ci __be32 halt_pkd; 107562306a36Sopenharmony_ci}; 107662306a36Sopenharmony_ci 107762306a36Sopenharmony_ci#define FW_RESET_CMD_HALT_S 31 107862306a36Sopenharmony_ci#define FW_RESET_CMD_HALT_M 0x1 107962306a36Sopenharmony_ci#define FW_RESET_CMD_HALT_V(x) ((x) << FW_RESET_CMD_HALT_S) 108062306a36Sopenharmony_ci#define FW_RESET_CMD_HALT_G(x) \ 108162306a36Sopenharmony_ci (((x) >> FW_RESET_CMD_HALT_S) & FW_RESET_CMD_HALT_M) 108262306a36Sopenharmony_ci#define FW_RESET_CMD_HALT_F FW_RESET_CMD_HALT_V(1U) 108362306a36Sopenharmony_ci 108462306a36Sopenharmony_cienum fw_hellow_cmd { 108562306a36Sopenharmony_ci fw_hello_cmd_stage_os = 0x0 108662306a36Sopenharmony_ci}; 108762306a36Sopenharmony_ci 108862306a36Sopenharmony_cistruct fw_hello_cmd { 108962306a36Sopenharmony_ci __be32 op_to_write; 109062306a36Sopenharmony_ci __be32 retval_len16; 109162306a36Sopenharmony_ci __be32 err_to_clearinit; 109262306a36Sopenharmony_ci __be32 fwrev; 109362306a36Sopenharmony_ci}; 109462306a36Sopenharmony_ci 109562306a36Sopenharmony_ci#define FW_HELLO_CMD_ERR_S 31 109662306a36Sopenharmony_ci#define FW_HELLO_CMD_ERR_V(x) ((x) << FW_HELLO_CMD_ERR_S) 109762306a36Sopenharmony_ci#define FW_HELLO_CMD_ERR_F FW_HELLO_CMD_ERR_V(1U) 109862306a36Sopenharmony_ci 109962306a36Sopenharmony_ci#define FW_HELLO_CMD_INIT_S 30 110062306a36Sopenharmony_ci#define FW_HELLO_CMD_INIT_V(x) ((x) << FW_HELLO_CMD_INIT_S) 110162306a36Sopenharmony_ci#define FW_HELLO_CMD_INIT_F FW_HELLO_CMD_INIT_V(1U) 110262306a36Sopenharmony_ci 110362306a36Sopenharmony_ci#define FW_HELLO_CMD_MASTERDIS_S 29 110462306a36Sopenharmony_ci#define FW_HELLO_CMD_MASTERDIS_V(x) ((x) << FW_HELLO_CMD_MASTERDIS_S) 110562306a36Sopenharmony_ci 110662306a36Sopenharmony_ci#define FW_HELLO_CMD_MASTERFORCE_S 28 110762306a36Sopenharmony_ci#define FW_HELLO_CMD_MASTERFORCE_V(x) ((x) << FW_HELLO_CMD_MASTERFORCE_S) 110862306a36Sopenharmony_ci 110962306a36Sopenharmony_ci#define FW_HELLO_CMD_MBMASTER_S 24 111062306a36Sopenharmony_ci#define FW_HELLO_CMD_MBMASTER_M 0xfU 111162306a36Sopenharmony_ci#define FW_HELLO_CMD_MBMASTER_V(x) ((x) << FW_HELLO_CMD_MBMASTER_S) 111262306a36Sopenharmony_ci#define FW_HELLO_CMD_MBMASTER_G(x) \ 111362306a36Sopenharmony_ci (((x) >> FW_HELLO_CMD_MBMASTER_S) & FW_HELLO_CMD_MBMASTER_M) 111462306a36Sopenharmony_ci 111562306a36Sopenharmony_ci#define FW_HELLO_CMD_MBASYNCNOTINT_S 23 111662306a36Sopenharmony_ci#define FW_HELLO_CMD_MBASYNCNOTINT_V(x) ((x) << FW_HELLO_CMD_MBASYNCNOTINT_S) 111762306a36Sopenharmony_ci 111862306a36Sopenharmony_ci#define FW_HELLO_CMD_MBASYNCNOT_S 20 111962306a36Sopenharmony_ci#define FW_HELLO_CMD_MBASYNCNOT_V(x) ((x) << FW_HELLO_CMD_MBASYNCNOT_S) 112062306a36Sopenharmony_ci 112162306a36Sopenharmony_ci#define FW_HELLO_CMD_STAGE_S 17 112262306a36Sopenharmony_ci#define FW_HELLO_CMD_STAGE_V(x) ((x) << FW_HELLO_CMD_STAGE_S) 112362306a36Sopenharmony_ci 112462306a36Sopenharmony_ci#define FW_HELLO_CMD_CLEARINIT_S 16 112562306a36Sopenharmony_ci#define FW_HELLO_CMD_CLEARINIT_V(x) ((x) << FW_HELLO_CMD_CLEARINIT_S) 112662306a36Sopenharmony_ci#define FW_HELLO_CMD_CLEARINIT_F FW_HELLO_CMD_CLEARINIT_V(1U) 112762306a36Sopenharmony_ci 112862306a36Sopenharmony_cistruct fw_bye_cmd { 112962306a36Sopenharmony_ci __be32 op_to_write; 113062306a36Sopenharmony_ci __be32 retval_len16; 113162306a36Sopenharmony_ci __be64 r3; 113262306a36Sopenharmony_ci}; 113362306a36Sopenharmony_ci 113462306a36Sopenharmony_cistruct fw_initialize_cmd { 113562306a36Sopenharmony_ci __be32 op_to_write; 113662306a36Sopenharmony_ci __be32 retval_len16; 113762306a36Sopenharmony_ci __be64 r3; 113862306a36Sopenharmony_ci}; 113962306a36Sopenharmony_ci 114062306a36Sopenharmony_cienum fw_caps_config_hm { 114162306a36Sopenharmony_ci FW_CAPS_CONFIG_HM_PCIE = 0x00000001, 114262306a36Sopenharmony_ci FW_CAPS_CONFIG_HM_PL = 0x00000002, 114362306a36Sopenharmony_ci FW_CAPS_CONFIG_HM_SGE = 0x00000004, 114462306a36Sopenharmony_ci FW_CAPS_CONFIG_HM_CIM = 0x00000008, 114562306a36Sopenharmony_ci FW_CAPS_CONFIG_HM_ULPTX = 0x00000010, 114662306a36Sopenharmony_ci FW_CAPS_CONFIG_HM_TP = 0x00000020, 114762306a36Sopenharmony_ci FW_CAPS_CONFIG_HM_ULPRX = 0x00000040, 114862306a36Sopenharmony_ci FW_CAPS_CONFIG_HM_PMRX = 0x00000080, 114962306a36Sopenharmony_ci FW_CAPS_CONFIG_HM_PMTX = 0x00000100, 115062306a36Sopenharmony_ci FW_CAPS_CONFIG_HM_MC = 0x00000200, 115162306a36Sopenharmony_ci FW_CAPS_CONFIG_HM_LE = 0x00000400, 115262306a36Sopenharmony_ci FW_CAPS_CONFIG_HM_MPS = 0x00000800, 115362306a36Sopenharmony_ci FW_CAPS_CONFIG_HM_XGMAC = 0x00001000, 115462306a36Sopenharmony_ci FW_CAPS_CONFIG_HM_CPLSWITCH = 0x00002000, 115562306a36Sopenharmony_ci FW_CAPS_CONFIG_HM_T4DBG = 0x00004000, 115662306a36Sopenharmony_ci FW_CAPS_CONFIG_HM_MI = 0x00008000, 115762306a36Sopenharmony_ci FW_CAPS_CONFIG_HM_I2CM = 0x00010000, 115862306a36Sopenharmony_ci FW_CAPS_CONFIG_HM_NCSI = 0x00020000, 115962306a36Sopenharmony_ci FW_CAPS_CONFIG_HM_SMB = 0x00040000, 116062306a36Sopenharmony_ci FW_CAPS_CONFIG_HM_MA = 0x00080000, 116162306a36Sopenharmony_ci FW_CAPS_CONFIG_HM_EDRAM = 0x00100000, 116262306a36Sopenharmony_ci FW_CAPS_CONFIG_HM_PMU = 0x00200000, 116362306a36Sopenharmony_ci FW_CAPS_CONFIG_HM_UART = 0x00400000, 116462306a36Sopenharmony_ci FW_CAPS_CONFIG_HM_SF = 0x00800000, 116562306a36Sopenharmony_ci}; 116662306a36Sopenharmony_ci 116762306a36Sopenharmony_cienum fw_caps_config_nbm { 116862306a36Sopenharmony_ci FW_CAPS_CONFIG_NBM_IPMI = 0x00000001, 116962306a36Sopenharmony_ci FW_CAPS_CONFIG_NBM_NCSI = 0x00000002, 117062306a36Sopenharmony_ci}; 117162306a36Sopenharmony_ci 117262306a36Sopenharmony_cienum fw_caps_config_link { 117362306a36Sopenharmony_ci FW_CAPS_CONFIG_LINK_PPP = 0x00000001, 117462306a36Sopenharmony_ci FW_CAPS_CONFIG_LINK_QFC = 0x00000002, 117562306a36Sopenharmony_ci FW_CAPS_CONFIG_LINK_DCBX = 0x00000004, 117662306a36Sopenharmony_ci}; 117762306a36Sopenharmony_ci 117862306a36Sopenharmony_cienum fw_caps_config_switch { 117962306a36Sopenharmony_ci FW_CAPS_CONFIG_SWITCH_INGRESS = 0x00000001, 118062306a36Sopenharmony_ci FW_CAPS_CONFIG_SWITCH_EGRESS = 0x00000002, 118162306a36Sopenharmony_ci}; 118262306a36Sopenharmony_ci 118362306a36Sopenharmony_cienum fw_caps_config_nic { 118462306a36Sopenharmony_ci FW_CAPS_CONFIG_NIC = 0x00000001, 118562306a36Sopenharmony_ci FW_CAPS_CONFIG_NIC_VM = 0x00000002, 118662306a36Sopenharmony_ci FW_CAPS_CONFIG_NIC_HASHFILTER = 0x00000020, 118762306a36Sopenharmony_ci FW_CAPS_CONFIG_NIC_ETHOFLD = 0x00000040, 118862306a36Sopenharmony_ci}; 118962306a36Sopenharmony_ci 119062306a36Sopenharmony_cienum fw_caps_config_ofld { 119162306a36Sopenharmony_ci FW_CAPS_CONFIG_OFLD = 0x00000001, 119262306a36Sopenharmony_ci}; 119362306a36Sopenharmony_ci 119462306a36Sopenharmony_cienum fw_caps_config_rdma { 119562306a36Sopenharmony_ci FW_CAPS_CONFIG_RDMA_RDDP = 0x00000001, 119662306a36Sopenharmony_ci FW_CAPS_CONFIG_RDMA_RDMAC = 0x00000002, 119762306a36Sopenharmony_ci}; 119862306a36Sopenharmony_ci 119962306a36Sopenharmony_cienum fw_caps_config_iscsi { 120062306a36Sopenharmony_ci FW_CAPS_CONFIG_ISCSI_INITIATOR_PDU = 0x00000001, 120162306a36Sopenharmony_ci FW_CAPS_CONFIG_ISCSI_TARGET_PDU = 0x00000002, 120262306a36Sopenharmony_ci FW_CAPS_CONFIG_ISCSI_INITIATOR_CNXOFLD = 0x00000004, 120362306a36Sopenharmony_ci FW_CAPS_CONFIG_ISCSI_TARGET_CNXOFLD = 0x00000008, 120462306a36Sopenharmony_ci}; 120562306a36Sopenharmony_ci 120662306a36Sopenharmony_cienum fw_caps_config_crypto { 120762306a36Sopenharmony_ci FW_CAPS_CONFIG_CRYPTO_LOOKASIDE = 0x00000001, 120862306a36Sopenharmony_ci FW_CAPS_CONFIG_TLS_INLINE = 0x00000002, 120962306a36Sopenharmony_ci FW_CAPS_CONFIG_IPSEC_INLINE = 0x00000004, 121062306a36Sopenharmony_ci FW_CAPS_CONFIG_TLS_HW = 0x00000008, 121162306a36Sopenharmony_ci}; 121262306a36Sopenharmony_ci 121362306a36Sopenharmony_cienum fw_caps_config_fcoe { 121462306a36Sopenharmony_ci FW_CAPS_CONFIG_FCOE_INITIATOR = 0x00000001, 121562306a36Sopenharmony_ci FW_CAPS_CONFIG_FCOE_TARGET = 0x00000002, 121662306a36Sopenharmony_ci FW_CAPS_CONFIG_FCOE_CTRL_OFLD = 0x00000004, 121762306a36Sopenharmony_ci}; 121862306a36Sopenharmony_ci 121962306a36Sopenharmony_cienum fw_memtype_cf { 122062306a36Sopenharmony_ci FW_MEMTYPE_CF_EDC0 = 0x0, 122162306a36Sopenharmony_ci FW_MEMTYPE_CF_EDC1 = 0x1, 122262306a36Sopenharmony_ci FW_MEMTYPE_CF_EXTMEM = 0x2, 122362306a36Sopenharmony_ci FW_MEMTYPE_CF_FLASH = 0x4, 122462306a36Sopenharmony_ci FW_MEMTYPE_CF_INTERNAL = 0x5, 122562306a36Sopenharmony_ci FW_MEMTYPE_CF_EXTMEM1 = 0x6, 122662306a36Sopenharmony_ci FW_MEMTYPE_CF_HMA = 0x7, 122762306a36Sopenharmony_ci}; 122862306a36Sopenharmony_ci 122962306a36Sopenharmony_cistruct fw_caps_config_cmd { 123062306a36Sopenharmony_ci __be32 op_to_write; 123162306a36Sopenharmony_ci __be32 cfvalid_to_len16; 123262306a36Sopenharmony_ci __be32 r2; 123362306a36Sopenharmony_ci __be32 hwmbitmap; 123462306a36Sopenharmony_ci __be16 nbmcaps; 123562306a36Sopenharmony_ci __be16 linkcaps; 123662306a36Sopenharmony_ci __be16 switchcaps; 123762306a36Sopenharmony_ci __be16 r3; 123862306a36Sopenharmony_ci __be16 niccaps; 123962306a36Sopenharmony_ci __be16 ofldcaps; 124062306a36Sopenharmony_ci __be16 rdmacaps; 124162306a36Sopenharmony_ci __be16 cryptocaps; 124262306a36Sopenharmony_ci __be16 iscsicaps; 124362306a36Sopenharmony_ci __be16 fcoecaps; 124462306a36Sopenharmony_ci __be32 cfcsum; 124562306a36Sopenharmony_ci __be32 finiver; 124662306a36Sopenharmony_ci __be32 finicsum; 124762306a36Sopenharmony_ci}; 124862306a36Sopenharmony_ci 124962306a36Sopenharmony_ci#define FW_CAPS_CONFIG_CMD_CFVALID_S 27 125062306a36Sopenharmony_ci#define FW_CAPS_CONFIG_CMD_CFVALID_V(x) ((x) << FW_CAPS_CONFIG_CMD_CFVALID_S) 125162306a36Sopenharmony_ci#define FW_CAPS_CONFIG_CMD_CFVALID_F FW_CAPS_CONFIG_CMD_CFVALID_V(1U) 125262306a36Sopenharmony_ci 125362306a36Sopenharmony_ci#define FW_CAPS_CONFIG_CMD_MEMTYPE_CF_S 24 125462306a36Sopenharmony_ci#define FW_CAPS_CONFIG_CMD_MEMTYPE_CF_V(x) \ 125562306a36Sopenharmony_ci ((x) << FW_CAPS_CONFIG_CMD_MEMTYPE_CF_S) 125662306a36Sopenharmony_ci 125762306a36Sopenharmony_ci#define FW_CAPS_CONFIG_CMD_MEMADDR64K_CF_S 16 125862306a36Sopenharmony_ci#define FW_CAPS_CONFIG_CMD_MEMADDR64K_CF_V(x) \ 125962306a36Sopenharmony_ci ((x) << FW_CAPS_CONFIG_CMD_MEMADDR64K_CF_S) 126062306a36Sopenharmony_ci 126162306a36Sopenharmony_ci/* 126262306a36Sopenharmony_ci * params command mnemonics 126362306a36Sopenharmony_ci */ 126462306a36Sopenharmony_cienum fw_params_mnem { 126562306a36Sopenharmony_ci FW_PARAMS_MNEM_DEV = 1, /* device params */ 126662306a36Sopenharmony_ci FW_PARAMS_MNEM_PFVF = 2, /* function params */ 126762306a36Sopenharmony_ci FW_PARAMS_MNEM_REG = 3, /* limited register access */ 126862306a36Sopenharmony_ci FW_PARAMS_MNEM_DMAQ = 4, /* dma queue params */ 126962306a36Sopenharmony_ci FW_PARAMS_MNEM_CHNET = 5, /* chnet params */ 127062306a36Sopenharmony_ci FW_PARAMS_MNEM_LAST 127162306a36Sopenharmony_ci}; 127262306a36Sopenharmony_ci 127362306a36Sopenharmony_ci/* 127462306a36Sopenharmony_ci * device parameters 127562306a36Sopenharmony_ci */ 127662306a36Sopenharmony_ci 127762306a36Sopenharmony_ci#define FW_PARAMS_PARAM_FILTER_MODE_S 16 127862306a36Sopenharmony_ci#define FW_PARAMS_PARAM_FILTER_MODE_M 0xffff 127962306a36Sopenharmony_ci#define FW_PARAMS_PARAM_FILTER_MODE_V(x) \ 128062306a36Sopenharmony_ci ((x) << FW_PARAMS_PARAM_FILTER_MODE_S) 128162306a36Sopenharmony_ci#define FW_PARAMS_PARAM_FILTER_MODE_G(x) \ 128262306a36Sopenharmony_ci (((x) >> FW_PARAMS_PARAM_FILTER_MODE_S) & \ 128362306a36Sopenharmony_ci FW_PARAMS_PARAM_FILTER_MODE_M) 128462306a36Sopenharmony_ci 128562306a36Sopenharmony_ci#define FW_PARAMS_PARAM_FILTER_MASK_S 0 128662306a36Sopenharmony_ci#define FW_PARAMS_PARAM_FILTER_MASK_M 0xffff 128762306a36Sopenharmony_ci#define FW_PARAMS_PARAM_FILTER_MASK_V(x) \ 128862306a36Sopenharmony_ci ((x) << FW_PARAMS_PARAM_FILTER_MASK_S) 128962306a36Sopenharmony_ci#define FW_PARAMS_PARAM_FILTER_MASK_G(x) \ 129062306a36Sopenharmony_ci (((x) >> FW_PARAMS_PARAM_FILTER_MASK_S) & \ 129162306a36Sopenharmony_ci FW_PARAMS_PARAM_FILTER_MASK_M) 129262306a36Sopenharmony_ci 129362306a36Sopenharmony_cienum fw_params_param_dev { 129462306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_CCLK = 0x00, /* chip core clock in khz */ 129562306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_PORTVEC = 0x01, /* the port vector */ 129662306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_NTID = 0x02, /* reads the number of TIDs 129762306a36Sopenharmony_ci * allocated by the device's 129862306a36Sopenharmony_ci * Lookup Engine 129962306a36Sopenharmony_ci */ 130062306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_FLOWC_BUFFIFO_SZ = 0x03, 130162306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_INTVER_NIC = 0x04, 130262306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_INTVER_VNIC = 0x05, 130362306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_INTVER_OFLD = 0x06, 130462306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_INTVER_RI = 0x07, 130562306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_INTVER_ISCSIPDU = 0x08, 130662306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_INTVER_ISCSI = 0x09, 130762306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_INTVER_FCOE = 0x0A, 130862306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_FWREV = 0x0B, 130962306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_TPREV = 0x0C, 131062306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_CF = 0x0D, 131162306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_PHYFW = 0x0F, 131262306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_DIAG = 0x11, 131362306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_MAXORDIRD_QP = 0x13, /* max supported QP IRD/ORD */ 131462306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_MAXIRD_ADAPTER = 0x14, /* max supported adap IRD */ 131562306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_ULPTX_MEMWRITE_DSGL = 0x17, 131662306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_FWCACHE = 0x18, 131762306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_SCFGREV = 0x1A, 131862306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_VPDREV = 0x1B, 131962306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_RI_FR_NSMR_TPTE_WR = 0x1C, 132062306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_FILTER2_WR = 0x1D, 132162306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_MPSBGMAP = 0x1E, 132262306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_TPCHMAP = 0x1F, 132362306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_HMA_SIZE = 0x20, 132462306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_RDMA_WRITE_WITH_IMM = 0x21, 132562306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_PPOD_EDRAM = 0x23, 132662306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_RI_WRITE_CMPL_WR = 0x24, 132762306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_HPFILTER_REGION_SUPPORT = 0x26, 132862306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_OPAQUE_VIID_SMT_EXTN = 0x27, 132962306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_HASHFILTER_WITH_OFLD = 0x28, 133062306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_DBQ_TIMER = 0x29, 133162306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_DBQ_TIMERTICK = 0x2A, 133262306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_NUM_TM_CLASS = 0x2B, 133362306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_FILTER = 0x2E, 133462306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_KTLS_HW = 0x31, 133562306a36Sopenharmony_ci}; 133662306a36Sopenharmony_ci 133762306a36Sopenharmony_ci/* 133862306a36Sopenharmony_ci * physical and virtual function parameters 133962306a36Sopenharmony_ci */ 134062306a36Sopenharmony_cienum fw_params_param_pfvf { 134162306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_RWXCAPS = 0x00, 134262306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_ROUTE_START = 0x01, 134362306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_ROUTE_END = 0x02, 134462306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_CLIP_START = 0x03, 134562306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_CLIP_END = 0x04, 134662306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_FILTER_START = 0x05, 134762306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_FILTER_END = 0x06, 134862306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_SERVER_START = 0x07, 134962306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_SERVER_END = 0x08, 135062306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_TDDP_START = 0x09, 135162306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_TDDP_END = 0x0A, 135262306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_ISCSI_START = 0x0B, 135362306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_ISCSI_END = 0x0C, 135462306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_STAG_START = 0x0D, 135562306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_STAG_END = 0x0E, 135662306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_RQ_START = 0x1F, 135762306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_RQ_END = 0x10, 135862306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_PBL_START = 0x11, 135962306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_PBL_END = 0x12, 136062306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_L2T_START = 0x13, 136162306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_L2T_END = 0x14, 136262306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_SQRQ_START = 0x15, 136362306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_SQRQ_END = 0x16, 136462306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_CQ_START = 0x17, 136562306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_CQ_END = 0x18, 136662306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_SRQ_START = 0x19, 136762306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_SRQ_END = 0x1A, 136862306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_SCHEDCLASS_ETH = 0x20, 136962306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_VIID = 0x24, 137062306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_CPMASK = 0x25, 137162306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_OCQ_START = 0x26, 137262306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_OCQ_END = 0x27, 137362306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_CONM_MAP = 0x28, 137462306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_IQFLINT_START = 0x29, 137562306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_IQFLINT_END = 0x2A, 137662306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_EQ_START = 0x2B, 137762306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_EQ_END = 0x2C, 137862306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_ACTIVE_FILTER_START = 0x2D, 137962306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_ACTIVE_FILTER_END = 0x2E, 138062306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_ETHOFLD_START = 0x2F, 138162306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_ETHOFLD_END = 0x30, 138262306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_CPLFW4MSG_ENCAP = 0x31, 138362306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_HPFILTER_START = 0x32, 138462306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_HPFILTER_END = 0x33, 138562306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_TLS_START = 0x34, 138662306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_TLS_END = 0x35, 138762306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_RAWF_START = 0x36, 138862306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_RAWF_END = 0x37, 138962306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_NCRYPTO_LOOKASIDE = 0x39, 139062306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_PORT_CAPS32 = 0x3A, 139162306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_PPOD_EDRAM_START = 0x3B, 139262306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_PPOD_EDRAM_END = 0x3C, 139362306a36Sopenharmony_ci FW_PARAMS_PARAM_PFVF_LINK_STATE = 0x40, 139462306a36Sopenharmony_ci}; 139562306a36Sopenharmony_ci 139662306a36Sopenharmony_ci/* Virtual link state as seen by the specified VF */ 139762306a36Sopenharmony_cienum vf_link_states { 139862306a36Sopenharmony_ci FW_VF_LINK_STATE_AUTO = 0x00, 139962306a36Sopenharmony_ci FW_VF_LINK_STATE_ENABLE = 0x01, 140062306a36Sopenharmony_ci FW_VF_LINK_STATE_DISABLE = 0x02, 140162306a36Sopenharmony_ci}; 140262306a36Sopenharmony_ci 140362306a36Sopenharmony_ci/* 140462306a36Sopenharmony_ci * dma queue parameters 140562306a36Sopenharmony_ci */ 140662306a36Sopenharmony_cienum fw_params_param_dmaq { 140762306a36Sopenharmony_ci FW_PARAMS_PARAM_DMAQ_IQ_DCAEN_DCACPU = 0x00, 140862306a36Sopenharmony_ci FW_PARAMS_PARAM_DMAQ_IQ_INTCNTTHRESH = 0x01, 140962306a36Sopenharmony_ci FW_PARAMS_PARAM_DMAQ_EQ_CMPLIQID_MNGT = 0x10, 141062306a36Sopenharmony_ci FW_PARAMS_PARAM_DMAQ_EQ_CMPLIQID_CTRL = 0x11, 141162306a36Sopenharmony_ci FW_PARAMS_PARAM_DMAQ_EQ_SCHEDCLASS_ETH = 0x12, 141262306a36Sopenharmony_ci FW_PARAMS_PARAM_DMAQ_EQ_DCBPRIO_ETH = 0x13, 141362306a36Sopenharmony_ci FW_PARAMS_PARAM_DMAQ_EQ_TIMERIX = 0x15, 141462306a36Sopenharmony_ci FW_PARAMS_PARAM_DMAQ_CONM_CTXT = 0x20, 141562306a36Sopenharmony_ci}; 141662306a36Sopenharmony_ci 141762306a36Sopenharmony_cienum fw_params_param_dev_ktls_hw { 141862306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_KTLS_HW_DISABLE = 0x00, 141962306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_KTLS_HW_ENABLE = 0x01, 142062306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_KTLS_HW_USER_ENABLE = 0x01, 142162306a36Sopenharmony_ci}; 142262306a36Sopenharmony_ci 142362306a36Sopenharmony_cienum fw_params_param_dev_phyfw { 142462306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_PHYFW_DOWNLOAD = 0x00, 142562306a36Sopenharmony_ci FW_PARAMS_PARAM_DEV_PHYFW_VERSION = 0x01, 142662306a36Sopenharmony_ci}; 142762306a36Sopenharmony_ci 142862306a36Sopenharmony_cienum fw_params_param_dev_diag { 142962306a36Sopenharmony_ci FW_PARAM_DEV_DIAG_TMP = 0x00, 143062306a36Sopenharmony_ci FW_PARAM_DEV_DIAG_VDD = 0x01, 143162306a36Sopenharmony_ci FW_PARAM_DEV_DIAG_MAXTMPTHRESH = 0x02, 143262306a36Sopenharmony_ci}; 143362306a36Sopenharmony_ci 143462306a36Sopenharmony_cienum fw_params_param_dev_filter { 143562306a36Sopenharmony_ci FW_PARAM_DEV_FILTER_VNIC_MODE = 0x00, 143662306a36Sopenharmony_ci FW_PARAM_DEV_FILTER_MODE_MASK = 0x01, 143762306a36Sopenharmony_ci}; 143862306a36Sopenharmony_ci 143962306a36Sopenharmony_cienum fw_params_param_dev_fwcache { 144062306a36Sopenharmony_ci FW_PARAM_DEV_FWCACHE_FLUSH = 0x00, 144162306a36Sopenharmony_ci FW_PARAM_DEV_FWCACHE_FLUSHINV = 0x01, 144262306a36Sopenharmony_ci}; 144362306a36Sopenharmony_ci 144462306a36Sopenharmony_ci#define FW_PARAMS_MNEM_S 24 144562306a36Sopenharmony_ci#define FW_PARAMS_MNEM_V(x) ((x) << FW_PARAMS_MNEM_S) 144662306a36Sopenharmony_ci 144762306a36Sopenharmony_ci#define FW_PARAMS_PARAM_X_S 16 144862306a36Sopenharmony_ci#define FW_PARAMS_PARAM_X_V(x) ((x) << FW_PARAMS_PARAM_X_S) 144962306a36Sopenharmony_ci 145062306a36Sopenharmony_ci#define FW_PARAMS_PARAM_Y_S 8 145162306a36Sopenharmony_ci#define FW_PARAMS_PARAM_Y_M 0xffU 145262306a36Sopenharmony_ci#define FW_PARAMS_PARAM_Y_V(x) ((x) << FW_PARAMS_PARAM_Y_S) 145362306a36Sopenharmony_ci#define FW_PARAMS_PARAM_Y_G(x) (((x) >> FW_PARAMS_PARAM_Y_S) &\ 145462306a36Sopenharmony_ci FW_PARAMS_PARAM_Y_M) 145562306a36Sopenharmony_ci 145662306a36Sopenharmony_ci#define FW_PARAMS_PARAM_Z_S 0 145762306a36Sopenharmony_ci#define FW_PARAMS_PARAM_Z_M 0xffu 145862306a36Sopenharmony_ci#define FW_PARAMS_PARAM_Z_V(x) ((x) << FW_PARAMS_PARAM_Z_S) 145962306a36Sopenharmony_ci#define FW_PARAMS_PARAM_Z_G(x) (((x) >> FW_PARAMS_PARAM_Z_S) &\ 146062306a36Sopenharmony_ci FW_PARAMS_PARAM_Z_M) 146162306a36Sopenharmony_ci 146262306a36Sopenharmony_ci#define FW_PARAMS_PARAM_XYZ_S 0 146362306a36Sopenharmony_ci#define FW_PARAMS_PARAM_XYZ_V(x) ((x) << FW_PARAMS_PARAM_XYZ_S) 146462306a36Sopenharmony_ci 146562306a36Sopenharmony_ci#define FW_PARAMS_PARAM_YZ_S 0 146662306a36Sopenharmony_ci#define FW_PARAMS_PARAM_YZ_V(x) ((x) << FW_PARAMS_PARAM_YZ_S) 146762306a36Sopenharmony_ci 146862306a36Sopenharmony_cistruct fw_params_cmd { 146962306a36Sopenharmony_ci __be32 op_to_vfn; 147062306a36Sopenharmony_ci __be32 retval_len16; 147162306a36Sopenharmony_ci struct fw_params_param { 147262306a36Sopenharmony_ci __be32 mnem; 147362306a36Sopenharmony_ci __be32 val; 147462306a36Sopenharmony_ci } param[7]; 147562306a36Sopenharmony_ci}; 147662306a36Sopenharmony_ci 147762306a36Sopenharmony_ci#define FW_PARAMS_CMD_PFN_S 8 147862306a36Sopenharmony_ci#define FW_PARAMS_CMD_PFN_V(x) ((x) << FW_PARAMS_CMD_PFN_S) 147962306a36Sopenharmony_ci 148062306a36Sopenharmony_ci#define FW_PARAMS_CMD_VFN_S 0 148162306a36Sopenharmony_ci#define FW_PARAMS_CMD_VFN_V(x) ((x) << FW_PARAMS_CMD_VFN_S) 148262306a36Sopenharmony_ci 148362306a36Sopenharmony_cistruct fw_pfvf_cmd { 148462306a36Sopenharmony_ci __be32 op_to_vfn; 148562306a36Sopenharmony_ci __be32 retval_len16; 148662306a36Sopenharmony_ci __be32 niqflint_niq; 148762306a36Sopenharmony_ci __be32 type_to_neq; 148862306a36Sopenharmony_ci __be32 tc_to_nexactf; 148962306a36Sopenharmony_ci __be32 r_caps_to_nethctrl; 149062306a36Sopenharmony_ci __be16 nricq; 149162306a36Sopenharmony_ci __be16 nriqp; 149262306a36Sopenharmony_ci __be32 r4; 149362306a36Sopenharmony_ci}; 149462306a36Sopenharmony_ci 149562306a36Sopenharmony_ci#define FW_PFVF_CMD_PFN_S 8 149662306a36Sopenharmony_ci#define FW_PFVF_CMD_PFN_V(x) ((x) << FW_PFVF_CMD_PFN_S) 149762306a36Sopenharmony_ci 149862306a36Sopenharmony_ci#define FW_PFVF_CMD_VFN_S 0 149962306a36Sopenharmony_ci#define FW_PFVF_CMD_VFN_V(x) ((x) << FW_PFVF_CMD_VFN_S) 150062306a36Sopenharmony_ci 150162306a36Sopenharmony_ci#define FW_PFVF_CMD_NIQFLINT_S 20 150262306a36Sopenharmony_ci#define FW_PFVF_CMD_NIQFLINT_M 0xfff 150362306a36Sopenharmony_ci#define FW_PFVF_CMD_NIQFLINT_V(x) ((x) << FW_PFVF_CMD_NIQFLINT_S) 150462306a36Sopenharmony_ci#define FW_PFVF_CMD_NIQFLINT_G(x) \ 150562306a36Sopenharmony_ci (((x) >> FW_PFVF_CMD_NIQFLINT_S) & FW_PFVF_CMD_NIQFLINT_M) 150662306a36Sopenharmony_ci 150762306a36Sopenharmony_ci#define FW_PFVF_CMD_NIQ_S 0 150862306a36Sopenharmony_ci#define FW_PFVF_CMD_NIQ_M 0xfffff 150962306a36Sopenharmony_ci#define FW_PFVF_CMD_NIQ_V(x) ((x) << FW_PFVF_CMD_NIQ_S) 151062306a36Sopenharmony_ci#define FW_PFVF_CMD_NIQ_G(x) \ 151162306a36Sopenharmony_ci (((x) >> FW_PFVF_CMD_NIQ_S) & FW_PFVF_CMD_NIQ_M) 151262306a36Sopenharmony_ci 151362306a36Sopenharmony_ci#define FW_PFVF_CMD_TYPE_S 31 151462306a36Sopenharmony_ci#define FW_PFVF_CMD_TYPE_M 0x1 151562306a36Sopenharmony_ci#define FW_PFVF_CMD_TYPE_V(x) ((x) << FW_PFVF_CMD_TYPE_S) 151662306a36Sopenharmony_ci#define FW_PFVF_CMD_TYPE_G(x) \ 151762306a36Sopenharmony_ci (((x) >> FW_PFVF_CMD_TYPE_S) & FW_PFVF_CMD_TYPE_M) 151862306a36Sopenharmony_ci#define FW_PFVF_CMD_TYPE_F FW_PFVF_CMD_TYPE_V(1U) 151962306a36Sopenharmony_ci 152062306a36Sopenharmony_ci#define FW_PFVF_CMD_CMASK_S 24 152162306a36Sopenharmony_ci#define FW_PFVF_CMD_CMASK_M 0xf 152262306a36Sopenharmony_ci#define FW_PFVF_CMD_CMASK_V(x) ((x) << FW_PFVF_CMD_CMASK_S) 152362306a36Sopenharmony_ci#define FW_PFVF_CMD_CMASK_G(x) \ 152462306a36Sopenharmony_ci (((x) >> FW_PFVF_CMD_CMASK_S) & FW_PFVF_CMD_CMASK_M) 152562306a36Sopenharmony_ci 152662306a36Sopenharmony_ci#define FW_PFVF_CMD_PMASK_S 20 152762306a36Sopenharmony_ci#define FW_PFVF_CMD_PMASK_M 0xf 152862306a36Sopenharmony_ci#define FW_PFVF_CMD_PMASK_V(x) ((x) << FW_PFVF_CMD_PMASK_S) 152962306a36Sopenharmony_ci#define FW_PFVF_CMD_PMASK_G(x) \ 153062306a36Sopenharmony_ci (((x) >> FW_PFVF_CMD_PMASK_S) & FW_PFVF_CMD_PMASK_M) 153162306a36Sopenharmony_ci 153262306a36Sopenharmony_ci#define FW_PFVF_CMD_NEQ_S 0 153362306a36Sopenharmony_ci#define FW_PFVF_CMD_NEQ_M 0xfffff 153462306a36Sopenharmony_ci#define FW_PFVF_CMD_NEQ_V(x) ((x) << FW_PFVF_CMD_NEQ_S) 153562306a36Sopenharmony_ci#define FW_PFVF_CMD_NEQ_G(x) \ 153662306a36Sopenharmony_ci (((x) >> FW_PFVF_CMD_NEQ_S) & FW_PFVF_CMD_NEQ_M) 153762306a36Sopenharmony_ci 153862306a36Sopenharmony_ci#define FW_PFVF_CMD_TC_S 24 153962306a36Sopenharmony_ci#define FW_PFVF_CMD_TC_M 0xff 154062306a36Sopenharmony_ci#define FW_PFVF_CMD_TC_V(x) ((x) << FW_PFVF_CMD_TC_S) 154162306a36Sopenharmony_ci#define FW_PFVF_CMD_TC_G(x) (((x) >> FW_PFVF_CMD_TC_S) & FW_PFVF_CMD_TC_M) 154262306a36Sopenharmony_ci 154362306a36Sopenharmony_ci#define FW_PFVF_CMD_NVI_S 16 154462306a36Sopenharmony_ci#define FW_PFVF_CMD_NVI_M 0xff 154562306a36Sopenharmony_ci#define FW_PFVF_CMD_NVI_V(x) ((x) << FW_PFVF_CMD_NVI_S) 154662306a36Sopenharmony_ci#define FW_PFVF_CMD_NVI_G(x) (((x) >> FW_PFVF_CMD_NVI_S) & FW_PFVF_CMD_NVI_M) 154762306a36Sopenharmony_ci 154862306a36Sopenharmony_ci#define FW_PFVF_CMD_NEXACTF_S 0 154962306a36Sopenharmony_ci#define FW_PFVF_CMD_NEXACTF_M 0xffff 155062306a36Sopenharmony_ci#define FW_PFVF_CMD_NEXACTF_V(x) ((x) << FW_PFVF_CMD_NEXACTF_S) 155162306a36Sopenharmony_ci#define FW_PFVF_CMD_NEXACTF_G(x) \ 155262306a36Sopenharmony_ci (((x) >> FW_PFVF_CMD_NEXACTF_S) & FW_PFVF_CMD_NEXACTF_M) 155362306a36Sopenharmony_ci 155462306a36Sopenharmony_ci#define FW_PFVF_CMD_R_CAPS_S 24 155562306a36Sopenharmony_ci#define FW_PFVF_CMD_R_CAPS_M 0xff 155662306a36Sopenharmony_ci#define FW_PFVF_CMD_R_CAPS_V(x) ((x) << FW_PFVF_CMD_R_CAPS_S) 155762306a36Sopenharmony_ci#define FW_PFVF_CMD_R_CAPS_G(x) \ 155862306a36Sopenharmony_ci (((x) >> FW_PFVF_CMD_R_CAPS_S) & FW_PFVF_CMD_R_CAPS_M) 155962306a36Sopenharmony_ci 156062306a36Sopenharmony_ci#define FW_PFVF_CMD_WX_CAPS_S 16 156162306a36Sopenharmony_ci#define FW_PFVF_CMD_WX_CAPS_M 0xff 156262306a36Sopenharmony_ci#define FW_PFVF_CMD_WX_CAPS_V(x) ((x) << FW_PFVF_CMD_WX_CAPS_S) 156362306a36Sopenharmony_ci#define FW_PFVF_CMD_WX_CAPS_G(x) \ 156462306a36Sopenharmony_ci (((x) >> FW_PFVF_CMD_WX_CAPS_S) & FW_PFVF_CMD_WX_CAPS_M) 156562306a36Sopenharmony_ci 156662306a36Sopenharmony_ci#define FW_PFVF_CMD_NETHCTRL_S 0 156762306a36Sopenharmony_ci#define FW_PFVF_CMD_NETHCTRL_M 0xffff 156862306a36Sopenharmony_ci#define FW_PFVF_CMD_NETHCTRL_V(x) ((x) << FW_PFVF_CMD_NETHCTRL_S) 156962306a36Sopenharmony_ci#define FW_PFVF_CMD_NETHCTRL_G(x) \ 157062306a36Sopenharmony_ci (((x) >> FW_PFVF_CMD_NETHCTRL_S) & FW_PFVF_CMD_NETHCTRL_M) 157162306a36Sopenharmony_ci 157262306a36Sopenharmony_cienum fw_iq_type { 157362306a36Sopenharmony_ci FW_IQ_TYPE_FL_INT_CAP, 157462306a36Sopenharmony_ci FW_IQ_TYPE_NO_FL_INT_CAP 157562306a36Sopenharmony_ci}; 157662306a36Sopenharmony_ci 157762306a36Sopenharmony_cienum fw_iq_iqtype { 157862306a36Sopenharmony_ci FW_IQ_IQTYPE_OTHER, 157962306a36Sopenharmony_ci FW_IQ_IQTYPE_NIC, 158062306a36Sopenharmony_ci FW_IQ_IQTYPE_OFLD, 158162306a36Sopenharmony_ci}; 158262306a36Sopenharmony_ci 158362306a36Sopenharmony_cistruct fw_iq_cmd { 158462306a36Sopenharmony_ci __be32 op_to_vfn; 158562306a36Sopenharmony_ci __be32 alloc_to_len16; 158662306a36Sopenharmony_ci __be16 physiqid; 158762306a36Sopenharmony_ci __be16 iqid; 158862306a36Sopenharmony_ci __be16 fl0id; 158962306a36Sopenharmony_ci __be16 fl1id; 159062306a36Sopenharmony_ci __be32 type_to_iqandstindex; 159162306a36Sopenharmony_ci __be16 iqdroprss_to_iqesize; 159262306a36Sopenharmony_ci __be16 iqsize; 159362306a36Sopenharmony_ci __be64 iqaddr; 159462306a36Sopenharmony_ci __be32 iqns_to_fl0congen; 159562306a36Sopenharmony_ci __be16 fl0dcaen_to_fl0cidxfthresh; 159662306a36Sopenharmony_ci __be16 fl0size; 159762306a36Sopenharmony_ci __be64 fl0addr; 159862306a36Sopenharmony_ci __be32 fl1cngchmap_to_fl1congen; 159962306a36Sopenharmony_ci __be16 fl1dcaen_to_fl1cidxfthresh; 160062306a36Sopenharmony_ci __be16 fl1size; 160162306a36Sopenharmony_ci __be64 fl1addr; 160262306a36Sopenharmony_ci}; 160362306a36Sopenharmony_ci 160462306a36Sopenharmony_ci#define FW_IQ_CMD_PFN_S 8 160562306a36Sopenharmony_ci#define FW_IQ_CMD_PFN_V(x) ((x) << FW_IQ_CMD_PFN_S) 160662306a36Sopenharmony_ci 160762306a36Sopenharmony_ci#define FW_IQ_CMD_VFN_S 0 160862306a36Sopenharmony_ci#define FW_IQ_CMD_VFN_V(x) ((x) << FW_IQ_CMD_VFN_S) 160962306a36Sopenharmony_ci 161062306a36Sopenharmony_ci#define FW_IQ_CMD_ALLOC_S 31 161162306a36Sopenharmony_ci#define FW_IQ_CMD_ALLOC_V(x) ((x) << FW_IQ_CMD_ALLOC_S) 161262306a36Sopenharmony_ci#define FW_IQ_CMD_ALLOC_F FW_IQ_CMD_ALLOC_V(1U) 161362306a36Sopenharmony_ci 161462306a36Sopenharmony_ci#define FW_IQ_CMD_FREE_S 30 161562306a36Sopenharmony_ci#define FW_IQ_CMD_FREE_V(x) ((x) << FW_IQ_CMD_FREE_S) 161662306a36Sopenharmony_ci#define FW_IQ_CMD_FREE_F FW_IQ_CMD_FREE_V(1U) 161762306a36Sopenharmony_ci 161862306a36Sopenharmony_ci#define FW_IQ_CMD_MODIFY_S 29 161962306a36Sopenharmony_ci#define FW_IQ_CMD_MODIFY_V(x) ((x) << FW_IQ_CMD_MODIFY_S) 162062306a36Sopenharmony_ci#define FW_IQ_CMD_MODIFY_F FW_IQ_CMD_MODIFY_V(1U) 162162306a36Sopenharmony_ci 162262306a36Sopenharmony_ci#define FW_IQ_CMD_IQSTART_S 28 162362306a36Sopenharmony_ci#define FW_IQ_CMD_IQSTART_V(x) ((x) << FW_IQ_CMD_IQSTART_S) 162462306a36Sopenharmony_ci#define FW_IQ_CMD_IQSTART_F FW_IQ_CMD_IQSTART_V(1U) 162562306a36Sopenharmony_ci 162662306a36Sopenharmony_ci#define FW_IQ_CMD_IQSTOP_S 27 162762306a36Sopenharmony_ci#define FW_IQ_CMD_IQSTOP_V(x) ((x) << FW_IQ_CMD_IQSTOP_S) 162862306a36Sopenharmony_ci#define FW_IQ_CMD_IQSTOP_F FW_IQ_CMD_IQSTOP_V(1U) 162962306a36Sopenharmony_ci 163062306a36Sopenharmony_ci#define FW_IQ_CMD_TYPE_S 29 163162306a36Sopenharmony_ci#define FW_IQ_CMD_TYPE_V(x) ((x) << FW_IQ_CMD_TYPE_S) 163262306a36Sopenharmony_ci 163362306a36Sopenharmony_ci#define FW_IQ_CMD_IQASYNCH_S 28 163462306a36Sopenharmony_ci#define FW_IQ_CMD_IQASYNCH_V(x) ((x) << FW_IQ_CMD_IQASYNCH_S) 163562306a36Sopenharmony_ci 163662306a36Sopenharmony_ci#define FW_IQ_CMD_VIID_S 16 163762306a36Sopenharmony_ci#define FW_IQ_CMD_VIID_V(x) ((x) << FW_IQ_CMD_VIID_S) 163862306a36Sopenharmony_ci 163962306a36Sopenharmony_ci#define FW_IQ_CMD_IQANDST_S 15 164062306a36Sopenharmony_ci#define FW_IQ_CMD_IQANDST_V(x) ((x) << FW_IQ_CMD_IQANDST_S) 164162306a36Sopenharmony_ci 164262306a36Sopenharmony_ci#define FW_IQ_CMD_IQANUS_S 14 164362306a36Sopenharmony_ci#define FW_IQ_CMD_IQANUS_V(x) ((x) << FW_IQ_CMD_IQANUS_S) 164462306a36Sopenharmony_ci 164562306a36Sopenharmony_ci#define FW_IQ_CMD_IQANUD_S 12 164662306a36Sopenharmony_ci#define FW_IQ_CMD_IQANUD_V(x) ((x) << FW_IQ_CMD_IQANUD_S) 164762306a36Sopenharmony_ci 164862306a36Sopenharmony_ci#define FW_IQ_CMD_IQANDSTINDEX_S 0 164962306a36Sopenharmony_ci#define FW_IQ_CMD_IQANDSTINDEX_V(x) ((x) << FW_IQ_CMD_IQANDSTINDEX_S) 165062306a36Sopenharmony_ci 165162306a36Sopenharmony_ci#define FW_IQ_CMD_IQDROPRSS_S 15 165262306a36Sopenharmony_ci#define FW_IQ_CMD_IQDROPRSS_V(x) ((x) << FW_IQ_CMD_IQDROPRSS_S) 165362306a36Sopenharmony_ci#define FW_IQ_CMD_IQDROPRSS_F FW_IQ_CMD_IQDROPRSS_V(1U) 165462306a36Sopenharmony_ci 165562306a36Sopenharmony_ci#define FW_IQ_CMD_IQGTSMODE_S 14 165662306a36Sopenharmony_ci#define FW_IQ_CMD_IQGTSMODE_V(x) ((x) << FW_IQ_CMD_IQGTSMODE_S) 165762306a36Sopenharmony_ci#define FW_IQ_CMD_IQGTSMODE_F FW_IQ_CMD_IQGTSMODE_V(1U) 165862306a36Sopenharmony_ci 165962306a36Sopenharmony_ci#define FW_IQ_CMD_IQPCIECH_S 12 166062306a36Sopenharmony_ci#define FW_IQ_CMD_IQPCIECH_V(x) ((x) << FW_IQ_CMD_IQPCIECH_S) 166162306a36Sopenharmony_ci 166262306a36Sopenharmony_ci#define FW_IQ_CMD_IQDCAEN_S 11 166362306a36Sopenharmony_ci#define FW_IQ_CMD_IQDCAEN_V(x) ((x) << FW_IQ_CMD_IQDCAEN_S) 166462306a36Sopenharmony_ci 166562306a36Sopenharmony_ci#define FW_IQ_CMD_IQDCACPU_S 6 166662306a36Sopenharmony_ci#define FW_IQ_CMD_IQDCACPU_V(x) ((x) << FW_IQ_CMD_IQDCACPU_S) 166762306a36Sopenharmony_ci 166862306a36Sopenharmony_ci#define FW_IQ_CMD_IQINTCNTTHRESH_S 4 166962306a36Sopenharmony_ci#define FW_IQ_CMD_IQINTCNTTHRESH_V(x) ((x) << FW_IQ_CMD_IQINTCNTTHRESH_S) 167062306a36Sopenharmony_ci 167162306a36Sopenharmony_ci#define FW_IQ_CMD_IQO_S 3 167262306a36Sopenharmony_ci#define FW_IQ_CMD_IQO_V(x) ((x) << FW_IQ_CMD_IQO_S) 167362306a36Sopenharmony_ci#define FW_IQ_CMD_IQO_F FW_IQ_CMD_IQO_V(1U) 167462306a36Sopenharmony_ci 167562306a36Sopenharmony_ci#define FW_IQ_CMD_IQCPRIO_S 2 167662306a36Sopenharmony_ci#define FW_IQ_CMD_IQCPRIO_V(x) ((x) << FW_IQ_CMD_IQCPRIO_S) 167762306a36Sopenharmony_ci 167862306a36Sopenharmony_ci#define FW_IQ_CMD_IQESIZE_S 0 167962306a36Sopenharmony_ci#define FW_IQ_CMD_IQESIZE_V(x) ((x) << FW_IQ_CMD_IQESIZE_S) 168062306a36Sopenharmony_ci 168162306a36Sopenharmony_ci#define FW_IQ_CMD_IQNS_S 31 168262306a36Sopenharmony_ci#define FW_IQ_CMD_IQNS_V(x) ((x) << FW_IQ_CMD_IQNS_S) 168362306a36Sopenharmony_ci 168462306a36Sopenharmony_ci#define FW_IQ_CMD_IQRO_S 30 168562306a36Sopenharmony_ci#define FW_IQ_CMD_IQRO_V(x) ((x) << FW_IQ_CMD_IQRO_S) 168662306a36Sopenharmony_ci 168762306a36Sopenharmony_ci#define FW_IQ_CMD_IQFLINTIQHSEN_S 28 168862306a36Sopenharmony_ci#define FW_IQ_CMD_IQFLINTIQHSEN_V(x) ((x) << FW_IQ_CMD_IQFLINTIQHSEN_S) 168962306a36Sopenharmony_ci 169062306a36Sopenharmony_ci#define FW_IQ_CMD_IQFLINTCONGEN_S 27 169162306a36Sopenharmony_ci#define FW_IQ_CMD_IQFLINTCONGEN_V(x) ((x) << FW_IQ_CMD_IQFLINTCONGEN_S) 169262306a36Sopenharmony_ci#define FW_IQ_CMD_IQFLINTCONGEN_F FW_IQ_CMD_IQFLINTCONGEN_V(1U) 169362306a36Sopenharmony_ci 169462306a36Sopenharmony_ci#define FW_IQ_CMD_IQFLINTISCSIC_S 26 169562306a36Sopenharmony_ci#define FW_IQ_CMD_IQFLINTISCSIC_V(x) ((x) << FW_IQ_CMD_IQFLINTISCSIC_S) 169662306a36Sopenharmony_ci 169762306a36Sopenharmony_ci#define FW_IQ_CMD_IQTYPE_S 24 169862306a36Sopenharmony_ci#define FW_IQ_CMD_IQTYPE_M 0x3 169962306a36Sopenharmony_ci#define FW_IQ_CMD_IQTYPE_V(x) ((x) << FW_IQ_CMD_IQTYPE_S) 170062306a36Sopenharmony_ci#define FW_IQ_CMD_IQTYPE_G(x) \ 170162306a36Sopenharmony_ci (((x) >> FW_IQ_CMD_IQTYPE_S) & FW_IQ_CMD_IQTYPE_M) 170262306a36Sopenharmony_ci 170362306a36Sopenharmony_ci#define FW_IQ_CMD_FL0CNGCHMAP_S 20 170462306a36Sopenharmony_ci#define FW_IQ_CMD_FL0CNGCHMAP_V(x) ((x) << FW_IQ_CMD_FL0CNGCHMAP_S) 170562306a36Sopenharmony_ci 170662306a36Sopenharmony_ci#define FW_IQ_CMD_FL0CACHELOCK_S 15 170762306a36Sopenharmony_ci#define FW_IQ_CMD_FL0CACHELOCK_V(x) ((x) << FW_IQ_CMD_FL0CACHELOCK_S) 170862306a36Sopenharmony_ci 170962306a36Sopenharmony_ci#define FW_IQ_CMD_FL0DBP_S 14 171062306a36Sopenharmony_ci#define FW_IQ_CMD_FL0DBP_V(x) ((x) << FW_IQ_CMD_FL0DBP_S) 171162306a36Sopenharmony_ci 171262306a36Sopenharmony_ci#define FW_IQ_CMD_FL0DATANS_S 13 171362306a36Sopenharmony_ci#define FW_IQ_CMD_FL0DATANS_V(x) ((x) << FW_IQ_CMD_FL0DATANS_S) 171462306a36Sopenharmony_ci 171562306a36Sopenharmony_ci#define FW_IQ_CMD_FL0DATARO_S 12 171662306a36Sopenharmony_ci#define FW_IQ_CMD_FL0DATARO_V(x) ((x) << FW_IQ_CMD_FL0DATARO_S) 171762306a36Sopenharmony_ci#define FW_IQ_CMD_FL0DATARO_F FW_IQ_CMD_FL0DATARO_V(1U) 171862306a36Sopenharmony_ci 171962306a36Sopenharmony_ci#define FW_IQ_CMD_FL0CONGCIF_S 11 172062306a36Sopenharmony_ci#define FW_IQ_CMD_FL0CONGCIF_V(x) ((x) << FW_IQ_CMD_FL0CONGCIF_S) 172162306a36Sopenharmony_ci#define FW_IQ_CMD_FL0CONGCIF_F FW_IQ_CMD_FL0CONGCIF_V(1U) 172262306a36Sopenharmony_ci 172362306a36Sopenharmony_ci#define FW_IQ_CMD_FL0ONCHIP_S 10 172462306a36Sopenharmony_ci#define FW_IQ_CMD_FL0ONCHIP_V(x) ((x) << FW_IQ_CMD_FL0ONCHIP_S) 172562306a36Sopenharmony_ci 172662306a36Sopenharmony_ci#define FW_IQ_CMD_FL0STATUSPGNS_S 9 172762306a36Sopenharmony_ci#define FW_IQ_CMD_FL0STATUSPGNS_V(x) ((x) << FW_IQ_CMD_FL0STATUSPGNS_S) 172862306a36Sopenharmony_ci 172962306a36Sopenharmony_ci#define FW_IQ_CMD_FL0STATUSPGRO_S 8 173062306a36Sopenharmony_ci#define FW_IQ_CMD_FL0STATUSPGRO_V(x) ((x) << FW_IQ_CMD_FL0STATUSPGRO_S) 173162306a36Sopenharmony_ci 173262306a36Sopenharmony_ci#define FW_IQ_CMD_FL0FETCHNS_S 7 173362306a36Sopenharmony_ci#define FW_IQ_CMD_FL0FETCHNS_V(x) ((x) << FW_IQ_CMD_FL0FETCHNS_S) 173462306a36Sopenharmony_ci 173562306a36Sopenharmony_ci#define FW_IQ_CMD_FL0FETCHRO_S 6 173662306a36Sopenharmony_ci#define FW_IQ_CMD_FL0FETCHRO_V(x) ((x) << FW_IQ_CMD_FL0FETCHRO_S) 173762306a36Sopenharmony_ci#define FW_IQ_CMD_FL0FETCHRO_F FW_IQ_CMD_FL0FETCHRO_V(1U) 173862306a36Sopenharmony_ci 173962306a36Sopenharmony_ci#define FW_IQ_CMD_FL0HOSTFCMODE_S 4 174062306a36Sopenharmony_ci#define FW_IQ_CMD_FL0HOSTFCMODE_V(x) ((x) << FW_IQ_CMD_FL0HOSTFCMODE_S) 174162306a36Sopenharmony_ci 174262306a36Sopenharmony_ci#define FW_IQ_CMD_FL0CPRIO_S 3 174362306a36Sopenharmony_ci#define FW_IQ_CMD_FL0CPRIO_V(x) ((x) << FW_IQ_CMD_FL0CPRIO_S) 174462306a36Sopenharmony_ci 174562306a36Sopenharmony_ci#define FW_IQ_CMD_FL0PADEN_S 2 174662306a36Sopenharmony_ci#define FW_IQ_CMD_FL0PADEN_V(x) ((x) << FW_IQ_CMD_FL0PADEN_S) 174762306a36Sopenharmony_ci#define FW_IQ_CMD_FL0PADEN_F FW_IQ_CMD_FL0PADEN_V(1U) 174862306a36Sopenharmony_ci 174962306a36Sopenharmony_ci#define FW_IQ_CMD_FL0PACKEN_S 1 175062306a36Sopenharmony_ci#define FW_IQ_CMD_FL0PACKEN_V(x) ((x) << FW_IQ_CMD_FL0PACKEN_S) 175162306a36Sopenharmony_ci#define FW_IQ_CMD_FL0PACKEN_F FW_IQ_CMD_FL0PACKEN_V(1U) 175262306a36Sopenharmony_ci 175362306a36Sopenharmony_ci#define FW_IQ_CMD_FL0CONGEN_S 0 175462306a36Sopenharmony_ci#define FW_IQ_CMD_FL0CONGEN_V(x) ((x) << FW_IQ_CMD_FL0CONGEN_S) 175562306a36Sopenharmony_ci#define FW_IQ_CMD_FL0CONGEN_F FW_IQ_CMD_FL0CONGEN_V(1U) 175662306a36Sopenharmony_ci 175762306a36Sopenharmony_ci#define FW_IQ_CMD_FL0DCAEN_S 15 175862306a36Sopenharmony_ci#define FW_IQ_CMD_FL0DCAEN_V(x) ((x) << FW_IQ_CMD_FL0DCAEN_S) 175962306a36Sopenharmony_ci 176062306a36Sopenharmony_ci#define FW_IQ_CMD_FL0DCACPU_S 10 176162306a36Sopenharmony_ci#define FW_IQ_CMD_FL0DCACPU_V(x) ((x) << FW_IQ_CMD_FL0DCACPU_S) 176262306a36Sopenharmony_ci 176362306a36Sopenharmony_ci#define FW_IQ_CMD_FL0FBMIN_S 7 176462306a36Sopenharmony_ci#define FW_IQ_CMD_FL0FBMIN_V(x) ((x) << FW_IQ_CMD_FL0FBMIN_S) 176562306a36Sopenharmony_ci 176662306a36Sopenharmony_ci#define FW_IQ_CMD_FL0FBMAX_S 4 176762306a36Sopenharmony_ci#define FW_IQ_CMD_FL0FBMAX_V(x) ((x) << FW_IQ_CMD_FL0FBMAX_S) 176862306a36Sopenharmony_ci 176962306a36Sopenharmony_ci#define FW_IQ_CMD_FL0CIDXFTHRESHO_S 3 177062306a36Sopenharmony_ci#define FW_IQ_CMD_FL0CIDXFTHRESHO_V(x) ((x) << FW_IQ_CMD_FL0CIDXFTHRESHO_S) 177162306a36Sopenharmony_ci#define FW_IQ_CMD_FL0CIDXFTHRESHO_F FW_IQ_CMD_FL0CIDXFTHRESHO_V(1U) 177262306a36Sopenharmony_ci 177362306a36Sopenharmony_ci#define FW_IQ_CMD_FL0CIDXFTHRESH_S 0 177462306a36Sopenharmony_ci#define FW_IQ_CMD_FL0CIDXFTHRESH_V(x) ((x) << FW_IQ_CMD_FL0CIDXFTHRESH_S) 177562306a36Sopenharmony_ci 177662306a36Sopenharmony_ci#define FW_IQ_CMD_FL1CNGCHMAP_S 20 177762306a36Sopenharmony_ci#define FW_IQ_CMD_FL1CNGCHMAP_V(x) ((x) << FW_IQ_CMD_FL1CNGCHMAP_S) 177862306a36Sopenharmony_ci 177962306a36Sopenharmony_ci#define FW_IQ_CMD_FL1CACHELOCK_S 15 178062306a36Sopenharmony_ci#define FW_IQ_CMD_FL1CACHELOCK_V(x) ((x) << FW_IQ_CMD_FL1CACHELOCK_S) 178162306a36Sopenharmony_ci 178262306a36Sopenharmony_ci#define FW_IQ_CMD_FL1DBP_S 14 178362306a36Sopenharmony_ci#define FW_IQ_CMD_FL1DBP_V(x) ((x) << FW_IQ_CMD_FL1DBP_S) 178462306a36Sopenharmony_ci 178562306a36Sopenharmony_ci#define FW_IQ_CMD_FL1DATANS_S 13 178662306a36Sopenharmony_ci#define FW_IQ_CMD_FL1DATANS_V(x) ((x) << FW_IQ_CMD_FL1DATANS_S) 178762306a36Sopenharmony_ci 178862306a36Sopenharmony_ci#define FW_IQ_CMD_FL1DATARO_S 12 178962306a36Sopenharmony_ci#define FW_IQ_CMD_FL1DATARO_V(x) ((x) << FW_IQ_CMD_FL1DATARO_S) 179062306a36Sopenharmony_ci 179162306a36Sopenharmony_ci#define FW_IQ_CMD_FL1CONGCIF_S 11 179262306a36Sopenharmony_ci#define FW_IQ_CMD_FL1CONGCIF_V(x) ((x) << FW_IQ_CMD_FL1CONGCIF_S) 179362306a36Sopenharmony_ci 179462306a36Sopenharmony_ci#define FW_IQ_CMD_FL1ONCHIP_S 10 179562306a36Sopenharmony_ci#define FW_IQ_CMD_FL1ONCHIP_V(x) ((x) << FW_IQ_CMD_FL1ONCHIP_S) 179662306a36Sopenharmony_ci 179762306a36Sopenharmony_ci#define FW_IQ_CMD_FL1STATUSPGNS_S 9 179862306a36Sopenharmony_ci#define FW_IQ_CMD_FL1STATUSPGNS_V(x) ((x) << FW_IQ_CMD_FL1STATUSPGNS_S) 179962306a36Sopenharmony_ci 180062306a36Sopenharmony_ci#define FW_IQ_CMD_FL1STATUSPGRO_S 8 180162306a36Sopenharmony_ci#define FW_IQ_CMD_FL1STATUSPGRO_V(x) ((x) << FW_IQ_CMD_FL1STATUSPGRO_S) 180262306a36Sopenharmony_ci 180362306a36Sopenharmony_ci#define FW_IQ_CMD_FL1FETCHNS_S 7 180462306a36Sopenharmony_ci#define FW_IQ_CMD_FL1FETCHNS_V(x) ((x) << FW_IQ_CMD_FL1FETCHNS_S) 180562306a36Sopenharmony_ci 180662306a36Sopenharmony_ci#define FW_IQ_CMD_FL1FETCHRO_S 6 180762306a36Sopenharmony_ci#define FW_IQ_CMD_FL1FETCHRO_V(x) ((x) << FW_IQ_CMD_FL1FETCHRO_S) 180862306a36Sopenharmony_ci 180962306a36Sopenharmony_ci#define FW_IQ_CMD_FL1HOSTFCMODE_S 4 181062306a36Sopenharmony_ci#define FW_IQ_CMD_FL1HOSTFCMODE_V(x) ((x) << FW_IQ_CMD_FL1HOSTFCMODE_S) 181162306a36Sopenharmony_ci 181262306a36Sopenharmony_ci#define FW_IQ_CMD_FL1CPRIO_S 3 181362306a36Sopenharmony_ci#define FW_IQ_CMD_FL1CPRIO_V(x) ((x) << FW_IQ_CMD_FL1CPRIO_S) 181462306a36Sopenharmony_ci 181562306a36Sopenharmony_ci#define FW_IQ_CMD_FL1PADEN_S 2 181662306a36Sopenharmony_ci#define FW_IQ_CMD_FL1PADEN_V(x) ((x) << FW_IQ_CMD_FL1PADEN_S) 181762306a36Sopenharmony_ci#define FW_IQ_CMD_FL1PADEN_F FW_IQ_CMD_FL1PADEN_V(1U) 181862306a36Sopenharmony_ci 181962306a36Sopenharmony_ci#define FW_IQ_CMD_FL1PACKEN_S 1 182062306a36Sopenharmony_ci#define FW_IQ_CMD_FL1PACKEN_V(x) ((x) << FW_IQ_CMD_FL1PACKEN_S) 182162306a36Sopenharmony_ci#define FW_IQ_CMD_FL1PACKEN_F FW_IQ_CMD_FL1PACKEN_V(1U) 182262306a36Sopenharmony_ci 182362306a36Sopenharmony_ci#define FW_IQ_CMD_FL1CONGEN_S 0 182462306a36Sopenharmony_ci#define FW_IQ_CMD_FL1CONGEN_V(x) ((x) << FW_IQ_CMD_FL1CONGEN_S) 182562306a36Sopenharmony_ci#define FW_IQ_CMD_FL1CONGEN_F FW_IQ_CMD_FL1CONGEN_V(1U) 182662306a36Sopenharmony_ci 182762306a36Sopenharmony_ci#define FW_IQ_CMD_FL1DCAEN_S 15 182862306a36Sopenharmony_ci#define FW_IQ_CMD_FL1DCAEN_V(x) ((x) << FW_IQ_CMD_FL1DCAEN_S) 182962306a36Sopenharmony_ci 183062306a36Sopenharmony_ci#define FW_IQ_CMD_FL1DCACPU_S 10 183162306a36Sopenharmony_ci#define FW_IQ_CMD_FL1DCACPU_V(x) ((x) << FW_IQ_CMD_FL1DCACPU_S) 183262306a36Sopenharmony_ci 183362306a36Sopenharmony_ci#define FW_IQ_CMD_FL1FBMIN_S 7 183462306a36Sopenharmony_ci#define FW_IQ_CMD_FL1FBMIN_V(x) ((x) << FW_IQ_CMD_FL1FBMIN_S) 183562306a36Sopenharmony_ci 183662306a36Sopenharmony_ci#define FW_IQ_CMD_FL1FBMAX_S 4 183762306a36Sopenharmony_ci#define FW_IQ_CMD_FL1FBMAX_V(x) ((x) << FW_IQ_CMD_FL1FBMAX_S) 183862306a36Sopenharmony_ci 183962306a36Sopenharmony_ci#define FW_IQ_CMD_FL1CIDXFTHRESHO_S 3 184062306a36Sopenharmony_ci#define FW_IQ_CMD_FL1CIDXFTHRESHO_V(x) ((x) << FW_IQ_CMD_FL1CIDXFTHRESHO_S) 184162306a36Sopenharmony_ci#define FW_IQ_CMD_FL1CIDXFTHRESHO_F FW_IQ_CMD_FL1CIDXFTHRESHO_V(1U) 184262306a36Sopenharmony_ci 184362306a36Sopenharmony_ci#define FW_IQ_CMD_FL1CIDXFTHRESH_S 0 184462306a36Sopenharmony_ci#define FW_IQ_CMD_FL1CIDXFTHRESH_V(x) ((x) << FW_IQ_CMD_FL1CIDXFTHRESH_S) 184562306a36Sopenharmony_ci 184662306a36Sopenharmony_cistruct fw_eq_eth_cmd { 184762306a36Sopenharmony_ci __be32 op_to_vfn; 184862306a36Sopenharmony_ci __be32 alloc_to_len16; 184962306a36Sopenharmony_ci __be32 eqid_pkd; 185062306a36Sopenharmony_ci __be32 physeqid_pkd; 185162306a36Sopenharmony_ci __be32 fetchszm_to_iqid; 185262306a36Sopenharmony_ci __be32 dcaen_to_eqsize; 185362306a36Sopenharmony_ci __be64 eqaddr; 185462306a36Sopenharmony_ci __be32 autoequiqe_to_viid; 185562306a36Sopenharmony_ci __be32 timeren_timerix; 185662306a36Sopenharmony_ci __be64 r9; 185762306a36Sopenharmony_ci}; 185862306a36Sopenharmony_ci 185962306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_PFN_S 8 186062306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_PFN_V(x) ((x) << FW_EQ_ETH_CMD_PFN_S) 186162306a36Sopenharmony_ci 186262306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_VFN_S 0 186362306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_VFN_V(x) ((x) << FW_EQ_ETH_CMD_VFN_S) 186462306a36Sopenharmony_ci 186562306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_ALLOC_S 31 186662306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_ALLOC_V(x) ((x) << FW_EQ_ETH_CMD_ALLOC_S) 186762306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_ALLOC_F FW_EQ_ETH_CMD_ALLOC_V(1U) 186862306a36Sopenharmony_ci 186962306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_FREE_S 30 187062306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_FREE_V(x) ((x) << FW_EQ_ETH_CMD_FREE_S) 187162306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_FREE_F FW_EQ_ETH_CMD_FREE_V(1U) 187262306a36Sopenharmony_ci 187362306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_MODIFY_S 29 187462306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_MODIFY_V(x) ((x) << FW_EQ_ETH_CMD_MODIFY_S) 187562306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_MODIFY_F FW_EQ_ETH_CMD_MODIFY_V(1U) 187662306a36Sopenharmony_ci 187762306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_EQSTART_S 28 187862306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_EQSTART_V(x) ((x) << FW_EQ_ETH_CMD_EQSTART_S) 187962306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_EQSTART_F FW_EQ_ETH_CMD_EQSTART_V(1U) 188062306a36Sopenharmony_ci 188162306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_EQSTOP_S 27 188262306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_EQSTOP_V(x) ((x) << FW_EQ_ETH_CMD_EQSTOP_S) 188362306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_EQSTOP_F FW_EQ_ETH_CMD_EQSTOP_V(1U) 188462306a36Sopenharmony_ci 188562306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_EQID_S 0 188662306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_EQID_M 0xfffff 188762306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_EQID_V(x) ((x) << FW_EQ_ETH_CMD_EQID_S) 188862306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_EQID_G(x) \ 188962306a36Sopenharmony_ci (((x) >> FW_EQ_ETH_CMD_EQID_S) & FW_EQ_ETH_CMD_EQID_M) 189062306a36Sopenharmony_ci 189162306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_PHYSEQID_S 0 189262306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_PHYSEQID_M 0xfffff 189362306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_PHYSEQID_V(x) ((x) << FW_EQ_ETH_CMD_PHYSEQID_S) 189462306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_PHYSEQID_G(x) \ 189562306a36Sopenharmony_ci (((x) >> FW_EQ_ETH_CMD_PHYSEQID_S) & FW_EQ_ETH_CMD_PHYSEQID_M) 189662306a36Sopenharmony_ci 189762306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_FETCHSZM_S 26 189862306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_FETCHSZM_V(x) ((x) << FW_EQ_ETH_CMD_FETCHSZM_S) 189962306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_FETCHSZM_F FW_EQ_ETH_CMD_FETCHSZM_V(1U) 190062306a36Sopenharmony_ci 190162306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_STATUSPGNS_S 25 190262306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_STATUSPGNS_V(x) ((x) << FW_EQ_ETH_CMD_STATUSPGNS_S) 190362306a36Sopenharmony_ci 190462306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_STATUSPGRO_S 24 190562306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_STATUSPGRO_V(x) ((x) << FW_EQ_ETH_CMD_STATUSPGRO_S) 190662306a36Sopenharmony_ci 190762306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_FETCHNS_S 23 190862306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_FETCHNS_V(x) ((x) << FW_EQ_ETH_CMD_FETCHNS_S) 190962306a36Sopenharmony_ci 191062306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_FETCHRO_S 22 191162306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_FETCHRO_V(x) ((x) << FW_EQ_ETH_CMD_FETCHRO_S) 191262306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_FETCHRO_F FW_EQ_ETH_CMD_FETCHRO_V(1U) 191362306a36Sopenharmony_ci 191462306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_HOSTFCMODE_S 20 191562306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_HOSTFCMODE_V(x) ((x) << FW_EQ_ETH_CMD_HOSTFCMODE_S) 191662306a36Sopenharmony_ci 191762306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_CPRIO_S 19 191862306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_CPRIO_V(x) ((x) << FW_EQ_ETH_CMD_CPRIO_S) 191962306a36Sopenharmony_ci 192062306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_ONCHIP_S 18 192162306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_ONCHIP_V(x) ((x) << FW_EQ_ETH_CMD_ONCHIP_S) 192262306a36Sopenharmony_ci 192362306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_PCIECHN_S 16 192462306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_PCIECHN_V(x) ((x) << FW_EQ_ETH_CMD_PCIECHN_S) 192562306a36Sopenharmony_ci 192662306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_IQID_S 0 192762306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_IQID_V(x) ((x) << FW_EQ_ETH_CMD_IQID_S) 192862306a36Sopenharmony_ci 192962306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_DCAEN_S 31 193062306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_DCAEN_V(x) ((x) << FW_EQ_ETH_CMD_DCAEN_S) 193162306a36Sopenharmony_ci 193262306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_DCACPU_S 26 193362306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_DCACPU_V(x) ((x) << FW_EQ_ETH_CMD_DCACPU_S) 193462306a36Sopenharmony_ci 193562306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_FBMIN_S 23 193662306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_FBMIN_V(x) ((x) << FW_EQ_ETH_CMD_FBMIN_S) 193762306a36Sopenharmony_ci 193862306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_FBMAX_S 20 193962306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_FBMAX_V(x) ((x) << FW_EQ_ETH_CMD_FBMAX_S) 194062306a36Sopenharmony_ci 194162306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_CIDXFTHRESHO_S 19 194262306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_CIDXFTHRESHO_V(x) ((x) << FW_EQ_ETH_CMD_CIDXFTHRESHO_S) 194362306a36Sopenharmony_ci 194462306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_CIDXFTHRESH_S 16 194562306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_CIDXFTHRESH_V(x) ((x) << FW_EQ_ETH_CMD_CIDXFTHRESH_S) 194662306a36Sopenharmony_ci 194762306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_EQSIZE_S 0 194862306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_EQSIZE_V(x) ((x) << FW_EQ_ETH_CMD_EQSIZE_S) 194962306a36Sopenharmony_ci 195062306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_AUTOEQUIQE_S 31 195162306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_AUTOEQUIQE_V(x) ((x) << FW_EQ_ETH_CMD_AUTOEQUIQE_S) 195262306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_AUTOEQUIQE_F FW_EQ_ETH_CMD_AUTOEQUIQE_V(1U) 195362306a36Sopenharmony_ci 195462306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_AUTOEQUEQE_S 30 195562306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_AUTOEQUEQE_V(x) ((x) << FW_EQ_ETH_CMD_AUTOEQUEQE_S) 195662306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_AUTOEQUEQE_F FW_EQ_ETH_CMD_AUTOEQUEQE_V(1U) 195762306a36Sopenharmony_ci 195862306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_VIID_S 16 195962306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_VIID_V(x) ((x) << FW_EQ_ETH_CMD_VIID_S) 196062306a36Sopenharmony_ci 196162306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_TIMEREN_S 3 196262306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_TIMEREN_M 0x1 196362306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_TIMEREN_V(x) ((x) << FW_EQ_ETH_CMD_TIMEREN_S) 196462306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_TIMEREN_G(x) \ 196562306a36Sopenharmony_ci (((x) >> FW_EQ_ETH_CMD_TIMEREN_S) & FW_EQ_ETH_CMD_TIMEREN_M) 196662306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_TIMEREN_F FW_EQ_ETH_CMD_TIMEREN_V(1U) 196762306a36Sopenharmony_ci 196862306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_TIMERIX_S 0 196962306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_TIMERIX_M 0x7 197062306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_TIMERIX_V(x) ((x) << FW_EQ_ETH_CMD_TIMERIX_S) 197162306a36Sopenharmony_ci#define FW_EQ_ETH_CMD_TIMERIX_G(x) \ 197262306a36Sopenharmony_ci (((x) >> FW_EQ_ETH_CMD_TIMERIX_S) & FW_EQ_ETH_CMD_TIMERIX_M) 197362306a36Sopenharmony_ci 197462306a36Sopenharmony_cistruct fw_eq_ctrl_cmd { 197562306a36Sopenharmony_ci __be32 op_to_vfn; 197662306a36Sopenharmony_ci __be32 alloc_to_len16; 197762306a36Sopenharmony_ci __be32 cmpliqid_eqid; 197862306a36Sopenharmony_ci __be32 physeqid_pkd; 197962306a36Sopenharmony_ci __be32 fetchszm_to_iqid; 198062306a36Sopenharmony_ci __be32 dcaen_to_eqsize; 198162306a36Sopenharmony_ci __be64 eqaddr; 198262306a36Sopenharmony_ci}; 198362306a36Sopenharmony_ci 198462306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_PFN_S 8 198562306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_PFN_V(x) ((x) << FW_EQ_CTRL_CMD_PFN_S) 198662306a36Sopenharmony_ci 198762306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_VFN_S 0 198862306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_VFN_V(x) ((x) << FW_EQ_CTRL_CMD_VFN_S) 198962306a36Sopenharmony_ci 199062306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_ALLOC_S 31 199162306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_ALLOC_V(x) ((x) << FW_EQ_CTRL_CMD_ALLOC_S) 199262306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_ALLOC_F FW_EQ_CTRL_CMD_ALLOC_V(1U) 199362306a36Sopenharmony_ci 199462306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_FREE_S 30 199562306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_FREE_V(x) ((x) << FW_EQ_CTRL_CMD_FREE_S) 199662306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_FREE_F FW_EQ_CTRL_CMD_FREE_V(1U) 199762306a36Sopenharmony_ci 199862306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_MODIFY_S 29 199962306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_MODIFY_V(x) ((x) << FW_EQ_CTRL_CMD_MODIFY_S) 200062306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_MODIFY_F FW_EQ_CTRL_CMD_MODIFY_V(1U) 200162306a36Sopenharmony_ci 200262306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_EQSTART_S 28 200362306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_EQSTART_V(x) ((x) << FW_EQ_CTRL_CMD_EQSTART_S) 200462306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_EQSTART_F FW_EQ_CTRL_CMD_EQSTART_V(1U) 200562306a36Sopenharmony_ci 200662306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_EQSTOP_S 27 200762306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_EQSTOP_V(x) ((x) << FW_EQ_CTRL_CMD_EQSTOP_S) 200862306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_EQSTOP_F FW_EQ_CTRL_CMD_EQSTOP_V(1U) 200962306a36Sopenharmony_ci 201062306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_CMPLIQID_S 20 201162306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_CMPLIQID_V(x) ((x) << FW_EQ_CTRL_CMD_CMPLIQID_S) 201262306a36Sopenharmony_ci 201362306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_EQID_S 0 201462306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_EQID_M 0xfffff 201562306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_EQID_V(x) ((x) << FW_EQ_CTRL_CMD_EQID_S) 201662306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_EQID_G(x) \ 201762306a36Sopenharmony_ci (((x) >> FW_EQ_CTRL_CMD_EQID_S) & FW_EQ_CTRL_CMD_EQID_M) 201862306a36Sopenharmony_ci 201962306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_PHYSEQID_S 0 202062306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_PHYSEQID_M 0xfffff 202162306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_PHYSEQID_G(x) \ 202262306a36Sopenharmony_ci (((x) >> FW_EQ_CTRL_CMD_PHYSEQID_S) & FW_EQ_CTRL_CMD_PHYSEQID_M) 202362306a36Sopenharmony_ci 202462306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_FETCHSZM_S 26 202562306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_FETCHSZM_V(x) ((x) << FW_EQ_CTRL_CMD_FETCHSZM_S) 202662306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_FETCHSZM_F FW_EQ_CTRL_CMD_FETCHSZM_V(1U) 202762306a36Sopenharmony_ci 202862306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_STATUSPGNS_S 25 202962306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_STATUSPGNS_V(x) ((x) << FW_EQ_CTRL_CMD_STATUSPGNS_S) 203062306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_STATUSPGNS_F FW_EQ_CTRL_CMD_STATUSPGNS_V(1U) 203162306a36Sopenharmony_ci 203262306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_STATUSPGRO_S 24 203362306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_STATUSPGRO_V(x) ((x) << FW_EQ_CTRL_CMD_STATUSPGRO_S) 203462306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_STATUSPGRO_F FW_EQ_CTRL_CMD_STATUSPGRO_V(1U) 203562306a36Sopenharmony_ci 203662306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_FETCHNS_S 23 203762306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_FETCHNS_V(x) ((x) << FW_EQ_CTRL_CMD_FETCHNS_S) 203862306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_FETCHNS_F FW_EQ_CTRL_CMD_FETCHNS_V(1U) 203962306a36Sopenharmony_ci 204062306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_FETCHRO_S 22 204162306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_FETCHRO_V(x) ((x) << FW_EQ_CTRL_CMD_FETCHRO_S) 204262306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_FETCHRO_F FW_EQ_CTRL_CMD_FETCHRO_V(1U) 204362306a36Sopenharmony_ci 204462306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_HOSTFCMODE_S 20 204562306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_HOSTFCMODE_V(x) ((x) << FW_EQ_CTRL_CMD_HOSTFCMODE_S) 204662306a36Sopenharmony_ci 204762306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_CPRIO_S 19 204862306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_CPRIO_V(x) ((x) << FW_EQ_CTRL_CMD_CPRIO_S) 204962306a36Sopenharmony_ci 205062306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_ONCHIP_S 18 205162306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_ONCHIP_V(x) ((x) << FW_EQ_CTRL_CMD_ONCHIP_S) 205262306a36Sopenharmony_ci 205362306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_PCIECHN_S 16 205462306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_PCIECHN_V(x) ((x) << FW_EQ_CTRL_CMD_PCIECHN_S) 205562306a36Sopenharmony_ci 205662306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_IQID_S 0 205762306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_IQID_V(x) ((x) << FW_EQ_CTRL_CMD_IQID_S) 205862306a36Sopenharmony_ci 205962306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_DCAEN_S 31 206062306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_DCAEN_V(x) ((x) << FW_EQ_CTRL_CMD_DCAEN_S) 206162306a36Sopenharmony_ci 206262306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_DCACPU_S 26 206362306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_DCACPU_V(x) ((x) << FW_EQ_CTRL_CMD_DCACPU_S) 206462306a36Sopenharmony_ci 206562306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_FBMIN_S 23 206662306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_FBMIN_V(x) ((x) << FW_EQ_CTRL_CMD_FBMIN_S) 206762306a36Sopenharmony_ci 206862306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_FBMAX_S 20 206962306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_FBMAX_V(x) ((x) << FW_EQ_CTRL_CMD_FBMAX_S) 207062306a36Sopenharmony_ci 207162306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_CIDXFTHRESHO_S 19 207262306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_CIDXFTHRESHO_V(x) \ 207362306a36Sopenharmony_ci ((x) << FW_EQ_CTRL_CMD_CIDXFTHRESHO_S) 207462306a36Sopenharmony_ci 207562306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_CIDXFTHRESH_S 16 207662306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_CIDXFTHRESH_V(x) ((x) << FW_EQ_CTRL_CMD_CIDXFTHRESH_S) 207762306a36Sopenharmony_ci 207862306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_EQSIZE_S 0 207962306a36Sopenharmony_ci#define FW_EQ_CTRL_CMD_EQSIZE_V(x) ((x) << FW_EQ_CTRL_CMD_EQSIZE_S) 208062306a36Sopenharmony_ci 208162306a36Sopenharmony_cistruct fw_eq_ofld_cmd { 208262306a36Sopenharmony_ci __be32 op_to_vfn; 208362306a36Sopenharmony_ci __be32 alloc_to_len16; 208462306a36Sopenharmony_ci __be32 eqid_pkd; 208562306a36Sopenharmony_ci __be32 physeqid_pkd; 208662306a36Sopenharmony_ci __be32 fetchszm_to_iqid; 208762306a36Sopenharmony_ci __be32 dcaen_to_eqsize; 208862306a36Sopenharmony_ci __be64 eqaddr; 208962306a36Sopenharmony_ci}; 209062306a36Sopenharmony_ci 209162306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_PFN_S 8 209262306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_PFN_V(x) ((x) << FW_EQ_OFLD_CMD_PFN_S) 209362306a36Sopenharmony_ci 209462306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_VFN_S 0 209562306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_VFN_V(x) ((x) << FW_EQ_OFLD_CMD_VFN_S) 209662306a36Sopenharmony_ci 209762306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_ALLOC_S 31 209862306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_ALLOC_V(x) ((x) << FW_EQ_OFLD_CMD_ALLOC_S) 209962306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_ALLOC_F FW_EQ_OFLD_CMD_ALLOC_V(1U) 210062306a36Sopenharmony_ci 210162306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_FREE_S 30 210262306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_FREE_V(x) ((x) << FW_EQ_OFLD_CMD_FREE_S) 210362306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_FREE_F FW_EQ_OFLD_CMD_FREE_V(1U) 210462306a36Sopenharmony_ci 210562306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_MODIFY_S 29 210662306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_MODIFY_V(x) ((x) << FW_EQ_OFLD_CMD_MODIFY_S) 210762306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_MODIFY_F FW_EQ_OFLD_CMD_MODIFY_V(1U) 210862306a36Sopenharmony_ci 210962306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_EQSTART_S 28 211062306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_EQSTART_V(x) ((x) << FW_EQ_OFLD_CMD_EQSTART_S) 211162306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_EQSTART_F FW_EQ_OFLD_CMD_EQSTART_V(1U) 211262306a36Sopenharmony_ci 211362306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_EQSTOP_S 27 211462306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_EQSTOP_V(x) ((x) << FW_EQ_OFLD_CMD_EQSTOP_S) 211562306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_EQSTOP_F FW_EQ_OFLD_CMD_EQSTOP_V(1U) 211662306a36Sopenharmony_ci 211762306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_EQID_S 0 211862306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_EQID_M 0xfffff 211962306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_EQID_V(x) ((x) << FW_EQ_OFLD_CMD_EQID_S) 212062306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_EQID_G(x) \ 212162306a36Sopenharmony_ci (((x) >> FW_EQ_OFLD_CMD_EQID_S) & FW_EQ_OFLD_CMD_EQID_M) 212262306a36Sopenharmony_ci 212362306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_PHYSEQID_S 0 212462306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_PHYSEQID_M 0xfffff 212562306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_PHYSEQID_G(x) \ 212662306a36Sopenharmony_ci (((x) >> FW_EQ_OFLD_CMD_PHYSEQID_S) & FW_EQ_OFLD_CMD_PHYSEQID_M) 212762306a36Sopenharmony_ci 212862306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_FETCHSZM_S 26 212962306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_FETCHSZM_V(x) ((x) << FW_EQ_OFLD_CMD_FETCHSZM_S) 213062306a36Sopenharmony_ci 213162306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_STATUSPGNS_S 25 213262306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_STATUSPGNS_V(x) ((x) << FW_EQ_OFLD_CMD_STATUSPGNS_S) 213362306a36Sopenharmony_ci 213462306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_STATUSPGRO_S 24 213562306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_STATUSPGRO_V(x) ((x) << FW_EQ_OFLD_CMD_STATUSPGRO_S) 213662306a36Sopenharmony_ci 213762306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_FETCHNS_S 23 213862306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_FETCHNS_V(x) ((x) << FW_EQ_OFLD_CMD_FETCHNS_S) 213962306a36Sopenharmony_ci 214062306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_FETCHRO_S 22 214162306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_FETCHRO_V(x) ((x) << FW_EQ_OFLD_CMD_FETCHRO_S) 214262306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_FETCHRO_F FW_EQ_OFLD_CMD_FETCHRO_V(1U) 214362306a36Sopenharmony_ci 214462306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_HOSTFCMODE_S 20 214562306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_HOSTFCMODE_V(x) ((x) << FW_EQ_OFLD_CMD_HOSTFCMODE_S) 214662306a36Sopenharmony_ci 214762306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_CPRIO_S 19 214862306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_CPRIO_V(x) ((x) << FW_EQ_OFLD_CMD_CPRIO_S) 214962306a36Sopenharmony_ci 215062306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_ONCHIP_S 18 215162306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_ONCHIP_V(x) ((x) << FW_EQ_OFLD_CMD_ONCHIP_S) 215262306a36Sopenharmony_ci 215362306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_PCIECHN_S 16 215462306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_PCIECHN_V(x) ((x) << FW_EQ_OFLD_CMD_PCIECHN_S) 215562306a36Sopenharmony_ci 215662306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_IQID_S 0 215762306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_IQID_V(x) ((x) << FW_EQ_OFLD_CMD_IQID_S) 215862306a36Sopenharmony_ci 215962306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_DCAEN_S 31 216062306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_DCAEN_V(x) ((x) << FW_EQ_OFLD_CMD_DCAEN_S) 216162306a36Sopenharmony_ci 216262306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_DCACPU_S 26 216362306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_DCACPU_V(x) ((x) << FW_EQ_OFLD_CMD_DCACPU_S) 216462306a36Sopenharmony_ci 216562306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_FBMIN_S 23 216662306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_FBMIN_V(x) ((x) << FW_EQ_OFLD_CMD_FBMIN_S) 216762306a36Sopenharmony_ci 216862306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_FBMAX_S 20 216962306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_FBMAX_V(x) ((x) << FW_EQ_OFLD_CMD_FBMAX_S) 217062306a36Sopenharmony_ci 217162306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_CIDXFTHRESHO_S 19 217262306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_CIDXFTHRESHO_V(x) \ 217362306a36Sopenharmony_ci ((x) << FW_EQ_OFLD_CMD_CIDXFTHRESHO_S) 217462306a36Sopenharmony_ci 217562306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_CIDXFTHRESH_S 16 217662306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_CIDXFTHRESH_V(x) ((x) << FW_EQ_OFLD_CMD_CIDXFTHRESH_S) 217762306a36Sopenharmony_ci 217862306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_EQSIZE_S 0 217962306a36Sopenharmony_ci#define FW_EQ_OFLD_CMD_EQSIZE_V(x) ((x) << FW_EQ_OFLD_CMD_EQSIZE_S) 218062306a36Sopenharmony_ci 218162306a36Sopenharmony_ci/* 218262306a36Sopenharmony_ci * Macros for VIID parsing: 218362306a36Sopenharmony_ci * VIID - [10:8] PFN, [7] VI Valid, [6:0] VI number 218462306a36Sopenharmony_ci */ 218562306a36Sopenharmony_ci 218662306a36Sopenharmony_ci#define FW_VIID_PFN_S 8 218762306a36Sopenharmony_ci#define FW_VIID_PFN_M 0x7 218862306a36Sopenharmony_ci#define FW_VIID_PFN_G(x) (((x) >> FW_VIID_PFN_S) & FW_VIID_PFN_M) 218962306a36Sopenharmony_ci 219062306a36Sopenharmony_ci#define FW_VIID_VIVLD_S 7 219162306a36Sopenharmony_ci#define FW_VIID_VIVLD_M 0x1 219262306a36Sopenharmony_ci#define FW_VIID_VIVLD_G(x) (((x) >> FW_VIID_VIVLD_S) & FW_VIID_VIVLD_M) 219362306a36Sopenharmony_ci 219462306a36Sopenharmony_ci#define FW_VIID_VIN_S 0 219562306a36Sopenharmony_ci#define FW_VIID_VIN_M 0x7F 219662306a36Sopenharmony_ci#define FW_VIID_VIN_G(x) (((x) >> FW_VIID_VIN_S) & FW_VIID_VIN_M) 219762306a36Sopenharmony_ci 219862306a36Sopenharmony_cistruct fw_vi_cmd { 219962306a36Sopenharmony_ci __be32 op_to_vfn; 220062306a36Sopenharmony_ci __be32 alloc_to_len16; 220162306a36Sopenharmony_ci __be16 type_viid; 220262306a36Sopenharmony_ci u8 mac[6]; 220362306a36Sopenharmony_ci u8 portid_pkd; 220462306a36Sopenharmony_ci u8 nmac; 220562306a36Sopenharmony_ci u8 nmac0[6]; 220662306a36Sopenharmony_ci __be16 rsssize_pkd; 220762306a36Sopenharmony_ci u8 nmac1[6]; 220862306a36Sopenharmony_ci __be16 idsiiq_pkd; 220962306a36Sopenharmony_ci u8 nmac2[6]; 221062306a36Sopenharmony_ci __be16 idseiq_pkd; 221162306a36Sopenharmony_ci u8 nmac3[6]; 221262306a36Sopenharmony_ci __be64 r9; 221362306a36Sopenharmony_ci __be64 r10; 221462306a36Sopenharmony_ci}; 221562306a36Sopenharmony_ci 221662306a36Sopenharmony_ci#define FW_VI_CMD_PFN_S 8 221762306a36Sopenharmony_ci#define FW_VI_CMD_PFN_V(x) ((x) << FW_VI_CMD_PFN_S) 221862306a36Sopenharmony_ci 221962306a36Sopenharmony_ci#define FW_VI_CMD_VFN_S 0 222062306a36Sopenharmony_ci#define FW_VI_CMD_VFN_V(x) ((x) << FW_VI_CMD_VFN_S) 222162306a36Sopenharmony_ci 222262306a36Sopenharmony_ci#define FW_VI_CMD_ALLOC_S 31 222362306a36Sopenharmony_ci#define FW_VI_CMD_ALLOC_V(x) ((x) << FW_VI_CMD_ALLOC_S) 222462306a36Sopenharmony_ci#define FW_VI_CMD_ALLOC_F FW_VI_CMD_ALLOC_V(1U) 222562306a36Sopenharmony_ci 222662306a36Sopenharmony_ci#define FW_VI_CMD_FREE_S 30 222762306a36Sopenharmony_ci#define FW_VI_CMD_FREE_V(x) ((x) << FW_VI_CMD_FREE_S) 222862306a36Sopenharmony_ci#define FW_VI_CMD_FREE_F FW_VI_CMD_FREE_V(1U) 222962306a36Sopenharmony_ci 223062306a36Sopenharmony_ci#define FW_VI_CMD_VFVLD_S 24 223162306a36Sopenharmony_ci#define FW_VI_CMD_VFVLD_M 0x1 223262306a36Sopenharmony_ci#define FW_VI_CMD_VFVLD_V(x) ((x) << FW_VI_CMD_VFVLD_S) 223362306a36Sopenharmony_ci#define FW_VI_CMD_VFVLD_G(x) \ 223462306a36Sopenharmony_ci (((x) >> FW_VI_CMD_VFVLD_S) & FW_VI_CMD_VFVLD_M) 223562306a36Sopenharmony_ci#define FW_VI_CMD_VFVLD_F FW_VI_CMD_VFVLD_V(1U) 223662306a36Sopenharmony_ci 223762306a36Sopenharmony_ci#define FW_VI_CMD_VIN_S 16 223862306a36Sopenharmony_ci#define FW_VI_CMD_VIN_M 0xff 223962306a36Sopenharmony_ci#define FW_VI_CMD_VIN_V(x) ((x) << FW_VI_CMD_VIN_S) 224062306a36Sopenharmony_ci#define FW_VI_CMD_VIN_G(x) \ 224162306a36Sopenharmony_ci (((x) >> FW_VI_CMD_VIN_S) & FW_VI_CMD_VIN_M) 224262306a36Sopenharmony_ci 224362306a36Sopenharmony_ci#define FW_VI_CMD_VIID_S 0 224462306a36Sopenharmony_ci#define FW_VI_CMD_VIID_M 0xfff 224562306a36Sopenharmony_ci#define FW_VI_CMD_VIID_V(x) ((x) << FW_VI_CMD_VIID_S) 224662306a36Sopenharmony_ci#define FW_VI_CMD_VIID_G(x) (((x) >> FW_VI_CMD_VIID_S) & FW_VI_CMD_VIID_M) 224762306a36Sopenharmony_ci 224862306a36Sopenharmony_ci#define FW_VI_CMD_PORTID_S 4 224962306a36Sopenharmony_ci#define FW_VI_CMD_PORTID_M 0xf 225062306a36Sopenharmony_ci#define FW_VI_CMD_PORTID_V(x) ((x) << FW_VI_CMD_PORTID_S) 225162306a36Sopenharmony_ci#define FW_VI_CMD_PORTID_G(x) \ 225262306a36Sopenharmony_ci (((x) >> FW_VI_CMD_PORTID_S) & FW_VI_CMD_PORTID_M) 225362306a36Sopenharmony_ci 225462306a36Sopenharmony_ci#define FW_VI_CMD_RSSSIZE_S 0 225562306a36Sopenharmony_ci#define FW_VI_CMD_RSSSIZE_M 0x7ff 225662306a36Sopenharmony_ci#define FW_VI_CMD_RSSSIZE_G(x) \ 225762306a36Sopenharmony_ci (((x) >> FW_VI_CMD_RSSSIZE_S) & FW_VI_CMD_RSSSIZE_M) 225862306a36Sopenharmony_ci 225962306a36Sopenharmony_ci/* Special VI_MAC command index ids */ 226062306a36Sopenharmony_ci#define FW_VI_MAC_ADD_MAC 0x3FF 226162306a36Sopenharmony_ci#define FW_VI_MAC_ADD_PERSIST_MAC 0x3FE 226262306a36Sopenharmony_ci#define FW_VI_MAC_MAC_BASED_FREE 0x3FD 226362306a36Sopenharmony_ci#define FW_VI_MAC_ID_BASED_FREE 0x3FC 226462306a36Sopenharmony_ci#define FW_CLS_TCAM_NUM_ENTRIES 336 226562306a36Sopenharmony_ci 226662306a36Sopenharmony_cienum fw_vi_mac_smac { 226762306a36Sopenharmony_ci FW_VI_MAC_MPS_TCAM_ENTRY, 226862306a36Sopenharmony_ci FW_VI_MAC_MPS_TCAM_ONLY, 226962306a36Sopenharmony_ci FW_VI_MAC_SMT_ONLY, 227062306a36Sopenharmony_ci FW_VI_MAC_SMT_AND_MPSTCAM 227162306a36Sopenharmony_ci}; 227262306a36Sopenharmony_ci 227362306a36Sopenharmony_cienum fw_vi_mac_result { 227462306a36Sopenharmony_ci FW_VI_MAC_R_SUCCESS, 227562306a36Sopenharmony_ci FW_VI_MAC_R_F_NONEXISTENT_NOMEM, 227662306a36Sopenharmony_ci FW_VI_MAC_R_SMAC_FAIL, 227762306a36Sopenharmony_ci FW_VI_MAC_R_F_ACL_CHECK 227862306a36Sopenharmony_ci}; 227962306a36Sopenharmony_ci 228062306a36Sopenharmony_cienum fw_vi_mac_entry_types { 228162306a36Sopenharmony_ci FW_VI_MAC_TYPE_EXACTMAC, 228262306a36Sopenharmony_ci FW_VI_MAC_TYPE_HASHVEC, 228362306a36Sopenharmony_ci FW_VI_MAC_TYPE_RAW, 228462306a36Sopenharmony_ci FW_VI_MAC_TYPE_EXACTMAC_VNI, 228562306a36Sopenharmony_ci}; 228662306a36Sopenharmony_ci 228762306a36Sopenharmony_cistruct fw_vi_mac_cmd { 228862306a36Sopenharmony_ci __be32 op_to_viid; 228962306a36Sopenharmony_ci __be32 freemacs_to_len16; 229062306a36Sopenharmony_ci union fw_vi_mac { 229162306a36Sopenharmony_ci struct fw_vi_mac_exact { 229262306a36Sopenharmony_ci __be16 valid_to_idx; 229362306a36Sopenharmony_ci u8 macaddr[6]; 229462306a36Sopenharmony_ci } exact[7]; 229562306a36Sopenharmony_ci struct fw_vi_mac_hash { 229662306a36Sopenharmony_ci __be64 hashvec; 229762306a36Sopenharmony_ci } hash; 229862306a36Sopenharmony_ci struct fw_vi_mac_raw { 229962306a36Sopenharmony_ci __be32 raw_idx_pkd; 230062306a36Sopenharmony_ci __be32 data0_pkd; 230162306a36Sopenharmony_ci __be32 data1[2]; 230262306a36Sopenharmony_ci __be64 data0m_pkd; 230362306a36Sopenharmony_ci __be32 data1m[2]; 230462306a36Sopenharmony_ci } raw; 230562306a36Sopenharmony_ci struct fw_vi_mac_vni { 230662306a36Sopenharmony_ci __be16 valid_to_idx; 230762306a36Sopenharmony_ci __u8 macaddr[6]; 230862306a36Sopenharmony_ci __be16 r7; 230962306a36Sopenharmony_ci __u8 macaddr_mask[6]; 231062306a36Sopenharmony_ci __be32 lookup_type_to_vni; 231162306a36Sopenharmony_ci __be32 vni_mask_pkd; 231262306a36Sopenharmony_ci } exact_vni[2]; 231362306a36Sopenharmony_ci } u; 231462306a36Sopenharmony_ci}; 231562306a36Sopenharmony_ci 231662306a36Sopenharmony_ci#define FW_VI_MAC_CMD_SMTID_S 12 231762306a36Sopenharmony_ci#define FW_VI_MAC_CMD_SMTID_M 0xff 231862306a36Sopenharmony_ci#define FW_VI_MAC_CMD_SMTID_V(x) ((x) << FW_VI_MAC_CMD_SMTID_S) 231962306a36Sopenharmony_ci#define FW_VI_MAC_CMD_SMTID_G(x) \ 232062306a36Sopenharmony_ci (((x) >> FW_VI_MAC_CMD_SMTID_S) & FW_VI_MAC_CMD_SMTID_M) 232162306a36Sopenharmony_ci 232262306a36Sopenharmony_ci#define FW_VI_MAC_CMD_VIID_S 0 232362306a36Sopenharmony_ci#define FW_VI_MAC_CMD_VIID_V(x) ((x) << FW_VI_MAC_CMD_VIID_S) 232462306a36Sopenharmony_ci 232562306a36Sopenharmony_ci#define FW_VI_MAC_CMD_FREEMACS_S 31 232662306a36Sopenharmony_ci#define FW_VI_MAC_CMD_FREEMACS_V(x) ((x) << FW_VI_MAC_CMD_FREEMACS_S) 232762306a36Sopenharmony_ci 232862306a36Sopenharmony_ci#define FW_VI_MAC_CMD_ENTRY_TYPE_S 23 232962306a36Sopenharmony_ci#define FW_VI_MAC_CMD_ENTRY_TYPE_M 0x7 233062306a36Sopenharmony_ci#define FW_VI_MAC_CMD_ENTRY_TYPE_V(x) ((x) << FW_VI_MAC_CMD_ENTRY_TYPE_S) 233162306a36Sopenharmony_ci#define FW_VI_MAC_CMD_ENTRY_TYPE_G(x) \ 233262306a36Sopenharmony_ci (((x) >> FW_VI_MAC_CMD_ENTRY_TYPE_S) & FW_VI_MAC_CMD_ENTRY_TYPE_M) 233362306a36Sopenharmony_ci 233462306a36Sopenharmony_ci#define FW_VI_MAC_CMD_HASHVECEN_S 23 233562306a36Sopenharmony_ci#define FW_VI_MAC_CMD_HASHVECEN_V(x) ((x) << FW_VI_MAC_CMD_HASHVECEN_S) 233662306a36Sopenharmony_ci#define FW_VI_MAC_CMD_HASHVECEN_F FW_VI_MAC_CMD_HASHVECEN_V(1U) 233762306a36Sopenharmony_ci 233862306a36Sopenharmony_ci#define FW_VI_MAC_CMD_HASHUNIEN_S 22 233962306a36Sopenharmony_ci#define FW_VI_MAC_CMD_HASHUNIEN_V(x) ((x) << FW_VI_MAC_CMD_HASHUNIEN_S) 234062306a36Sopenharmony_ci 234162306a36Sopenharmony_ci#define FW_VI_MAC_CMD_VALID_S 15 234262306a36Sopenharmony_ci#define FW_VI_MAC_CMD_VALID_V(x) ((x) << FW_VI_MAC_CMD_VALID_S) 234362306a36Sopenharmony_ci#define FW_VI_MAC_CMD_VALID_F FW_VI_MAC_CMD_VALID_V(1U) 234462306a36Sopenharmony_ci 234562306a36Sopenharmony_ci#define FW_VI_MAC_CMD_PRIO_S 12 234662306a36Sopenharmony_ci#define FW_VI_MAC_CMD_PRIO_V(x) ((x) << FW_VI_MAC_CMD_PRIO_S) 234762306a36Sopenharmony_ci 234862306a36Sopenharmony_ci#define FW_VI_MAC_CMD_SMAC_RESULT_S 10 234962306a36Sopenharmony_ci#define FW_VI_MAC_CMD_SMAC_RESULT_M 0x3 235062306a36Sopenharmony_ci#define FW_VI_MAC_CMD_SMAC_RESULT_V(x) ((x) << FW_VI_MAC_CMD_SMAC_RESULT_S) 235162306a36Sopenharmony_ci#define FW_VI_MAC_CMD_SMAC_RESULT_G(x) \ 235262306a36Sopenharmony_ci (((x) >> FW_VI_MAC_CMD_SMAC_RESULT_S) & FW_VI_MAC_CMD_SMAC_RESULT_M) 235362306a36Sopenharmony_ci 235462306a36Sopenharmony_ci#define FW_VI_MAC_CMD_IDX_S 0 235562306a36Sopenharmony_ci#define FW_VI_MAC_CMD_IDX_M 0x3ff 235662306a36Sopenharmony_ci#define FW_VI_MAC_CMD_IDX_V(x) ((x) << FW_VI_MAC_CMD_IDX_S) 235762306a36Sopenharmony_ci#define FW_VI_MAC_CMD_IDX_G(x) \ 235862306a36Sopenharmony_ci (((x) >> FW_VI_MAC_CMD_IDX_S) & FW_VI_MAC_CMD_IDX_M) 235962306a36Sopenharmony_ci 236062306a36Sopenharmony_ci#define FW_VI_MAC_CMD_RAW_IDX_S 16 236162306a36Sopenharmony_ci#define FW_VI_MAC_CMD_RAW_IDX_M 0xffff 236262306a36Sopenharmony_ci#define FW_VI_MAC_CMD_RAW_IDX_V(x) ((x) << FW_VI_MAC_CMD_RAW_IDX_S) 236362306a36Sopenharmony_ci#define FW_VI_MAC_CMD_RAW_IDX_G(x) \ 236462306a36Sopenharmony_ci (((x) >> FW_VI_MAC_CMD_RAW_IDX_S) & FW_VI_MAC_CMD_RAW_IDX_M) 236562306a36Sopenharmony_ci 236662306a36Sopenharmony_ci#define FW_VI_MAC_CMD_LOOKUP_TYPE_S 31 236762306a36Sopenharmony_ci#define FW_VI_MAC_CMD_LOOKUP_TYPE_M 0x1 236862306a36Sopenharmony_ci#define FW_VI_MAC_CMD_LOOKUP_TYPE_V(x) ((x) << FW_VI_MAC_CMD_LOOKUP_TYPE_S) 236962306a36Sopenharmony_ci#define FW_VI_MAC_CMD_LOOKUP_TYPE_G(x) \ 237062306a36Sopenharmony_ci (((x) >> FW_VI_MAC_CMD_LOOKUP_TYPE_S) & FW_VI_MAC_CMD_LOOKUP_TYPE_M) 237162306a36Sopenharmony_ci#define FW_VI_MAC_CMD_LOOKUP_TYPE_F FW_VI_MAC_CMD_LOOKUP_TYPE_V(1U) 237262306a36Sopenharmony_ci 237362306a36Sopenharmony_ci#define FW_VI_MAC_CMD_DIP_HIT_S 30 237462306a36Sopenharmony_ci#define FW_VI_MAC_CMD_DIP_HIT_M 0x1 237562306a36Sopenharmony_ci#define FW_VI_MAC_CMD_DIP_HIT_V(x) ((x) << FW_VI_MAC_CMD_DIP_HIT_S) 237662306a36Sopenharmony_ci#define FW_VI_MAC_CMD_DIP_HIT_G(x) \ 237762306a36Sopenharmony_ci (((x) >> FW_VI_MAC_CMD_DIP_HIT_S) & FW_VI_MAC_CMD_DIP_HIT_M) 237862306a36Sopenharmony_ci#define FW_VI_MAC_CMD_DIP_HIT_F FW_VI_MAC_CMD_DIP_HIT_V(1U) 237962306a36Sopenharmony_ci 238062306a36Sopenharmony_ci#define FW_VI_MAC_CMD_VNI_S 0 238162306a36Sopenharmony_ci#define FW_VI_MAC_CMD_VNI_M 0xffffff 238262306a36Sopenharmony_ci#define FW_VI_MAC_CMD_VNI_V(x) ((x) << FW_VI_MAC_CMD_VNI_S) 238362306a36Sopenharmony_ci#define FW_VI_MAC_CMD_VNI_G(x) \ 238462306a36Sopenharmony_ci (((x) >> FW_VI_MAC_CMD_VNI_S) & FW_VI_MAC_CMD_VNI_M) 238562306a36Sopenharmony_ci 238662306a36Sopenharmony_ci#define FW_VI_MAC_CMD_VNI_MASK_S 0 238762306a36Sopenharmony_ci#define FW_VI_MAC_CMD_VNI_MASK_M 0xffffff 238862306a36Sopenharmony_ci#define FW_VI_MAC_CMD_VNI_MASK_V(x) ((x) << FW_VI_MAC_CMD_VNI_MASK_S) 238962306a36Sopenharmony_ci#define FW_VI_MAC_CMD_VNI_MASK_G(x) \ 239062306a36Sopenharmony_ci (((x) >> FW_VI_MAC_CMD_VNI_MASK_S) & FW_VI_MAC_CMD_VNI_MASK_M) 239162306a36Sopenharmony_ci 239262306a36Sopenharmony_ci#define FW_RXMODE_MTU_NO_CHG 65535 239362306a36Sopenharmony_ci 239462306a36Sopenharmony_cistruct fw_vi_rxmode_cmd { 239562306a36Sopenharmony_ci __be32 op_to_viid; 239662306a36Sopenharmony_ci __be32 retval_len16; 239762306a36Sopenharmony_ci __be32 mtu_to_vlanexen; 239862306a36Sopenharmony_ci __be32 r4_lo; 239962306a36Sopenharmony_ci}; 240062306a36Sopenharmony_ci 240162306a36Sopenharmony_ci#define FW_VI_RXMODE_CMD_VIID_S 0 240262306a36Sopenharmony_ci#define FW_VI_RXMODE_CMD_VIID_V(x) ((x) << FW_VI_RXMODE_CMD_VIID_S) 240362306a36Sopenharmony_ci 240462306a36Sopenharmony_ci#define FW_VI_RXMODE_CMD_MTU_S 16 240562306a36Sopenharmony_ci#define FW_VI_RXMODE_CMD_MTU_M 0xffff 240662306a36Sopenharmony_ci#define FW_VI_RXMODE_CMD_MTU_V(x) ((x) << FW_VI_RXMODE_CMD_MTU_S) 240762306a36Sopenharmony_ci 240862306a36Sopenharmony_ci#define FW_VI_RXMODE_CMD_PROMISCEN_S 14 240962306a36Sopenharmony_ci#define FW_VI_RXMODE_CMD_PROMISCEN_M 0x3 241062306a36Sopenharmony_ci#define FW_VI_RXMODE_CMD_PROMISCEN_V(x) ((x) << FW_VI_RXMODE_CMD_PROMISCEN_S) 241162306a36Sopenharmony_ci 241262306a36Sopenharmony_ci#define FW_VI_RXMODE_CMD_ALLMULTIEN_S 12 241362306a36Sopenharmony_ci#define FW_VI_RXMODE_CMD_ALLMULTIEN_M 0x3 241462306a36Sopenharmony_ci#define FW_VI_RXMODE_CMD_ALLMULTIEN_V(x) \ 241562306a36Sopenharmony_ci ((x) << FW_VI_RXMODE_CMD_ALLMULTIEN_S) 241662306a36Sopenharmony_ci 241762306a36Sopenharmony_ci#define FW_VI_RXMODE_CMD_BROADCASTEN_S 10 241862306a36Sopenharmony_ci#define FW_VI_RXMODE_CMD_BROADCASTEN_M 0x3 241962306a36Sopenharmony_ci#define FW_VI_RXMODE_CMD_BROADCASTEN_V(x) \ 242062306a36Sopenharmony_ci ((x) << FW_VI_RXMODE_CMD_BROADCASTEN_S) 242162306a36Sopenharmony_ci 242262306a36Sopenharmony_ci#define FW_VI_RXMODE_CMD_VLANEXEN_S 8 242362306a36Sopenharmony_ci#define FW_VI_RXMODE_CMD_VLANEXEN_M 0x3 242462306a36Sopenharmony_ci#define FW_VI_RXMODE_CMD_VLANEXEN_V(x) ((x) << FW_VI_RXMODE_CMD_VLANEXEN_S) 242562306a36Sopenharmony_ci 242662306a36Sopenharmony_cistruct fw_vi_enable_cmd { 242762306a36Sopenharmony_ci __be32 op_to_viid; 242862306a36Sopenharmony_ci __be32 ien_to_len16; 242962306a36Sopenharmony_ci __be16 blinkdur; 243062306a36Sopenharmony_ci __be16 r3; 243162306a36Sopenharmony_ci __be32 r4; 243262306a36Sopenharmony_ci}; 243362306a36Sopenharmony_ci 243462306a36Sopenharmony_ci#define FW_VI_ENABLE_CMD_VIID_S 0 243562306a36Sopenharmony_ci#define FW_VI_ENABLE_CMD_VIID_V(x) ((x) << FW_VI_ENABLE_CMD_VIID_S) 243662306a36Sopenharmony_ci 243762306a36Sopenharmony_ci#define FW_VI_ENABLE_CMD_IEN_S 31 243862306a36Sopenharmony_ci#define FW_VI_ENABLE_CMD_IEN_V(x) ((x) << FW_VI_ENABLE_CMD_IEN_S) 243962306a36Sopenharmony_ci 244062306a36Sopenharmony_ci#define FW_VI_ENABLE_CMD_EEN_S 30 244162306a36Sopenharmony_ci#define FW_VI_ENABLE_CMD_EEN_V(x) ((x) << FW_VI_ENABLE_CMD_EEN_S) 244262306a36Sopenharmony_ci 244362306a36Sopenharmony_ci#define FW_VI_ENABLE_CMD_LED_S 29 244462306a36Sopenharmony_ci#define FW_VI_ENABLE_CMD_LED_V(x) ((x) << FW_VI_ENABLE_CMD_LED_S) 244562306a36Sopenharmony_ci#define FW_VI_ENABLE_CMD_LED_F FW_VI_ENABLE_CMD_LED_V(1U) 244662306a36Sopenharmony_ci 244762306a36Sopenharmony_ci#define FW_VI_ENABLE_CMD_DCB_INFO_S 28 244862306a36Sopenharmony_ci#define FW_VI_ENABLE_CMD_DCB_INFO_V(x) ((x) << FW_VI_ENABLE_CMD_DCB_INFO_S) 244962306a36Sopenharmony_ci 245062306a36Sopenharmony_ci/* VI VF stats offset definitions */ 245162306a36Sopenharmony_ci#define VI_VF_NUM_STATS 16 245262306a36Sopenharmony_cienum fw_vi_stats_vf_index { 245362306a36Sopenharmony_ci FW_VI_VF_STAT_TX_BCAST_BYTES_IX, 245462306a36Sopenharmony_ci FW_VI_VF_STAT_TX_BCAST_FRAMES_IX, 245562306a36Sopenharmony_ci FW_VI_VF_STAT_TX_MCAST_BYTES_IX, 245662306a36Sopenharmony_ci FW_VI_VF_STAT_TX_MCAST_FRAMES_IX, 245762306a36Sopenharmony_ci FW_VI_VF_STAT_TX_UCAST_BYTES_IX, 245862306a36Sopenharmony_ci FW_VI_VF_STAT_TX_UCAST_FRAMES_IX, 245962306a36Sopenharmony_ci FW_VI_VF_STAT_TX_DROP_FRAMES_IX, 246062306a36Sopenharmony_ci FW_VI_VF_STAT_TX_OFLD_BYTES_IX, 246162306a36Sopenharmony_ci FW_VI_VF_STAT_TX_OFLD_FRAMES_IX, 246262306a36Sopenharmony_ci FW_VI_VF_STAT_RX_BCAST_BYTES_IX, 246362306a36Sopenharmony_ci FW_VI_VF_STAT_RX_BCAST_FRAMES_IX, 246462306a36Sopenharmony_ci FW_VI_VF_STAT_RX_MCAST_BYTES_IX, 246562306a36Sopenharmony_ci FW_VI_VF_STAT_RX_MCAST_FRAMES_IX, 246662306a36Sopenharmony_ci FW_VI_VF_STAT_RX_UCAST_BYTES_IX, 246762306a36Sopenharmony_ci FW_VI_VF_STAT_RX_UCAST_FRAMES_IX, 246862306a36Sopenharmony_ci FW_VI_VF_STAT_RX_ERR_FRAMES_IX 246962306a36Sopenharmony_ci}; 247062306a36Sopenharmony_ci 247162306a36Sopenharmony_ci/* VI PF stats offset definitions */ 247262306a36Sopenharmony_ci#define VI_PF_NUM_STATS 17 247362306a36Sopenharmony_cienum fw_vi_stats_pf_index { 247462306a36Sopenharmony_ci FW_VI_PF_STAT_TX_BCAST_BYTES_IX, 247562306a36Sopenharmony_ci FW_VI_PF_STAT_TX_BCAST_FRAMES_IX, 247662306a36Sopenharmony_ci FW_VI_PF_STAT_TX_MCAST_BYTES_IX, 247762306a36Sopenharmony_ci FW_VI_PF_STAT_TX_MCAST_FRAMES_IX, 247862306a36Sopenharmony_ci FW_VI_PF_STAT_TX_UCAST_BYTES_IX, 247962306a36Sopenharmony_ci FW_VI_PF_STAT_TX_UCAST_FRAMES_IX, 248062306a36Sopenharmony_ci FW_VI_PF_STAT_TX_OFLD_BYTES_IX, 248162306a36Sopenharmony_ci FW_VI_PF_STAT_TX_OFLD_FRAMES_IX, 248262306a36Sopenharmony_ci FW_VI_PF_STAT_RX_BYTES_IX, 248362306a36Sopenharmony_ci FW_VI_PF_STAT_RX_FRAMES_IX, 248462306a36Sopenharmony_ci FW_VI_PF_STAT_RX_BCAST_BYTES_IX, 248562306a36Sopenharmony_ci FW_VI_PF_STAT_RX_BCAST_FRAMES_IX, 248662306a36Sopenharmony_ci FW_VI_PF_STAT_RX_MCAST_BYTES_IX, 248762306a36Sopenharmony_ci FW_VI_PF_STAT_RX_MCAST_FRAMES_IX, 248862306a36Sopenharmony_ci FW_VI_PF_STAT_RX_UCAST_BYTES_IX, 248962306a36Sopenharmony_ci FW_VI_PF_STAT_RX_UCAST_FRAMES_IX, 249062306a36Sopenharmony_ci FW_VI_PF_STAT_RX_ERR_FRAMES_IX 249162306a36Sopenharmony_ci}; 249262306a36Sopenharmony_ci 249362306a36Sopenharmony_cistruct fw_vi_stats_cmd { 249462306a36Sopenharmony_ci __be32 op_to_viid; 249562306a36Sopenharmony_ci __be32 retval_len16; 249662306a36Sopenharmony_ci union fw_vi_stats { 249762306a36Sopenharmony_ci struct fw_vi_stats_ctl { 249862306a36Sopenharmony_ci __be16 nstats_ix; 249962306a36Sopenharmony_ci __be16 r6; 250062306a36Sopenharmony_ci __be32 r7; 250162306a36Sopenharmony_ci __be64 stat0; 250262306a36Sopenharmony_ci __be64 stat1; 250362306a36Sopenharmony_ci __be64 stat2; 250462306a36Sopenharmony_ci __be64 stat3; 250562306a36Sopenharmony_ci __be64 stat4; 250662306a36Sopenharmony_ci __be64 stat5; 250762306a36Sopenharmony_ci } ctl; 250862306a36Sopenharmony_ci struct fw_vi_stats_pf { 250962306a36Sopenharmony_ci __be64 tx_bcast_bytes; 251062306a36Sopenharmony_ci __be64 tx_bcast_frames; 251162306a36Sopenharmony_ci __be64 tx_mcast_bytes; 251262306a36Sopenharmony_ci __be64 tx_mcast_frames; 251362306a36Sopenharmony_ci __be64 tx_ucast_bytes; 251462306a36Sopenharmony_ci __be64 tx_ucast_frames; 251562306a36Sopenharmony_ci __be64 tx_offload_bytes; 251662306a36Sopenharmony_ci __be64 tx_offload_frames; 251762306a36Sopenharmony_ci __be64 rx_pf_bytes; 251862306a36Sopenharmony_ci __be64 rx_pf_frames; 251962306a36Sopenharmony_ci __be64 rx_bcast_bytes; 252062306a36Sopenharmony_ci __be64 rx_bcast_frames; 252162306a36Sopenharmony_ci __be64 rx_mcast_bytes; 252262306a36Sopenharmony_ci __be64 rx_mcast_frames; 252362306a36Sopenharmony_ci __be64 rx_ucast_bytes; 252462306a36Sopenharmony_ci __be64 rx_ucast_frames; 252562306a36Sopenharmony_ci __be64 rx_err_frames; 252662306a36Sopenharmony_ci } pf; 252762306a36Sopenharmony_ci struct fw_vi_stats_vf { 252862306a36Sopenharmony_ci __be64 tx_bcast_bytes; 252962306a36Sopenharmony_ci __be64 tx_bcast_frames; 253062306a36Sopenharmony_ci __be64 tx_mcast_bytes; 253162306a36Sopenharmony_ci __be64 tx_mcast_frames; 253262306a36Sopenharmony_ci __be64 tx_ucast_bytes; 253362306a36Sopenharmony_ci __be64 tx_ucast_frames; 253462306a36Sopenharmony_ci __be64 tx_drop_frames; 253562306a36Sopenharmony_ci __be64 tx_offload_bytes; 253662306a36Sopenharmony_ci __be64 tx_offload_frames; 253762306a36Sopenharmony_ci __be64 rx_bcast_bytes; 253862306a36Sopenharmony_ci __be64 rx_bcast_frames; 253962306a36Sopenharmony_ci __be64 rx_mcast_bytes; 254062306a36Sopenharmony_ci __be64 rx_mcast_frames; 254162306a36Sopenharmony_ci __be64 rx_ucast_bytes; 254262306a36Sopenharmony_ci __be64 rx_ucast_frames; 254362306a36Sopenharmony_ci __be64 rx_err_frames; 254462306a36Sopenharmony_ci } vf; 254562306a36Sopenharmony_ci } u; 254662306a36Sopenharmony_ci}; 254762306a36Sopenharmony_ci 254862306a36Sopenharmony_ci#define FW_VI_STATS_CMD_VIID_S 0 254962306a36Sopenharmony_ci#define FW_VI_STATS_CMD_VIID_V(x) ((x) << FW_VI_STATS_CMD_VIID_S) 255062306a36Sopenharmony_ci 255162306a36Sopenharmony_ci#define FW_VI_STATS_CMD_NSTATS_S 12 255262306a36Sopenharmony_ci#define FW_VI_STATS_CMD_NSTATS_V(x) ((x) << FW_VI_STATS_CMD_NSTATS_S) 255362306a36Sopenharmony_ci 255462306a36Sopenharmony_ci#define FW_VI_STATS_CMD_IX_S 0 255562306a36Sopenharmony_ci#define FW_VI_STATS_CMD_IX_V(x) ((x) << FW_VI_STATS_CMD_IX_S) 255662306a36Sopenharmony_ci 255762306a36Sopenharmony_cistruct fw_acl_mac_cmd { 255862306a36Sopenharmony_ci __be32 op_to_vfn; 255962306a36Sopenharmony_ci __be32 en_to_len16; 256062306a36Sopenharmony_ci u8 nmac; 256162306a36Sopenharmony_ci u8 r3[7]; 256262306a36Sopenharmony_ci __be16 r4; 256362306a36Sopenharmony_ci u8 macaddr0[6]; 256462306a36Sopenharmony_ci __be16 r5; 256562306a36Sopenharmony_ci u8 macaddr1[6]; 256662306a36Sopenharmony_ci __be16 r6; 256762306a36Sopenharmony_ci u8 macaddr2[6]; 256862306a36Sopenharmony_ci __be16 r7; 256962306a36Sopenharmony_ci u8 macaddr3[6]; 257062306a36Sopenharmony_ci}; 257162306a36Sopenharmony_ci 257262306a36Sopenharmony_ci#define FW_ACL_MAC_CMD_PFN_S 8 257362306a36Sopenharmony_ci#define FW_ACL_MAC_CMD_PFN_V(x) ((x) << FW_ACL_MAC_CMD_PFN_S) 257462306a36Sopenharmony_ci 257562306a36Sopenharmony_ci#define FW_ACL_MAC_CMD_VFN_S 0 257662306a36Sopenharmony_ci#define FW_ACL_MAC_CMD_VFN_V(x) ((x) << FW_ACL_MAC_CMD_VFN_S) 257762306a36Sopenharmony_ci 257862306a36Sopenharmony_ci#define FW_ACL_MAC_CMD_EN_S 31 257962306a36Sopenharmony_ci#define FW_ACL_MAC_CMD_EN_V(x) ((x) << FW_ACL_MAC_CMD_EN_S) 258062306a36Sopenharmony_ci 258162306a36Sopenharmony_cistruct fw_acl_vlan_cmd { 258262306a36Sopenharmony_ci __be32 op_to_vfn; 258362306a36Sopenharmony_ci __be32 en_to_len16; 258462306a36Sopenharmony_ci u8 nvlan; 258562306a36Sopenharmony_ci u8 dropnovlan_fm; 258662306a36Sopenharmony_ci u8 r3_lo[6]; 258762306a36Sopenharmony_ci __be16 vlanid[16]; 258862306a36Sopenharmony_ci}; 258962306a36Sopenharmony_ci 259062306a36Sopenharmony_ci#define FW_ACL_VLAN_CMD_PFN_S 8 259162306a36Sopenharmony_ci#define FW_ACL_VLAN_CMD_PFN_V(x) ((x) << FW_ACL_VLAN_CMD_PFN_S) 259262306a36Sopenharmony_ci 259362306a36Sopenharmony_ci#define FW_ACL_VLAN_CMD_VFN_S 0 259462306a36Sopenharmony_ci#define FW_ACL_VLAN_CMD_VFN_V(x) ((x) << FW_ACL_VLAN_CMD_VFN_S) 259562306a36Sopenharmony_ci 259662306a36Sopenharmony_ci#define FW_ACL_VLAN_CMD_EN_S 31 259762306a36Sopenharmony_ci#define FW_ACL_VLAN_CMD_EN_M 0x1 259862306a36Sopenharmony_ci#define FW_ACL_VLAN_CMD_EN_V(x) ((x) << FW_ACL_VLAN_CMD_EN_S) 259962306a36Sopenharmony_ci#define FW_ACL_VLAN_CMD_EN_G(x) \ 260062306a36Sopenharmony_ci (((x) >> S_FW_ACL_VLAN_CMD_EN_S) & FW_ACL_VLAN_CMD_EN_M) 260162306a36Sopenharmony_ci#define FW_ACL_VLAN_CMD_EN_F FW_ACL_VLAN_CMD_EN_V(1U) 260262306a36Sopenharmony_ci 260362306a36Sopenharmony_ci#define FW_ACL_VLAN_CMD_DROPNOVLAN_S 7 260462306a36Sopenharmony_ci#define FW_ACL_VLAN_CMD_DROPNOVLAN_V(x) ((x) << FW_ACL_VLAN_CMD_DROPNOVLAN_S) 260562306a36Sopenharmony_ci#define FW_ACL_VLAN_CMD_DROPNOVLAN_F FW_ACL_VLAN_CMD_DROPNOVLAN_V(1U) 260662306a36Sopenharmony_ci 260762306a36Sopenharmony_ci#define FW_ACL_VLAN_CMD_FM_S 6 260862306a36Sopenharmony_ci#define FW_ACL_VLAN_CMD_FM_M 0x1 260962306a36Sopenharmony_ci#define FW_ACL_VLAN_CMD_FM_V(x) ((x) << FW_ACL_VLAN_CMD_FM_S) 261062306a36Sopenharmony_ci#define FW_ACL_VLAN_CMD_FM_G(x) \ 261162306a36Sopenharmony_ci (((x) >> FW_ACL_VLAN_CMD_FM_S) & FW_ACL_VLAN_CMD_FM_M) 261262306a36Sopenharmony_ci#define FW_ACL_VLAN_CMD_FM_F FW_ACL_VLAN_CMD_FM_V(1U) 261362306a36Sopenharmony_ci 261462306a36Sopenharmony_ci/* old 16-bit port capabilities bitmap (fw_port_cap16_t) */ 261562306a36Sopenharmony_cienum fw_port_cap { 261662306a36Sopenharmony_ci FW_PORT_CAP_SPEED_100M = 0x0001, 261762306a36Sopenharmony_ci FW_PORT_CAP_SPEED_1G = 0x0002, 261862306a36Sopenharmony_ci FW_PORT_CAP_SPEED_25G = 0x0004, 261962306a36Sopenharmony_ci FW_PORT_CAP_SPEED_10G = 0x0008, 262062306a36Sopenharmony_ci FW_PORT_CAP_SPEED_40G = 0x0010, 262162306a36Sopenharmony_ci FW_PORT_CAP_SPEED_100G = 0x0020, 262262306a36Sopenharmony_ci FW_PORT_CAP_FC_RX = 0x0040, 262362306a36Sopenharmony_ci FW_PORT_CAP_FC_TX = 0x0080, 262462306a36Sopenharmony_ci FW_PORT_CAP_ANEG = 0x0100, 262562306a36Sopenharmony_ci FW_PORT_CAP_MDIAUTO = 0x0200, 262662306a36Sopenharmony_ci FW_PORT_CAP_MDISTRAIGHT = 0x0400, 262762306a36Sopenharmony_ci FW_PORT_CAP_FEC_RS = 0x0800, 262862306a36Sopenharmony_ci FW_PORT_CAP_FEC_BASER_RS = 0x1000, 262962306a36Sopenharmony_ci FW_PORT_CAP_FORCE_PAUSE = 0x2000, 263062306a36Sopenharmony_ci FW_PORT_CAP_802_3_PAUSE = 0x4000, 263162306a36Sopenharmony_ci FW_PORT_CAP_802_3_ASM_DIR = 0x8000, 263262306a36Sopenharmony_ci}; 263362306a36Sopenharmony_ci 263462306a36Sopenharmony_ci#define FW_PORT_CAP_SPEED_S 0 263562306a36Sopenharmony_ci#define FW_PORT_CAP_SPEED_M 0x3f 263662306a36Sopenharmony_ci#define FW_PORT_CAP_SPEED_V(x) ((x) << FW_PORT_CAP_SPEED_S) 263762306a36Sopenharmony_ci#define FW_PORT_CAP_SPEED_G(x) \ 263862306a36Sopenharmony_ci (((x) >> FW_PORT_CAP_SPEED_S) & FW_PORT_CAP_SPEED_M) 263962306a36Sopenharmony_ci 264062306a36Sopenharmony_cienum fw_port_mdi { 264162306a36Sopenharmony_ci FW_PORT_CAP_MDI_UNCHANGED, 264262306a36Sopenharmony_ci FW_PORT_CAP_MDI_AUTO, 264362306a36Sopenharmony_ci FW_PORT_CAP_MDI_F_STRAIGHT, 264462306a36Sopenharmony_ci FW_PORT_CAP_MDI_F_CROSSOVER 264562306a36Sopenharmony_ci}; 264662306a36Sopenharmony_ci 264762306a36Sopenharmony_ci#define FW_PORT_CAP_MDI_S 9 264862306a36Sopenharmony_ci#define FW_PORT_CAP_MDI_V(x) ((x) << FW_PORT_CAP_MDI_S) 264962306a36Sopenharmony_ci 265062306a36Sopenharmony_ci/* new 32-bit port capabilities bitmap (fw_port_cap32_t) */ 265162306a36Sopenharmony_ci#define FW_PORT_CAP32_SPEED_100M 0x00000001UL 265262306a36Sopenharmony_ci#define FW_PORT_CAP32_SPEED_1G 0x00000002UL 265362306a36Sopenharmony_ci#define FW_PORT_CAP32_SPEED_10G 0x00000004UL 265462306a36Sopenharmony_ci#define FW_PORT_CAP32_SPEED_25G 0x00000008UL 265562306a36Sopenharmony_ci#define FW_PORT_CAP32_SPEED_40G 0x00000010UL 265662306a36Sopenharmony_ci#define FW_PORT_CAP32_SPEED_50G 0x00000020UL 265762306a36Sopenharmony_ci#define FW_PORT_CAP32_SPEED_100G 0x00000040UL 265862306a36Sopenharmony_ci#define FW_PORT_CAP32_SPEED_200G 0x00000080UL 265962306a36Sopenharmony_ci#define FW_PORT_CAP32_SPEED_400G 0x00000100UL 266062306a36Sopenharmony_ci#define FW_PORT_CAP32_SPEED_RESERVED1 0x00000200UL 266162306a36Sopenharmony_ci#define FW_PORT_CAP32_SPEED_RESERVED2 0x00000400UL 266262306a36Sopenharmony_ci#define FW_PORT_CAP32_SPEED_RESERVED3 0x00000800UL 266362306a36Sopenharmony_ci#define FW_PORT_CAP32_RESERVED1 0x0000f000UL 266462306a36Sopenharmony_ci#define FW_PORT_CAP32_FC_RX 0x00010000UL 266562306a36Sopenharmony_ci#define FW_PORT_CAP32_FC_TX 0x00020000UL 266662306a36Sopenharmony_ci#define FW_PORT_CAP32_802_3_PAUSE 0x00040000UL 266762306a36Sopenharmony_ci#define FW_PORT_CAP32_802_3_ASM_DIR 0x00080000UL 266862306a36Sopenharmony_ci#define FW_PORT_CAP32_ANEG 0x00100000UL 266962306a36Sopenharmony_ci#define FW_PORT_CAP32_MDIAUTO 0x00200000UL 267062306a36Sopenharmony_ci#define FW_PORT_CAP32_MDISTRAIGHT 0x00400000UL 267162306a36Sopenharmony_ci#define FW_PORT_CAP32_FEC_RS 0x00800000UL 267262306a36Sopenharmony_ci#define FW_PORT_CAP32_FEC_BASER_RS 0x01000000UL 267362306a36Sopenharmony_ci#define FW_PORT_CAP32_FEC_RESERVED1 0x02000000UL 267462306a36Sopenharmony_ci#define FW_PORT_CAP32_FEC_RESERVED2 0x04000000UL 267562306a36Sopenharmony_ci#define FW_PORT_CAP32_FEC_RESERVED3 0x08000000UL 267662306a36Sopenharmony_ci#define FW_PORT_CAP32_FORCE_PAUSE 0x10000000UL 267762306a36Sopenharmony_ci#define FW_PORT_CAP32_RESERVED2 0xe0000000UL 267862306a36Sopenharmony_ci 267962306a36Sopenharmony_ci#define FW_PORT_CAP32_SPEED_S 0 268062306a36Sopenharmony_ci#define FW_PORT_CAP32_SPEED_M 0xfff 268162306a36Sopenharmony_ci#define FW_PORT_CAP32_SPEED_V(x) ((x) << FW_PORT_CAP32_SPEED_S) 268262306a36Sopenharmony_ci#define FW_PORT_CAP32_SPEED_G(x) \ 268362306a36Sopenharmony_ci (((x) >> FW_PORT_CAP32_SPEED_S) & FW_PORT_CAP32_SPEED_M) 268462306a36Sopenharmony_ci 268562306a36Sopenharmony_ci#define FW_PORT_CAP32_FC_S 16 268662306a36Sopenharmony_ci#define FW_PORT_CAP32_FC_M 0x3 268762306a36Sopenharmony_ci#define FW_PORT_CAP32_FC_V(x) ((x) << FW_PORT_CAP32_FC_S) 268862306a36Sopenharmony_ci#define FW_PORT_CAP32_FC_G(x) \ 268962306a36Sopenharmony_ci (((x) >> FW_PORT_CAP32_FC_S) & FW_PORT_CAP32_FC_M) 269062306a36Sopenharmony_ci 269162306a36Sopenharmony_ci#define FW_PORT_CAP32_802_3_S 18 269262306a36Sopenharmony_ci#define FW_PORT_CAP32_802_3_M 0x3 269362306a36Sopenharmony_ci#define FW_PORT_CAP32_802_3_V(x) ((x) << FW_PORT_CAP32_802_3_S) 269462306a36Sopenharmony_ci#define FW_PORT_CAP32_802_3_G(x) \ 269562306a36Sopenharmony_ci (((x) >> FW_PORT_CAP32_802_3_S) & FW_PORT_CAP32_802_3_M) 269662306a36Sopenharmony_ci 269762306a36Sopenharmony_ci#define FW_PORT_CAP32_ANEG_S 20 269862306a36Sopenharmony_ci#define FW_PORT_CAP32_ANEG_M 0x1 269962306a36Sopenharmony_ci#define FW_PORT_CAP32_ANEG_V(x) ((x) << FW_PORT_CAP32_ANEG_S) 270062306a36Sopenharmony_ci#define FW_PORT_CAP32_ANEG_G(x) \ 270162306a36Sopenharmony_ci (((x) >> FW_PORT_CAP32_ANEG_S) & FW_PORT_CAP32_ANEG_M) 270262306a36Sopenharmony_ci 270362306a36Sopenharmony_cienum fw_port_mdi32 { 270462306a36Sopenharmony_ci FW_PORT_CAP32_MDI_UNCHANGED, 270562306a36Sopenharmony_ci FW_PORT_CAP32_MDI_AUTO, 270662306a36Sopenharmony_ci FW_PORT_CAP32_MDI_F_STRAIGHT, 270762306a36Sopenharmony_ci FW_PORT_CAP32_MDI_F_CROSSOVER 270862306a36Sopenharmony_ci}; 270962306a36Sopenharmony_ci 271062306a36Sopenharmony_ci#define FW_PORT_CAP32_MDI_S 21 271162306a36Sopenharmony_ci#define FW_PORT_CAP32_MDI_M 3 271262306a36Sopenharmony_ci#define FW_PORT_CAP32_MDI_V(x) ((x) << FW_PORT_CAP32_MDI_S) 271362306a36Sopenharmony_ci#define FW_PORT_CAP32_MDI_G(x) \ 271462306a36Sopenharmony_ci (((x) >> FW_PORT_CAP32_MDI_S) & FW_PORT_CAP32_MDI_M) 271562306a36Sopenharmony_ci 271662306a36Sopenharmony_ci#define FW_PORT_CAP32_FEC_S 23 271762306a36Sopenharmony_ci#define FW_PORT_CAP32_FEC_M 0x1f 271862306a36Sopenharmony_ci#define FW_PORT_CAP32_FEC_V(x) ((x) << FW_PORT_CAP32_FEC_S) 271962306a36Sopenharmony_ci#define FW_PORT_CAP32_FEC_G(x) \ 272062306a36Sopenharmony_ci (((x) >> FW_PORT_CAP32_FEC_S) & FW_PORT_CAP32_FEC_M) 272162306a36Sopenharmony_ci 272262306a36Sopenharmony_ci/* macros to isolate various 32-bit Port Capabilities sub-fields */ 272362306a36Sopenharmony_ci#define CAP32_SPEED(__cap32) \ 272462306a36Sopenharmony_ci (FW_PORT_CAP32_SPEED_V(FW_PORT_CAP32_SPEED_M) & __cap32) 272562306a36Sopenharmony_ci 272662306a36Sopenharmony_ci#define CAP32_FEC(__cap32) \ 272762306a36Sopenharmony_ci (FW_PORT_CAP32_FEC_V(FW_PORT_CAP32_FEC_M) & __cap32) 272862306a36Sopenharmony_ci 272962306a36Sopenharmony_cienum fw_port_action { 273062306a36Sopenharmony_ci FW_PORT_ACTION_L1_CFG = 0x0001, 273162306a36Sopenharmony_ci FW_PORT_ACTION_L2_CFG = 0x0002, 273262306a36Sopenharmony_ci FW_PORT_ACTION_GET_PORT_INFO = 0x0003, 273362306a36Sopenharmony_ci FW_PORT_ACTION_L2_PPP_CFG = 0x0004, 273462306a36Sopenharmony_ci FW_PORT_ACTION_L2_DCB_CFG = 0x0005, 273562306a36Sopenharmony_ci FW_PORT_ACTION_DCB_READ_TRANS = 0x0006, 273662306a36Sopenharmony_ci FW_PORT_ACTION_DCB_READ_RECV = 0x0007, 273762306a36Sopenharmony_ci FW_PORT_ACTION_DCB_READ_DET = 0x0008, 273862306a36Sopenharmony_ci FW_PORT_ACTION_L1_CFG32 = 0x0009, 273962306a36Sopenharmony_ci FW_PORT_ACTION_GET_PORT_INFO32 = 0x000a, 274062306a36Sopenharmony_ci FW_PORT_ACTION_LOW_PWR_TO_NORMAL = 0x0010, 274162306a36Sopenharmony_ci FW_PORT_ACTION_L1_LOW_PWR_EN = 0x0011, 274262306a36Sopenharmony_ci FW_PORT_ACTION_L2_WOL_MODE_EN = 0x0012, 274362306a36Sopenharmony_ci FW_PORT_ACTION_LPBK_TO_NORMAL = 0x0020, 274462306a36Sopenharmony_ci FW_PORT_ACTION_L1_LPBK = 0x0021, 274562306a36Sopenharmony_ci FW_PORT_ACTION_L1_PMA_LPBK = 0x0022, 274662306a36Sopenharmony_ci FW_PORT_ACTION_L1_PCS_LPBK = 0x0023, 274762306a36Sopenharmony_ci FW_PORT_ACTION_L1_PHYXS_CSIDE_LPBK = 0x0024, 274862306a36Sopenharmony_ci FW_PORT_ACTION_L1_PHYXS_ESIDE_LPBK = 0x0025, 274962306a36Sopenharmony_ci FW_PORT_ACTION_PHY_RESET = 0x0040, 275062306a36Sopenharmony_ci FW_PORT_ACTION_PMA_RESET = 0x0041, 275162306a36Sopenharmony_ci FW_PORT_ACTION_PCS_RESET = 0x0042, 275262306a36Sopenharmony_ci FW_PORT_ACTION_PHYXS_RESET = 0x0043, 275362306a36Sopenharmony_ci FW_PORT_ACTION_DTEXS_REEST = 0x0044, 275462306a36Sopenharmony_ci FW_PORT_ACTION_AN_RESET = 0x0045 275562306a36Sopenharmony_ci}; 275662306a36Sopenharmony_ci 275762306a36Sopenharmony_cienum fw_port_l2cfg_ctlbf { 275862306a36Sopenharmony_ci FW_PORT_L2_CTLBF_OVLAN0 = 0x01, 275962306a36Sopenharmony_ci FW_PORT_L2_CTLBF_OVLAN1 = 0x02, 276062306a36Sopenharmony_ci FW_PORT_L2_CTLBF_OVLAN2 = 0x04, 276162306a36Sopenharmony_ci FW_PORT_L2_CTLBF_OVLAN3 = 0x08, 276262306a36Sopenharmony_ci FW_PORT_L2_CTLBF_IVLAN = 0x10, 276362306a36Sopenharmony_ci FW_PORT_L2_CTLBF_TXIPG = 0x20 276462306a36Sopenharmony_ci}; 276562306a36Sopenharmony_ci 276662306a36Sopenharmony_cienum fw_port_dcb_versions { 276762306a36Sopenharmony_ci FW_PORT_DCB_VER_UNKNOWN, 276862306a36Sopenharmony_ci FW_PORT_DCB_VER_CEE1D0, 276962306a36Sopenharmony_ci FW_PORT_DCB_VER_CEE1D01, 277062306a36Sopenharmony_ci FW_PORT_DCB_VER_IEEE, 277162306a36Sopenharmony_ci FW_PORT_DCB_VER_AUTO = 7 277262306a36Sopenharmony_ci}; 277362306a36Sopenharmony_ci 277462306a36Sopenharmony_cienum fw_port_dcb_cfg { 277562306a36Sopenharmony_ci FW_PORT_DCB_CFG_PG = 0x01, 277662306a36Sopenharmony_ci FW_PORT_DCB_CFG_PFC = 0x02, 277762306a36Sopenharmony_ci FW_PORT_DCB_CFG_APPL = 0x04 277862306a36Sopenharmony_ci}; 277962306a36Sopenharmony_ci 278062306a36Sopenharmony_cienum fw_port_dcb_cfg_rc { 278162306a36Sopenharmony_ci FW_PORT_DCB_CFG_SUCCESS = 0x0, 278262306a36Sopenharmony_ci FW_PORT_DCB_CFG_ERROR = 0x1 278362306a36Sopenharmony_ci}; 278462306a36Sopenharmony_ci 278562306a36Sopenharmony_cienum fw_port_dcb_type { 278662306a36Sopenharmony_ci FW_PORT_DCB_TYPE_PGID = 0x00, 278762306a36Sopenharmony_ci FW_PORT_DCB_TYPE_PGRATE = 0x01, 278862306a36Sopenharmony_ci FW_PORT_DCB_TYPE_PRIORATE = 0x02, 278962306a36Sopenharmony_ci FW_PORT_DCB_TYPE_PFC = 0x03, 279062306a36Sopenharmony_ci FW_PORT_DCB_TYPE_APP_ID = 0x04, 279162306a36Sopenharmony_ci FW_PORT_DCB_TYPE_CONTROL = 0x05, 279262306a36Sopenharmony_ci}; 279362306a36Sopenharmony_ci 279462306a36Sopenharmony_cienum fw_port_dcb_feature_state { 279562306a36Sopenharmony_ci FW_PORT_DCB_FEATURE_STATE_PENDING = 0x0, 279662306a36Sopenharmony_ci FW_PORT_DCB_FEATURE_STATE_SUCCESS = 0x1, 279762306a36Sopenharmony_ci FW_PORT_DCB_FEATURE_STATE_ERROR = 0x2, 279862306a36Sopenharmony_ci FW_PORT_DCB_FEATURE_STATE_TIMEOUT = 0x3, 279962306a36Sopenharmony_ci}; 280062306a36Sopenharmony_ci 280162306a36Sopenharmony_cistruct fw_port_cmd { 280262306a36Sopenharmony_ci __be32 op_to_portid; 280362306a36Sopenharmony_ci __be32 action_to_len16; 280462306a36Sopenharmony_ci union fw_port { 280562306a36Sopenharmony_ci struct fw_port_l1cfg { 280662306a36Sopenharmony_ci __be32 rcap; 280762306a36Sopenharmony_ci __be32 r; 280862306a36Sopenharmony_ci } l1cfg; 280962306a36Sopenharmony_ci struct fw_port_l2cfg { 281062306a36Sopenharmony_ci __u8 ctlbf; 281162306a36Sopenharmony_ci __u8 ovlan3_to_ivlan0; 281262306a36Sopenharmony_ci __be16 ivlantype; 281362306a36Sopenharmony_ci __be16 txipg_force_pinfo; 281462306a36Sopenharmony_ci __be16 mtu; 281562306a36Sopenharmony_ci __be16 ovlan0mask; 281662306a36Sopenharmony_ci __be16 ovlan0type; 281762306a36Sopenharmony_ci __be16 ovlan1mask; 281862306a36Sopenharmony_ci __be16 ovlan1type; 281962306a36Sopenharmony_ci __be16 ovlan2mask; 282062306a36Sopenharmony_ci __be16 ovlan2type; 282162306a36Sopenharmony_ci __be16 ovlan3mask; 282262306a36Sopenharmony_ci __be16 ovlan3type; 282362306a36Sopenharmony_ci } l2cfg; 282462306a36Sopenharmony_ci struct fw_port_info { 282562306a36Sopenharmony_ci __be32 lstatus_to_modtype; 282662306a36Sopenharmony_ci __be16 pcap; 282762306a36Sopenharmony_ci __be16 acap; 282862306a36Sopenharmony_ci __be16 mtu; 282962306a36Sopenharmony_ci __u8 cbllen; 283062306a36Sopenharmony_ci __u8 auxlinfo; 283162306a36Sopenharmony_ci __u8 dcbxdis_pkd; 283262306a36Sopenharmony_ci __u8 r8_lo; 283362306a36Sopenharmony_ci __be16 lpacap; 283462306a36Sopenharmony_ci __be64 r9; 283562306a36Sopenharmony_ci } info; 283662306a36Sopenharmony_ci struct fw_port_diags { 283762306a36Sopenharmony_ci __u8 diagop; 283862306a36Sopenharmony_ci __u8 r[3]; 283962306a36Sopenharmony_ci __be32 diagval; 284062306a36Sopenharmony_ci } diags; 284162306a36Sopenharmony_ci union fw_port_dcb { 284262306a36Sopenharmony_ci struct fw_port_dcb_pgid { 284362306a36Sopenharmony_ci __u8 type; 284462306a36Sopenharmony_ci __u8 apply_pkd; 284562306a36Sopenharmony_ci __u8 r10_lo[2]; 284662306a36Sopenharmony_ci __be32 pgid; 284762306a36Sopenharmony_ci __be64 r11; 284862306a36Sopenharmony_ci } pgid; 284962306a36Sopenharmony_ci struct fw_port_dcb_pgrate { 285062306a36Sopenharmony_ci __u8 type; 285162306a36Sopenharmony_ci __u8 apply_pkd; 285262306a36Sopenharmony_ci __u8 r10_lo[5]; 285362306a36Sopenharmony_ci __u8 num_tcs_supported; 285462306a36Sopenharmony_ci __u8 pgrate[8]; 285562306a36Sopenharmony_ci __u8 tsa[8]; 285662306a36Sopenharmony_ci } pgrate; 285762306a36Sopenharmony_ci struct fw_port_dcb_priorate { 285862306a36Sopenharmony_ci __u8 type; 285962306a36Sopenharmony_ci __u8 apply_pkd; 286062306a36Sopenharmony_ci __u8 r10_lo[6]; 286162306a36Sopenharmony_ci __u8 strict_priorate[8]; 286262306a36Sopenharmony_ci } priorate; 286362306a36Sopenharmony_ci struct fw_port_dcb_pfc { 286462306a36Sopenharmony_ci __u8 type; 286562306a36Sopenharmony_ci __u8 pfcen; 286662306a36Sopenharmony_ci __u8 r10[5]; 286762306a36Sopenharmony_ci __u8 max_pfc_tcs; 286862306a36Sopenharmony_ci __be64 r11; 286962306a36Sopenharmony_ci } pfc; 287062306a36Sopenharmony_ci struct fw_port_app_priority { 287162306a36Sopenharmony_ci __u8 type; 287262306a36Sopenharmony_ci __u8 r10[2]; 287362306a36Sopenharmony_ci __u8 idx; 287462306a36Sopenharmony_ci __u8 user_prio_map; 287562306a36Sopenharmony_ci __u8 sel_field; 287662306a36Sopenharmony_ci __be16 protocolid; 287762306a36Sopenharmony_ci __be64 r12; 287862306a36Sopenharmony_ci } app_priority; 287962306a36Sopenharmony_ci struct fw_port_dcb_control { 288062306a36Sopenharmony_ci __u8 type; 288162306a36Sopenharmony_ci __u8 all_syncd_pkd; 288262306a36Sopenharmony_ci __be16 dcb_version_to_app_state; 288362306a36Sopenharmony_ci __be32 r11; 288462306a36Sopenharmony_ci __be64 r12; 288562306a36Sopenharmony_ci } control; 288662306a36Sopenharmony_ci } dcb; 288762306a36Sopenharmony_ci struct fw_port_l1cfg32 { 288862306a36Sopenharmony_ci __be32 rcap32; 288962306a36Sopenharmony_ci __be32 r; 289062306a36Sopenharmony_ci } l1cfg32; 289162306a36Sopenharmony_ci struct fw_port_info32 { 289262306a36Sopenharmony_ci __be32 lstatus32_to_cbllen32; 289362306a36Sopenharmony_ci __be32 auxlinfo32_mtu32; 289462306a36Sopenharmony_ci __be32 linkattr32; 289562306a36Sopenharmony_ci __be32 pcaps32; 289662306a36Sopenharmony_ci __be32 acaps32; 289762306a36Sopenharmony_ci __be32 lpacaps32; 289862306a36Sopenharmony_ci } info32; 289962306a36Sopenharmony_ci } u; 290062306a36Sopenharmony_ci}; 290162306a36Sopenharmony_ci 290262306a36Sopenharmony_ci#define FW_PORT_CMD_READ_S 22 290362306a36Sopenharmony_ci#define FW_PORT_CMD_READ_V(x) ((x) << FW_PORT_CMD_READ_S) 290462306a36Sopenharmony_ci#define FW_PORT_CMD_READ_F FW_PORT_CMD_READ_V(1U) 290562306a36Sopenharmony_ci 290662306a36Sopenharmony_ci#define FW_PORT_CMD_PORTID_S 0 290762306a36Sopenharmony_ci#define FW_PORT_CMD_PORTID_M 0xf 290862306a36Sopenharmony_ci#define FW_PORT_CMD_PORTID_V(x) ((x) << FW_PORT_CMD_PORTID_S) 290962306a36Sopenharmony_ci#define FW_PORT_CMD_PORTID_G(x) \ 291062306a36Sopenharmony_ci (((x) >> FW_PORT_CMD_PORTID_S) & FW_PORT_CMD_PORTID_M) 291162306a36Sopenharmony_ci 291262306a36Sopenharmony_ci#define FW_PORT_CMD_ACTION_S 16 291362306a36Sopenharmony_ci#define FW_PORT_CMD_ACTION_M 0xffff 291462306a36Sopenharmony_ci#define FW_PORT_CMD_ACTION_V(x) ((x) << FW_PORT_CMD_ACTION_S) 291562306a36Sopenharmony_ci#define FW_PORT_CMD_ACTION_G(x) \ 291662306a36Sopenharmony_ci (((x) >> FW_PORT_CMD_ACTION_S) & FW_PORT_CMD_ACTION_M) 291762306a36Sopenharmony_ci 291862306a36Sopenharmony_ci#define FW_PORT_CMD_OVLAN3_S 7 291962306a36Sopenharmony_ci#define FW_PORT_CMD_OVLAN3_V(x) ((x) << FW_PORT_CMD_OVLAN3_S) 292062306a36Sopenharmony_ci 292162306a36Sopenharmony_ci#define FW_PORT_CMD_OVLAN2_S 6 292262306a36Sopenharmony_ci#define FW_PORT_CMD_OVLAN2_V(x) ((x) << FW_PORT_CMD_OVLAN2_S) 292362306a36Sopenharmony_ci 292462306a36Sopenharmony_ci#define FW_PORT_CMD_OVLAN1_S 5 292562306a36Sopenharmony_ci#define FW_PORT_CMD_OVLAN1_V(x) ((x) << FW_PORT_CMD_OVLAN1_S) 292662306a36Sopenharmony_ci 292762306a36Sopenharmony_ci#define FW_PORT_CMD_OVLAN0_S 4 292862306a36Sopenharmony_ci#define FW_PORT_CMD_OVLAN0_V(x) ((x) << FW_PORT_CMD_OVLAN0_S) 292962306a36Sopenharmony_ci 293062306a36Sopenharmony_ci#define FW_PORT_CMD_IVLAN0_S 3 293162306a36Sopenharmony_ci#define FW_PORT_CMD_IVLAN0_V(x) ((x) << FW_PORT_CMD_IVLAN0_S) 293262306a36Sopenharmony_ci 293362306a36Sopenharmony_ci#define FW_PORT_CMD_TXIPG_S 3 293462306a36Sopenharmony_ci#define FW_PORT_CMD_TXIPG_V(x) ((x) << FW_PORT_CMD_TXIPG_S) 293562306a36Sopenharmony_ci 293662306a36Sopenharmony_ci#define FW_PORT_CMD_LSTATUS_S 31 293762306a36Sopenharmony_ci#define FW_PORT_CMD_LSTATUS_M 0x1 293862306a36Sopenharmony_ci#define FW_PORT_CMD_LSTATUS_V(x) ((x) << FW_PORT_CMD_LSTATUS_S) 293962306a36Sopenharmony_ci#define FW_PORT_CMD_LSTATUS_G(x) \ 294062306a36Sopenharmony_ci (((x) >> FW_PORT_CMD_LSTATUS_S) & FW_PORT_CMD_LSTATUS_M) 294162306a36Sopenharmony_ci#define FW_PORT_CMD_LSTATUS_F FW_PORT_CMD_LSTATUS_V(1U) 294262306a36Sopenharmony_ci 294362306a36Sopenharmony_ci#define FW_PORT_CMD_LSPEED_S 24 294462306a36Sopenharmony_ci#define FW_PORT_CMD_LSPEED_M 0x3f 294562306a36Sopenharmony_ci#define FW_PORT_CMD_LSPEED_V(x) ((x) << FW_PORT_CMD_LSPEED_S) 294662306a36Sopenharmony_ci#define FW_PORT_CMD_LSPEED_G(x) \ 294762306a36Sopenharmony_ci (((x) >> FW_PORT_CMD_LSPEED_S) & FW_PORT_CMD_LSPEED_M) 294862306a36Sopenharmony_ci 294962306a36Sopenharmony_ci#define FW_PORT_CMD_TXPAUSE_S 23 295062306a36Sopenharmony_ci#define FW_PORT_CMD_TXPAUSE_V(x) ((x) << FW_PORT_CMD_TXPAUSE_S) 295162306a36Sopenharmony_ci#define FW_PORT_CMD_TXPAUSE_F FW_PORT_CMD_TXPAUSE_V(1U) 295262306a36Sopenharmony_ci 295362306a36Sopenharmony_ci#define FW_PORT_CMD_RXPAUSE_S 22 295462306a36Sopenharmony_ci#define FW_PORT_CMD_RXPAUSE_V(x) ((x) << FW_PORT_CMD_RXPAUSE_S) 295562306a36Sopenharmony_ci#define FW_PORT_CMD_RXPAUSE_F FW_PORT_CMD_RXPAUSE_V(1U) 295662306a36Sopenharmony_ci 295762306a36Sopenharmony_ci#define FW_PORT_CMD_MDIOCAP_S 21 295862306a36Sopenharmony_ci#define FW_PORT_CMD_MDIOCAP_V(x) ((x) << FW_PORT_CMD_MDIOCAP_S) 295962306a36Sopenharmony_ci#define FW_PORT_CMD_MDIOCAP_F FW_PORT_CMD_MDIOCAP_V(1U) 296062306a36Sopenharmony_ci 296162306a36Sopenharmony_ci#define FW_PORT_CMD_MDIOADDR_S 16 296262306a36Sopenharmony_ci#define FW_PORT_CMD_MDIOADDR_M 0x1f 296362306a36Sopenharmony_ci#define FW_PORT_CMD_MDIOADDR_G(x) \ 296462306a36Sopenharmony_ci (((x) >> FW_PORT_CMD_MDIOADDR_S) & FW_PORT_CMD_MDIOADDR_M) 296562306a36Sopenharmony_ci 296662306a36Sopenharmony_ci#define FW_PORT_CMD_LPTXPAUSE_S 15 296762306a36Sopenharmony_ci#define FW_PORT_CMD_LPTXPAUSE_V(x) ((x) << FW_PORT_CMD_LPTXPAUSE_S) 296862306a36Sopenharmony_ci#define FW_PORT_CMD_LPTXPAUSE_F FW_PORT_CMD_LPTXPAUSE_V(1U) 296962306a36Sopenharmony_ci 297062306a36Sopenharmony_ci#define FW_PORT_CMD_LPRXPAUSE_S 14 297162306a36Sopenharmony_ci#define FW_PORT_CMD_LPRXPAUSE_V(x) ((x) << FW_PORT_CMD_LPRXPAUSE_S) 297262306a36Sopenharmony_ci#define FW_PORT_CMD_LPRXPAUSE_F FW_PORT_CMD_LPRXPAUSE_V(1U) 297362306a36Sopenharmony_ci 297462306a36Sopenharmony_ci#define FW_PORT_CMD_PTYPE_S 8 297562306a36Sopenharmony_ci#define FW_PORT_CMD_PTYPE_M 0x1f 297662306a36Sopenharmony_ci#define FW_PORT_CMD_PTYPE_G(x) \ 297762306a36Sopenharmony_ci (((x) >> FW_PORT_CMD_PTYPE_S) & FW_PORT_CMD_PTYPE_M) 297862306a36Sopenharmony_ci 297962306a36Sopenharmony_ci#define FW_PORT_CMD_LINKDNRC_S 5 298062306a36Sopenharmony_ci#define FW_PORT_CMD_LINKDNRC_M 0x7 298162306a36Sopenharmony_ci#define FW_PORT_CMD_LINKDNRC_G(x) \ 298262306a36Sopenharmony_ci (((x) >> FW_PORT_CMD_LINKDNRC_S) & FW_PORT_CMD_LINKDNRC_M) 298362306a36Sopenharmony_ci 298462306a36Sopenharmony_ci#define FW_PORT_CMD_MODTYPE_S 0 298562306a36Sopenharmony_ci#define FW_PORT_CMD_MODTYPE_M 0x1f 298662306a36Sopenharmony_ci#define FW_PORT_CMD_MODTYPE_V(x) ((x) << FW_PORT_CMD_MODTYPE_S) 298762306a36Sopenharmony_ci#define FW_PORT_CMD_MODTYPE_G(x) \ 298862306a36Sopenharmony_ci (((x) >> FW_PORT_CMD_MODTYPE_S) & FW_PORT_CMD_MODTYPE_M) 298962306a36Sopenharmony_ci 299062306a36Sopenharmony_ci#define FW_PORT_CMD_DCBXDIS_S 7 299162306a36Sopenharmony_ci#define FW_PORT_CMD_DCBXDIS_V(x) ((x) << FW_PORT_CMD_DCBXDIS_S) 299262306a36Sopenharmony_ci#define FW_PORT_CMD_DCBXDIS_F FW_PORT_CMD_DCBXDIS_V(1U) 299362306a36Sopenharmony_ci 299462306a36Sopenharmony_ci#define FW_PORT_CMD_APPLY_S 7 299562306a36Sopenharmony_ci#define FW_PORT_CMD_APPLY_V(x) ((x) << FW_PORT_CMD_APPLY_S) 299662306a36Sopenharmony_ci#define FW_PORT_CMD_APPLY_F FW_PORT_CMD_APPLY_V(1U) 299762306a36Sopenharmony_ci 299862306a36Sopenharmony_ci#define FW_PORT_CMD_ALL_SYNCD_S 7 299962306a36Sopenharmony_ci#define FW_PORT_CMD_ALL_SYNCD_V(x) ((x) << FW_PORT_CMD_ALL_SYNCD_S) 300062306a36Sopenharmony_ci#define FW_PORT_CMD_ALL_SYNCD_F FW_PORT_CMD_ALL_SYNCD_V(1U) 300162306a36Sopenharmony_ci 300262306a36Sopenharmony_ci#define FW_PORT_CMD_DCB_VERSION_S 12 300362306a36Sopenharmony_ci#define FW_PORT_CMD_DCB_VERSION_M 0x7 300462306a36Sopenharmony_ci#define FW_PORT_CMD_DCB_VERSION_G(x) \ 300562306a36Sopenharmony_ci (((x) >> FW_PORT_CMD_DCB_VERSION_S) & FW_PORT_CMD_DCB_VERSION_M) 300662306a36Sopenharmony_ci 300762306a36Sopenharmony_ci#define FW_PORT_CMD_LSTATUS32_S 31 300862306a36Sopenharmony_ci#define FW_PORT_CMD_LSTATUS32_M 0x1 300962306a36Sopenharmony_ci#define FW_PORT_CMD_LSTATUS32_V(x) ((x) << FW_PORT_CMD_LSTATUS32_S) 301062306a36Sopenharmony_ci#define FW_PORT_CMD_LSTATUS32_G(x) \ 301162306a36Sopenharmony_ci (((x) >> FW_PORT_CMD_LSTATUS32_S) & FW_PORT_CMD_LSTATUS32_M) 301262306a36Sopenharmony_ci#define FW_PORT_CMD_LSTATUS32_F FW_PORT_CMD_LSTATUS32_V(1U) 301362306a36Sopenharmony_ci 301462306a36Sopenharmony_ci#define FW_PORT_CMD_LINKDNRC32_S 28 301562306a36Sopenharmony_ci#define FW_PORT_CMD_LINKDNRC32_M 0x7 301662306a36Sopenharmony_ci#define FW_PORT_CMD_LINKDNRC32_V(x) ((x) << FW_PORT_CMD_LINKDNRC32_S) 301762306a36Sopenharmony_ci#define FW_PORT_CMD_LINKDNRC32_G(x) \ 301862306a36Sopenharmony_ci (((x) >> FW_PORT_CMD_LINKDNRC32_S) & FW_PORT_CMD_LINKDNRC32_M) 301962306a36Sopenharmony_ci 302062306a36Sopenharmony_ci#define FW_PORT_CMD_DCBXDIS32_S 27 302162306a36Sopenharmony_ci#define FW_PORT_CMD_DCBXDIS32_M 0x1 302262306a36Sopenharmony_ci#define FW_PORT_CMD_DCBXDIS32_V(x) ((x) << FW_PORT_CMD_DCBXDIS32_S) 302362306a36Sopenharmony_ci#define FW_PORT_CMD_DCBXDIS32_G(x) \ 302462306a36Sopenharmony_ci (((x) >> FW_PORT_CMD_DCBXDIS32_S) & FW_PORT_CMD_DCBXDIS32_M) 302562306a36Sopenharmony_ci#define FW_PORT_CMD_DCBXDIS32_F FW_PORT_CMD_DCBXDIS32_V(1U) 302662306a36Sopenharmony_ci 302762306a36Sopenharmony_ci#define FW_PORT_CMD_MDIOCAP32_S 26 302862306a36Sopenharmony_ci#define FW_PORT_CMD_MDIOCAP32_M 0x1 302962306a36Sopenharmony_ci#define FW_PORT_CMD_MDIOCAP32_V(x) ((x) << FW_PORT_CMD_MDIOCAP32_S) 303062306a36Sopenharmony_ci#define FW_PORT_CMD_MDIOCAP32_G(x) \ 303162306a36Sopenharmony_ci (((x) >> FW_PORT_CMD_MDIOCAP32_S) & FW_PORT_CMD_MDIOCAP32_M) 303262306a36Sopenharmony_ci#define FW_PORT_CMD_MDIOCAP32_F FW_PORT_CMD_MDIOCAP32_V(1U) 303362306a36Sopenharmony_ci 303462306a36Sopenharmony_ci#define FW_PORT_CMD_MDIOADDR32_S 21 303562306a36Sopenharmony_ci#define FW_PORT_CMD_MDIOADDR32_M 0x1f 303662306a36Sopenharmony_ci#define FW_PORT_CMD_MDIOADDR32_V(x) ((x) << FW_PORT_CMD_MDIOADDR32_S) 303762306a36Sopenharmony_ci#define FW_PORT_CMD_MDIOADDR32_G(x) \ 303862306a36Sopenharmony_ci (((x) >> FW_PORT_CMD_MDIOADDR32_S) & FW_PORT_CMD_MDIOADDR32_M) 303962306a36Sopenharmony_ci 304062306a36Sopenharmony_ci#define FW_PORT_CMD_PORTTYPE32_S 13 304162306a36Sopenharmony_ci#define FW_PORT_CMD_PORTTYPE32_M 0xff 304262306a36Sopenharmony_ci#define FW_PORT_CMD_PORTTYPE32_V(x) ((x) << FW_PORT_CMD_PORTTYPE32_S) 304362306a36Sopenharmony_ci#define FW_PORT_CMD_PORTTYPE32_G(x) \ 304462306a36Sopenharmony_ci (((x) >> FW_PORT_CMD_PORTTYPE32_S) & FW_PORT_CMD_PORTTYPE32_M) 304562306a36Sopenharmony_ci 304662306a36Sopenharmony_ci#define FW_PORT_CMD_MODTYPE32_S 8 304762306a36Sopenharmony_ci#define FW_PORT_CMD_MODTYPE32_M 0x1f 304862306a36Sopenharmony_ci#define FW_PORT_CMD_MODTYPE32_V(x) ((x) << FW_PORT_CMD_MODTYPE32_S) 304962306a36Sopenharmony_ci#define FW_PORT_CMD_MODTYPE32_G(x) \ 305062306a36Sopenharmony_ci (((x) >> FW_PORT_CMD_MODTYPE32_S) & FW_PORT_CMD_MODTYPE32_M) 305162306a36Sopenharmony_ci 305262306a36Sopenharmony_ci#define FW_PORT_CMD_CBLLEN32_S 0 305362306a36Sopenharmony_ci#define FW_PORT_CMD_CBLLEN32_M 0xff 305462306a36Sopenharmony_ci#define FW_PORT_CMD_CBLLEN32_V(x) ((x) << FW_PORT_CMD_CBLLEN32_S) 305562306a36Sopenharmony_ci#define FW_PORT_CMD_CBLLEN32_G(x) \ 305662306a36Sopenharmony_ci (((x) >> FW_PORT_CMD_CBLLEN32_S) & FW_PORT_CMD_CBLLEN32_M) 305762306a36Sopenharmony_ci 305862306a36Sopenharmony_ci#define FW_PORT_CMD_AUXLINFO32_S 24 305962306a36Sopenharmony_ci#define FW_PORT_CMD_AUXLINFO32_M 0xff 306062306a36Sopenharmony_ci#define FW_PORT_CMD_AUXLINFO32_V(x) ((x) << FW_PORT_CMD_AUXLINFO32_S) 306162306a36Sopenharmony_ci#define FW_PORT_CMD_AUXLINFO32_G(x) \ 306262306a36Sopenharmony_ci (((x) >> FW_PORT_CMD_AUXLINFO32_S) & FW_PORT_CMD_AUXLINFO32_M) 306362306a36Sopenharmony_ci 306462306a36Sopenharmony_ci#define FW_PORT_AUXLINFO32_KX4_S 2 306562306a36Sopenharmony_ci#define FW_PORT_AUXLINFO32_KX4_M 0x1 306662306a36Sopenharmony_ci#define FW_PORT_AUXLINFO32_KX4_V(x) \ 306762306a36Sopenharmony_ci ((x) << FW_PORT_AUXLINFO32_KX4_S) 306862306a36Sopenharmony_ci#define FW_PORT_AUXLINFO32_KX4_G(x) \ 306962306a36Sopenharmony_ci (((x) >> FW_PORT_AUXLINFO32_KX4_S) & FW_PORT_AUXLINFO32_KX4_M) 307062306a36Sopenharmony_ci#define FW_PORT_AUXLINFO32_KX4_F FW_PORT_AUXLINFO32_KX4_V(1U) 307162306a36Sopenharmony_ci 307262306a36Sopenharmony_ci#define FW_PORT_AUXLINFO32_KR_S 1 307362306a36Sopenharmony_ci#define FW_PORT_AUXLINFO32_KR_M 0x1 307462306a36Sopenharmony_ci#define FW_PORT_AUXLINFO32_KR_V(x) \ 307562306a36Sopenharmony_ci ((x) << FW_PORT_AUXLINFO32_KR_S) 307662306a36Sopenharmony_ci#define FW_PORT_AUXLINFO32_KR_G(x) \ 307762306a36Sopenharmony_ci (((x) >> FW_PORT_AUXLINFO32_KR_S) & FW_PORT_AUXLINFO32_KR_M) 307862306a36Sopenharmony_ci#define FW_PORT_AUXLINFO32_KR_F FW_PORT_AUXLINFO32_KR_V(1U) 307962306a36Sopenharmony_ci 308062306a36Sopenharmony_ci#define FW_PORT_CMD_MTU32_S 0 308162306a36Sopenharmony_ci#define FW_PORT_CMD_MTU32_M 0xffff 308262306a36Sopenharmony_ci#define FW_PORT_CMD_MTU32_V(x) ((x) << FW_PORT_CMD_MTU32_S) 308362306a36Sopenharmony_ci#define FW_PORT_CMD_MTU32_G(x) \ 308462306a36Sopenharmony_ci (((x) >> FW_PORT_CMD_MTU32_S) & FW_PORT_CMD_MTU32_M) 308562306a36Sopenharmony_ci 308662306a36Sopenharmony_cienum fw_port_type { 308762306a36Sopenharmony_ci FW_PORT_TYPE_FIBER_XFI, 308862306a36Sopenharmony_ci FW_PORT_TYPE_FIBER_XAUI, 308962306a36Sopenharmony_ci FW_PORT_TYPE_BT_SGMII, 309062306a36Sopenharmony_ci FW_PORT_TYPE_BT_XFI, 309162306a36Sopenharmony_ci FW_PORT_TYPE_BT_XAUI, 309262306a36Sopenharmony_ci FW_PORT_TYPE_KX4, 309362306a36Sopenharmony_ci FW_PORT_TYPE_CX4, 309462306a36Sopenharmony_ci FW_PORT_TYPE_KX, 309562306a36Sopenharmony_ci FW_PORT_TYPE_KR, 309662306a36Sopenharmony_ci FW_PORT_TYPE_SFP, 309762306a36Sopenharmony_ci FW_PORT_TYPE_BP_AP, 309862306a36Sopenharmony_ci FW_PORT_TYPE_BP4_AP, 309962306a36Sopenharmony_ci FW_PORT_TYPE_QSFP_10G, 310062306a36Sopenharmony_ci FW_PORT_TYPE_QSA, 310162306a36Sopenharmony_ci FW_PORT_TYPE_QSFP, 310262306a36Sopenharmony_ci FW_PORT_TYPE_BP40_BA, 310362306a36Sopenharmony_ci FW_PORT_TYPE_KR4_100G, 310462306a36Sopenharmony_ci FW_PORT_TYPE_CR4_QSFP, 310562306a36Sopenharmony_ci FW_PORT_TYPE_CR_QSFP, 310662306a36Sopenharmony_ci FW_PORT_TYPE_CR2_QSFP, 310762306a36Sopenharmony_ci FW_PORT_TYPE_SFP28, 310862306a36Sopenharmony_ci FW_PORT_TYPE_KR_SFP28, 310962306a36Sopenharmony_ci FW_PORT_TYPE_KR_XLAUI, 311062306a36Sopenharmony_ci 311162306a36Sopenharmony_ci FW_PORT_TYPE_NONE = FW_PORT_CMD_PTYPE_M 311262306a36Sopenharmony_ci}; 311362306a36Sopenharmony_ci 311462306a36Sopenharmony_cienum fw_port_module_type { 311562306a36Sopenharmony_ci FW_PORT_MOD_TYPE_NA, 311662306a36Sopenharmony_ci FW_PORT_MOD_TYPE_LR, 311762306a36Sopenharmony_ci FW_PORT_MOD_TYPE_SR, 311862306a36Sopenharmony_ci FW_PORT_MOD_TYPE_ER, 311962306a36Sopenharmony_ci FW_PORT_MOD_TYPE_TWINAX_PASSIVE, 312062306a36Sopenharmony_ci FW_PORT_MOD_TYPE_TWINAX_ACTIVE, 312162306a36Sopenharmony_ci FW_PORT_MOD_TYPE_LRM, 312262306a36Sopenharmony_ci FW_PORT_MOD_TYPE_ERROR = FW_PORT_CMD_MODTYPE_M - 3, 312362306a36Sopenharmony_ci FW_PORT_MOD_TYPE_UNKNOWN = FW_PORT_CMD_MODTYPE_M - 2, 312462306a36Sopenharmony_ci FW_PORT_MOD_TYPE_NOTSUPPORTED = FW_PORT_CMD_MODTYPE_M - 1, 312562306a36Sopenharmony_ci 312662306a36Sopenharmony_ci FW_PORT_MOD_TYPE_NONE = FW_PORT_CMD_MODTYPE_M 312762306a36Sopenharmony_ci}; 312862306a36Sopenharmony_ci 312962306a36Sopenharmony_cienum fw_port_mod_sub_type { 313062306a36Sopenharmony_ci FW_PORT_MOD_SUB_TYPE_NA, 313162306a36Sopenharmony_ci FW_PORT_MOD_SUB_TYPE_MV88E114X = 0x1, 313262306a36Sopenharmony_ci FW_PORT_MOD_SUB_TYPE_TN8022 = 0x2, 313362306a36Sopenharmony_ci FW_PORT_MOD_SUB_TYPE_AQ1202 = 0x3, 313462306a36Sopenharmony_ci FW_PORT_MOD_SUB_TYPE_88x3120 = 0x4, 313562306a36Sopenharmony_ci FW_PORT_MOD_SUB_TYPE_BCM84834 = 0x5, 313662306a36Sopenharmony_ci FW_PORT_MOD_SUB_TYPE_BT_VSC8634 = 0x8, 313762306a36Sopenharmony_ci 313862306a36Sopenharmony_ci /* The following will never been in the VPD. They are TWINAX cable 313962306a36Sopenharmony_ci * lengths decoded from SFP+ module i2c PROMs. These should 314062306a36Sopenharmony_ci * almost certainly go somewhere else ... 314162306a36Sopenharmony_ci */ 314262306a36Sopenharmony_ci FW_PORT_MOD_SUB_TYPE_TWINAX_1 = 0x9, 314362306a36Sopenharmony_ci FW_PORT_MOD_SUB_TYPE_TWINAX_3 = 0xA, 314462306a36Sopenharmony_ci FW_PORT_MOD_SUB_TYPE_TWINAX_5 = 0xB, 314562306a36Sopenharmony_ci FW_PORT_MOD_SUB_TYPE_TWINAX_7 = 0xC, 314662306a36Sopenharmony_ci}; 314762306a36Sopenharmony_ci 314862306a36Sopenharmony_cienum fw_port_stats_tx_index { 314962306a36Sopenharmony_ci FW_STAT_TX_PORT_BYTES_IX = 0, 315062306a36Sopenharmony_ci FW_STAT_TX_PORT_FRAMES_IX, 315162306a36Sopenharmony_ci FW_STAT_TX_PORT_BCAST_IX, 315262306a36Sopenharmony_ci FW_STAT_TX_PORT_MCAST_IX, 315362306a36Sopenharmony_ci FW_STAT_TX_PORT_UCAST_IX, 315462306a36Sopenharmony_ci FW_STAT_TX_PORT_ERROR_IX, 315562306a36Sopenharmony_ci FW_STAT_TX_PORT_64B_IX, 315662306a36Sopenharmony_ci FW_STAT_TX_PORT_65B_127B_IX, 315762306a36Sopenharmony_ci FW_STAT_TX_PORT_128B_255B_IX, 315862306a36Sopenharmony_ci FW_STAT_TX_PORT_256B_511B_IX, 315962306a36Sopenharmony_ci FW_STAT_TX_PORT_512B_1023B_IX, 316062306a36Sopenharmony_ci FW_STAT_TX_PORT_1024B_1518B_IX, 316162306a36Sopenharmony_ci FW_STAT_TX_PORT_1519B_MAX_IX, 316262306a36Sopenharmony_ci FW_STAT_TX_PORT_DROP_IX, 316362306a36Sopenharmony_ci FW_STAT_TX_PORT_PAUSE_IX, 316462306a36Sopenharmony_ci FW_STAT_TX_PORT_PPP0_IX, 316562306a36Sopenharmony_ci FW_STAT_TX_PORT_PPP1_IX, 316662306a36Sopenharmony_ci FW_STAT_TX_PORT_PPP2_IX, 316762306a36Sopenharmony_ci FW_STAT_TX_PORT_PPP3_IX, 316862306a36Sopenharmony_ci FW_STAT_TX_PORT_PPP4_IX, 316962306a36Sopenharmony_ci FW_STAT_TX_PORT_PPP5_IX, 317062306a36Sopenharmony_ci FW_STAT_TX_PORT_PPP6_IX, 317162306a36Sopenharmony_ci FW_STAT_TX_PORT_PPP7_IX, 317262306a36Sopenharmony_ci FW_NUM_PORT_TX_STATS 317362306a36Sopenharmony_ci}; 317462306a36Sopenharmony_ci 317562306a36Sopenharmony_cienum fw_port_stat_rx_index { 317662306a36Sopenharmony_ci FW_STAT_RX_PORT_BYTES_IX = 0, 317762306a36Sopenharmony_ci FW_STAT_RX_PORT_FRAMES_IX, 317862306a36Sopenharmony_ci FW_STAT_RX_PORT_BCAST_IX, 317962306a36Sopenharmony_ci FW_STAT_RX_PORT_MCAST_IX, 318062306a36Sopenharmony_ci FW_STAT_RX_PORT_UCAST_IX, 318162306a36Sopenharmony_ci FW_STAT_RX_PORT_MTU_ERROR_IX, 318262306a36Sopenharmony_ci FW_STAT_RX_PORT_MTU_CRC_ERROR_IX, 318362306a36Sopenharmony_ci FW_STAT_RX_PORT_CRC_ERROR_IX, 318462306a36Sopenharmony_ci FW_STAT_RX_PORT_LEN_ERROR_IX, 318562306a36Sopenharmony_ci FW_STAT_RX_PORT_SYM_ERROR_IX, 318662306a36Sopenharmony_ci FW_STAT_RX_PORT_64B_IX, 318762306a36Sopenharmony_ci FW_STAT_RX_PORT_65B_127B_IX, 318862306a36Sopenharmony_ci FW_STAT_RX_PORT_128B_255B_IX, 318962306a36Sopenharmony_ci FW_STAT_RX_PORT_256B_511B_IX, 319062306a36Sopenharmony_ci FW_STAT_RX_PORT_512B_1023B_IX, 319162306a36Sopenharmony_ci FW_STAT_RX_PORT_1024B_1518B_IX, 319262306a36Sopenharmony_ci FW_STAT_RX_PORT_1519B_MAX_IX, 319362306a36Sopenharmony_ci FW_STAT_RX_PORT_PAUSE_IX, 319462306a36Sopenharmony_ci FW_STAT_RX_PORT_PPP0_IX, 319562306a36Sopenharmony_ci FW_STAT_RX_PORT_PPP1_IX, 319662306a36Sopenharmony_ci FW_STAT_RX_PORT_PPP2_IX, 319762306a36Sopenharmony_ci FW_STAT_RX_PORT_PPP3_IX, 319862306a36Sopenharmony_ci FW_STAT_RX_PORT_PPP4_IX, 319962306a36Sopenharmony_ci FW_STAT_RX_PORT_PPP5_IX, 320062306a36Sopenharmony_ci FW_STAT_RX_PORT_PPP6_IX, 320162306a36Sopenharmony_ci FW_STAT_RX_PORT_PPP7_IX, 320262306a36Sopenharmony_ci FW_STAT_RX_PORT_LESS_64B_IX, 320362306a36Sopenharmony_ci FW_STAT_RX_PORT_MAC_ERROR_IX, 320462306a36Sopenharmony_ci FW_NUM_PORT_RX_STATS 320562306a36Sopenharmony_ci}; 320662306a36Sopenharmony_ci 320762306a36Sopenharmony_ci/* port stats */ 320862306a36Sopenharmony_ci#define FW_NUM_PORT_STATS (FW_NUM_PORT_TX_STATS + FW_NUM_PORT_RX_STATS) 320962306a36Sopenharmony_ci 321062306a36Sopenharmony_cistruct fw_port_stats_cmd { 321162306a36Sopenharmony_ci __be32 op_to_portid; 321262306a36Sopenharmony_ci __be32 retval_len16; 321362306a36Sopenharmony_ci union fw_port_stats { 321462306a36Sopenharmony_ci struct fw_port_stats_ctl { 321562306a36Sopenharmony_ci u8 nstats_bg_bm; 321662306a36Sopenharmony_ci u8 tx_ix; 321762306a36Sopenharmony_ci __be16 r6; 321862306a36Sopenharmony_ci __be32 r7; 321962306a36Sopenharmony_ci __be64 stat0; 322062306a36Sopenharmony_ci __be64 stat1; 322162306a36Sopenharmony_ci __be64 stat2; 322262306a36Sopenharmony_ci __be64 stat3; 322362306a36Sopenharmony_ci __be64 stat4; 322462306a36Sopenharmony_ci __be64 stat5; 322562306a36Sopenharmony_ci } ctl; 322662306a36Sopenharmony_ci struct fw_port_stats_all { 322762306a36Sopenharmony_ci __be64 tx_bytes; 322862306a36Sopenharmony_ci __be64 tx_frames; 322962306a36Sopenharmony_ci __be64 tx_bcast; 323062306a36Sopenharmony_ci __be64 tx_mcast; 323162306a36Sopenharmony_ci __be64 tx_ucast; 323262306a36Sopenharmony_ci __be64 tx_error; 323362306a36Sopenharmony_ci __be64 tx_64b; 323462306a36Sopenharmony_ci __be64 tx_65b_127b; 323562306a36Sopenharmony_ci __be64 tx_128b_255b; 323662306a36Sopenharmony_ci __be64 tx_256b_511b; 323762306a36Sopenharmony_ci __be64 tx_512b_1023b; 323862306a36Sopenharmony_ci __be64 tx_1024b_1518b; 323962306a36Sopenharmony_ci __be64 tx_1519b_max; 324062306a36Sopenharmony_ci __be64 tx_drop; 324162306a36Sopenharmony_ci __be64 tx_pause; 324262306a36Sopenharmony_ci __be64 tx_ppp0; 324362306a36Sopenharmony_ci __be64 tx_ppp1; 324462306a36Sopenharmony_ci __be64 tx_ppp2; 324562306a36Sopenharmony_ci __be64 tx_ppp3; 324662306a36Sopenharmony_ci __be64 tx_ppp4; 324762306a36Sopenharmony_ci __be64 tx_ppp5; 324862306a36Sopenharmony_ci __be64 tx_ppp6; 324962306a36Sopenharmony_ci __be64 tx_ppp7; 325062306a36Sopenharmony_ci __be64 rx_bytes; 325162306a36Sopenharmony_ci __be64 rx_frames; 325262306a36Sopenharmony_ci __be64 rx_bcast; 325362306a36Sopenharmony_ci __be64 rx_mcast; 325462306a36Sopenharmony_ci __be64 rx_ucast; 325562306a36Sopenharmony_ci __be64 rx_mtu_error; 325662306a36Sopenharmony_ci __be64 rx_mtu_crc_error; 325762306a36Sopenharmony_ci __be64 rx_crc_error; 325862306a36Sopenharmony_ci __be64 rx_len_error; 325962306a36Sopenharmony_ci __be64 rx_sym_error; 326062306a36Sopenharmony_ci __be64 rx_64b; 326162306a36Sopenharmony_ci __be64 rx_65b_127b; 326262306a36Sopenharmony_ci __be64 rx_128b_255b; 326362306a36Sopenharmony_ci __be64 rx_256b_511b; 326462306a36Sopenharmony_ci __be64 rx_512b_1023b; 326562306a36Sopenharmony_ci __be64 rx_1024b_1518b; 326662306a36Sopenharmony_ci __be64 rx_1519b_max; 326762306a36Sopenharmony_ci __be64 rx_pause; 326862306a36Sopenharmony_ci __be64 rx_ppp0; 326962306a36Sopenharmony_ci __be64 rx_ppp1; 327062306a36Sopenharmony_ci __be64 rx_ppp2; 327162306a36Sopenharmony_ci __be64 rx_ppp3; 327262306a36Sopenharmony_ci __be64 rx_ppp4; 327362306a36Sopenharmony_ci __be64 rx_ppp5; 327462306a36Sopenharmony_ci __be64 rx_ppp6; 327562306a36Sopenharmony_ci __be64 rx_ppp7; 327662306a36Sopenharmony_ci __be64 rx_less_64b; 327762306a36Sopenharmony_ci __be64 rx_bg_drop; 327862306a36Sopenharmony_ci __be64 rx_bg_trunc; 327962306a36Sopenharmony_ci } all; 328062306a36Sopenharmony_ci } u; 328162306a36Sopenharmony_ci}; 328262306a36Sopenharmony_ci 328362306a36Sopenharmony_ci/* port loopback stats */ 328462306a36Sopenharmony_ci#define FW_NUM_LB_STATS 16 328562306a36Sopenharmony_cienum fw_port_lb_stats_index { 328662306a36Sopenharmony_ci FW_STAT_LB_PORT_BYTES_IX, 328762306a36Sopenharmony_ci FW_STAT_LB_PORT_FRAMES_IX, 328862306a36Sopenharmony_ci FW_STAT_LB_PORT_BCAST_IX, 328962306a36Sopenharmony_ci FW_STAT_LB_PORT_MCAST_IX, 329062306a36Sopenharmony_ci FW_STAT_LB_PORT_UCAST_IX, 329162306a36Sopenharmony_ci FW_STAT_LB_PORT_ERROR_IX, 329262306a36Sopenharmony_ci FW_STAT_LB_PORT_64B_IX, 329362306a36Sopenharmony_ci FW_STAT_LB_PORT_65B_127B_IX, 329462306a36Sopenharmony_ci FW_STAT_LB_PORT_128B_255B_IX, 329562306a36Sopenharmony_ci FW_STAT_LB_PORT_256B_511B_IX, 329662306a36Sopenharmony_ci FW_STAT_LB_PORT_512B_1023B_IX, 329762306a36Sopenharmony_ci FW_STAT_LB_PORT_1024B_1518B_IX, 329862306a36Sopenharmony_ci FW_STAT_LB_PORT_1519B_MAX_IX, 329962306a36Sopenharmony_ci FW_STAT_LB_PORT_DROP_FRAMES_IX 330062306a36Sopenharmony_ci}; 330162306a36Sopenharmony_ci 330262306a36Sopenharmony_cistruct fw_port_lb_stats_cmd { 330362306a36Sopenharmony_ci __be32 op_to_lbport; 330462306a36Sopenharmony_ci __be32 retval_len16; 330562306a36Sopenharmony_ci union fw_port_lb_stats { 330662306a36Sopenharmony_ci struct fw_port_lb_stats_ctl { 330762306a36Sopenharmony_ci u8 nstats_bg_bm; 330862306a36Sopenharmony_ci u8 ix_pkd; 330962306a36Sopenharmony_ci __be16 r6; 331062306a36Sopenharmony_ci __be32 r7; 331162306a36Sopenharmony_ci __be64 stat0; 331262306a36Sopenharmony_ci __be64 stat1; 331362306a36Sopenharmony_ci __be64 stat2; 331462306a36Sopenharmony_ci __be64 stat3; 331562306a36Sopenharmony_ci __be64 stat4; 331662306a36Sopenharmony_ci __be64 stat5; 331762306a36Sopenharmony_ci } ctl; 331862306a36Sopenharmony_ci struct fw_port_lb_stats_all { 331962306a36Sopenharmony_ci __be64 tx_bytes; 332062306a36Sopenharmony_ci __be64 tx_frames; 332162306a36Sopenharmony_ci __be64 tx_bcast; 332262306a36Sopenharmony_ci __be64 tx_mcast; 332362306a36Sopenharmony_ci __be64 tx_ucast; 332462306a36Sopenharmony_ci __be64 tx_error; 332562306a36Sopenharmony_ci __be64 tx_64b; 332662306a36Sopenharmony_ci __be64 tx_65b_127b; 332762306a36Sopenharmony_ci __be64 tx_128b_255b; 332862306a36Sopenharmony_ci __be64 tx_256b_511b; 332962306a36Sopenharmony_ci __be64 tx_512b_1023b; 333062306a36Sopenharmony_ci __be64 tx_1024b_1518b; 333162306a36Sopenharmony_ci __be64 tx_1519b_max; 333262306a36Sopenharmony_ci __be64 rx_lb_drop; 333362306a36Sopenharmony_ci __be64 rx_lb_trunc; 333462306a36Sopenharmony_ci } all; 333562306a36Sopenharmony_ci } u; 333662306a36Sopenharmony_ci}; 333762306a36Sopenharmony_ci 333862306a36Sopenharmony_cienum fw_ptp_subop { 333962306a36Sopenharmony_ci /* none */ 334062306a36Sopenharmony_ci FW_PTP_SC_INIT_TIMER = 0x00, 334162306a36Sopenharmony_ci FW_PTP_SC_TX_TYPE = 0x01, 334262306a36Sopenharmony_ci /* init */ 334362306a36Sopenharmony_ci FW_PTP_SC_RXTIME_STAMP = 0x08, 334462306a36Sopenharmony_ci FW_PTP_SC_RDRX_TYPE = 0x09, 334562306a36Sopenharmony_ci /* ts */ 334662306a36Sopenharmony_ci FW_PTP_SC_ADJ_FREQ = 0x10, 334762306a36Sopenharmony_ci FW_PTP_SC_ADJ_TIME = 0x11, 334862306a36Sopenharmony_ci FW_PTP_SC_ADJ_FTIME = 0x12, 334962306a36Sopenharmony_ci FW_PTP_SC_WALL_CLOCK = 0x13, 335062306a36Sopenharmony_ci FW_PTP_SC_GET_TIME = 0x14, 335162306a36Sopenharmony_ci FW_PTP_SC_SET_TIME = 0x15, 335262306a36Sopenharmony_ci}; 335362306a36Sopenharmony_ci 335462306a36Sopenharmony_cistruct fw_ptp_cmd { 335562306a36Sopenharmony_ci __be32 op_to_portid; 335662306a36Sopenharmony_ci __be32 retval_len16; 335762306a36Sopenharmony_ci union fw_ptp { 335862306a36Sopenharmony_ci struct fw_ptp_sc { 335962306a36Sopenharmony_ci __u8 sc; 336062306a36Sopenharmony_ci __u8 r3[7]; 336162306a36Sopenharmony_ci } scmd; 336262306a36Sopenharmony_ci struct fw_ptp_init { 336362306a36Sopenharmony_ci __u8 sc; 336462306a36Sopenharmony_ci __u8 txchan; 336562306a36Sopenharmony_ci __be16 absid; 336662306a36Sopenharmony_ci __be16 mode; 336762306a36Sopenharmony_ci __be16 r3; 336862306a36Sopenharmony_ci } init; 336962306a36Sopenharmony_ci struct fw_ptp_ts { 337062306a36Sopenharmony_ci __u8 sc; 337162306a36Sopenharmony_ci __u8 sign; 337262306a36Sopenharmony_ci __be16 r3; 337362306a36Sopenharmony_ci __be32 ppb; 337462306a36Sopenharmony_ci __be64 tm; 337562306a36Sopenharmony_ci } ts; 337662306a36Sopenharmony_ci } u; 337762306a36Sopenharmony_ci __be64 r3; 337862306a36Sopenharmony_ci}; 337962306a36Sopenharmony_ci 338062306a36Sopenharmony_ci#define FW_PTP_CMD_PORTID_S 0 338162306a36Sopenharmony_ci#define FW_PTP_CMD_PORTID_M 0xf 338262306a36Sopenharmony_ci#define FW_PTP_CMD_PORTID_V(x) ((x) << FW_PTP_CMD_PORTID_S) 338362306a36Sopenharmony_ci#define FW_PTP_CMD_PORTID_G(x) \ 338462306a36Sopenharmony_ci (((x) >> FW_PTP_CMD_PORTID_S) & FW_PTP_CMD_PORTID_M) 338562306a36Sopenharmony_ci 338662306a36Sopenharmony_cistruct fw_rss_ind_tbl_cmd { 338762306a36Sopenharmony_ci __be32 op_to_viid; 338862306a36Sopenharmony_ci __be32 retval_len16; 338962306a36Sopenharmony_ci __be16 niqid; 339062306a36Sopenharmony_ci __be16 startidx; 339162306a36Sopenharmony_ci __be32 r3; 339262306a36Sopenharmony_ci __be32 iq0_to_iq2; 339362306a36Sopenharmony_ci __be32 iq3_to_iq5; 339462306a36Sopenharmony_ci __be32 iq6_to_iq8; 339562306a36Sopenharmony_ci __be32 iq9_to_iq11; 339662306a36Sopenharmony_ci __be32 iq12_to_iq14; 339762306a36Sopenharmony_ci __be32 iq15_to_iq17; 339862306a36Sopenharmony_ci __be32 iq18_to_iq20; 339962306a36Sopenharmony_ci __be32 iq21_to_iq23; 340062306a36Sopenharmony_ci __be32 iq24_to_iq26; 340162306a36Sopenharmony_ci __be32 iq27_to_iq29; 340262306a36Sopenharmony_ci __be32 iq30_iq31; 340362306a36Sopenharmony_ci __be32 r15_lo; 340462306a36Sopenharmony_ci}; 340562306a36Sopenharmony_ci 340662306a36Sopenharmony_ci#define FW_RSS_IND_TBL_CMD_VIID_S 0 340762306a36Sopenharmony_ci#define FW_RSS_IND_TBL_CMD_VIID_V(x) ((x) << FW_RSS_IND_TBL_CMD_VIID_S) 340862306a36Sopenharmony_ci 340962306a36Sopenharmony_ci#define FW_RSS_IND_TBL_CMD_IQ0_S 20 341062306a36Sopenharmony_ci#define FW_RSS_IND_TBL_CMD_IQ0_V(x) ((x) << FW_RSS_IND_TBL_CMD_IQ0_S) 341162306a36Sopenharmony_ci 341262306a36Sopenharmony_ci#define FW_RSS_IND_TBL_CMD_IQ1_S 10 341362306a36Sopenharmony_ci#define FW_RSS_IND_TBL_CMD_IQ1_V(x) ((x) << FW_RSS_IND_TBL_CMD_IQ1_S) 341462306a36Sopenharmony_ci 341562306a36Sopenharmony_ci#define FW_RSS_IND_TBL_CMD_IQ2_S 0 341662306a36Sopenharmony_ci#define FW_RSS_IND_TBL_CMD_IQ2_V(x) ((x) << FW_RSS_IND_TBL_CMD_IQ2_S) 341762306a36Sopenharmony_ci 341862306a36Sopenharmony_cistruct fw_rss_glb_config_cmd { 341962306a36Sopenharmony_ci __be32 op_to_write; 342062306a36Sopenharmony_ci __be32 retval_len16; 342162306a36Sopenharmony_ci union fw_rss_glb_config { 342262306a36Sopenharmony_ci struct fw_rss_glb_config_manual { 342362306a36Sopenharmony_ci __be32 mode_pkd; 342462306a36Sopenharmony_ci __be32 r3; 342562306a36Sopenharmony_ci __be64 r4; 342662306a36Sopenharmony_ci __be64 r5; 342762306a36Sopenharmony_ci } manual; 342862306a36Sopenharmony_ci struct fw_rss_glb_config_basicvirtual { 342962306a36Sopenharmony_ci __be32 mode_pkd; 343062306a36Sopenharmony_ci __be32 synmapen_to_hashtoeplitz; 343162306a36Sopenharmony_ci __be64 r8; 343262306a36Sopenharmony_ci __be64 r9; 343362306a36Sopenharmony_ci } basicvirtual; 343462306a36Sopenharmony_ci } u; 343562306a36Sopenharmony_ci}; 343662306a36Sopenharmony_ci 343762306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_MODE_S 28 343862306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_MODE_M 0xf 343962306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_MODE_V(x) ((x) << FW_RSS_GLB_CONFIG_CMD_MODE_S) 344062306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_MODE_G(x) \ 344162306a36Sopenharmony_ci (((x) >> FW_RSS_GLB_CONFIG_CMD_MODE_S) & FW_RSS_GLB_CONFIG_CMD_MODE_M) 344262306a36Sopenharmony_ci 344362306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_MODE_MANUAL 0 344462306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_MODE_BASICVIRTUAL 1 344562306a36Sopenharmony_ci 344662306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_SYNMAPEN_S 8 344762306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_SYNMAPEN_V(x) \ 344862306a36Sopenharmony_ci ((x) << FW_RSS_GLB_CONFIG_CMD_SYNMAPEN_S) 344962306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_SYNMAPEN_F \ 345062306a36Sopenharmony_ci FW_RSS_GLB_CONFIG_CMD_SYNMAPEN_V(1U) 345162306a36Sopenharmony_ci 345262306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6_S 7 345362306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6_V(x) \ 345462306a36Sopenharmony_ci ((x) << FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6_S) 345562306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6_F \ 345662306a36Sopenharmony_ci FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6_V(1U) 345762306a36Sopenharmony_ci 345862306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6_S 6 345962306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6_V(x) \ 346062306a36Sopenharmony_ci ((x) << FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6_S) 346162306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6_F \ 346262306a36Sopenharmony_ci FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6_V(1U) 346362306a36Sopenharmony_ci 346462306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4_S 5 346562306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4_V(x) \ 346662306a36Sopenharmony_ci ((x) << FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4_S) 346762306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4_F \ 346862306a36Sopenharmony_ci FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4_V(1U) 346962306a36Sopenharmony_ci 347062306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4_S 4 347162306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4_V(x) \ 347262306a36Sopenharmony_ci ((x) << FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4_S) 347362306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4_F \ 347462306a36Sopenharmony_ci FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4_V(1U) 347562306a36Sopenharmony_ci 347662306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_OFDMAPEN_S 3 347762306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_OFDMAPEN_V(x) \ 347862306a36Sopenharmony_ci ((x) << FW_RSS_GLB_CONFIG_CMD_OFDMAPEN_S) 347962306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_OFDMAPEN_F \ 348062306a36Sopenharmony_ci FW_RSS_GLB_CONFIG_CMD_OFDMAPEN_V(1U) 348162306a36Sopenharmony_ci 348262306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_TNLMAPEN_S 2 348362306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_TNLMAPEN_V(x) \ 348462306a36Sopenharmony_ci ((x) << FW_RSS_GLB_CONFIG_CMD_TNLMAPEN_S) 348562306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_TNLMAPEN_F \ 348662306a36Sopenharmony_ci FW_RSS_GLB_CONFIG_CMD_TNLMAPEN_V(1U) 348762306a36Sopenharmony_ci 348862306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_TNLALLLKP_S 1 348962306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_TNLALLLKP_V(x) \ 349062306a36Sopenharmony_ci ((x) << FW_RSS_GLB_CONFIG_CMD_TNLALLLKP_S) 349162306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_TNLALLLKP_F \ 349262306a36Sopenharmony_ci FW_RSS_GLB_CONFIG_CMD_TNLALLLKP_V(1U) 349362306a36Sopenharmony_ci 349462306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ_S 0 349562306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ_V(x) \ 349662306a36Sopenharmony_ci ((x) << FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ_S) 349762306a36Sopenharmony_ci#define FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ_F \ 349862306a36Sopenharmony_ci FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ_V(1U) 349962306a36Sopenharmony_ci 350062306a36Sopenharmony_cistruct fw_rss_vi_config_cmd { 350162306a36Sopenharmony_ci __be32 op_to_viid; 350262306a36Sopenharmony_ci#define FW_RSS_VI_CONFIG_CMD_VIID(x) ((x) << 0) 350362306a36Sopenharmony_ci __be32 retval_len16; 350462306a36Sopenharmony_ci union fw_rss_vi_config { 350562306a36Sopenharmony_ci struct fw_rss_vi_config_manual { 350662306a36Sopenharmony_ci __be64 r3; 350762306a36Sopenharmony_ci __be64 r4; 350862306a36Sopenharmony_ci __be64 r5; 350962306a36Sopenharmony_ci } manual; 351062306a36Sopenharmony_ci struct fw_rss_vi_config_basicvirtual { 351162306a36Sopenharmony_ci __be32 r6; 351262306a36Sopenharmony_ci __be32 defaultq_to_udpen; 351362306a36Sopenharmony_ci __be64 r9; 351462306a36Sopenharmony_ci __be64 r10; 351562306a36Sopenharmony_ci } basicvirtual; 351662306a36Sopenharmony_ci } u; 351762306a36Sopenharmony_ci}; 351862306a36Sopenharmony_ci 351962306a36Sopenharmony_ci#define FW_RSS_VI_CONFIG_CMD_VIID_S 0 352062306a36Sopenharmony_ci#define FW_RSS_VI_CONFIG_CMD_VIID_V(x) ((x) << FW_RSS_VI_CONFIG_CMD_VIID_S) 352162306a36Sopenharmony_ci 352262306a36Sopenharmony_ci#define FW_RSS_VI_CONFIG_CMD_DEFAULTQ_S 16 352362306a36Sopenharmony_ci#define FW_RSS_VI_CONFIG_CMD_DEFAULTQ_M 0x3ff 352462306a36Sopenharmony_ci#define FW_RSS_VI_CONFIG_CMD_DEFAULTQ_V(x) \ 352562306a36Sopenharmony_ci ((x) << FW_RSS_VI_CONFIG_CMD_DEFAULTQ_S) 352662306a36Sopenharmony_ci#define FW_RSS_VI_CONFIG_CMD_DEFAULTQ_G(x) \ 352762306a36Sopenharmony_ci (((x) >> FW_RSS_VI_CONFIG_CMD_DEFAULTQ_S) & \ 352862306a36Sopenharmony_ci FW_RSS_VI_CONFIG_CMD_DEFAULTQ_M) 352962306a36Sopenharmony_ci 353062306a36Sopenharmony_ci#define FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN_S 4 353162306a36Sopenharmony_ci#define FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN_V(x) \ 353262306a36Sopenharmony_ci ((x) << FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN_S) 353362306a36Sopenharmony_ci#define FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN_F \ 353462306a36Sopenharmony_ci FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN_V(1U) 353562306a36Sopenharmony_ci 353662306a36Sopenharmony_ci#define FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN_S 3 353762306a36Sopenharmony_ci#define FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN_V(x) \ 353862306a36Sopenharmony_ci ((x) << FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN_S) 353962306a36Sopenharmony_ci#define FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN_F \ 354062306a36Sopenharmony_ci FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN_V(1U) 354162306a36Sopenharmony_ci 354262306a36Sopenharmony_ci#define FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN_S 2 354362306a36Sopenharmony_ci#define FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN_V(x) \ 354462306a36Sopenharmony_ci ((x) << FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN_S) 354562306a36Sopenharmony_ci#define FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN_F \ 354662306a36Sopenharmony_ci FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN_V(1U) 354762306a36Sopenharmony_ci 354862306a36Sopenharmony_ci#define FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN_S 1 354962306a36Sopenharmony_ci#define FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN_V(x) \ 355062306a36Sopenharmony_ci ((x) << FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN_S) 355162306a36Sopenharmony_ci#define FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN_F \ 355262306a36Sopenharmony_ci FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN_V(1U) 355362306a36Sopenharmony_ci 355462306a36Sopenharmony_ci#define FW_RSS_VI_CONFIG_CMD_UDPEN_S 0 355562306a36Sopenharmony_ci#define FW_RSS_VI_CONFIG_CMD_UDPEN_V(x) ((x) << FW_RSS_VI_CONFIG_CMD_UDPEN_S) 355662306a36Sopenharmony_ci#define FW_RSS_VI_CONFIG_CMD_UDPEN_F FW_RSS_VI_CONFIG_CMD_UDPEN_V(1U) 355762306a36Sopenharmony_ci 355862306a36Sopenharmony_cienum fw_sched_sc { 355962306a36Sopenharmony_ci FW_SCHED_SC_PARAMS = 1, 356062306a36Sopenharmony_ci}; 356162306a36Sopenharmony_ci 356262306a36Sopenharmony_cistruct fw_sched_cmd { 356362306a36Sopenharmony_ci __be32 op_to_write; 356462306a36Sopenharmony_ci __be32 retval_len16; 356562306a36Sopenharmony_ci union fw_sched { 356662306a36Sopenharmony_ci struct fw_sched_config { 356762306a36Sopenharmony_ci __u8 sc; 356862306a36Sopenharmony_ci __u8 type; 356962306a36Sopenharmony_ci __u8 minmaxen; 357062306a36Sopenharmony_ci __u8 r3[5]; 357162306a36Sopenharmony_ci __u8 nclasses[4]; 357262306a36Sopenharmony_ci __be32 r4; 357362306a36Sopenharmony_ci } config; 357462306a36Sopenharmony_ci struct fw_sched_params { 357562306a36Sopenharmony_ci __u8 sc; 357662306a36Sopenharmony_ci __u8 type; 357762306a36Sopenharmony_ci __u8 level; 357862306a36Sopenharmony_ci __u8 mode; 357962306a36Sopenharmony_ci __u8 unit; 358062306a36Sopenharmony_ci __u8 rate; 358162306a36Sopenharmony_ci __u8 ch; 358262306a36Sopenharmony_ci __u8 cl; 358362306a36Sopenharmony_ci __be32 min; 358462306a36Sopenharmony_ci __be32 max; 358562306a36Sopenharmony_ci __be16 weight; 358662306a36Sopenharmony_ci __be16 pktsize; 358762306a36Sopenharmony_ci __be16 burstsize; 358862306a36Sopenharmony_ci __be16 r4; 358962306a36Sopenharmony_ci } params; 359062306a36Sopenharmony_ci } u; 359162306a36Sopenharmony_ci}; 359262306a36Sopenharmony_ci 359362306a36Sopenharmony_cistruct fw_clip_cmd { 359462306a36Sopenharmony_ci __be32 op_to_write; 359562306a36Sopenharmony_ci __be32 alloc_to_len16; 359662306a36Sopenharmony_ci __be64 ip_hi; 359762306a36Sopenharmony_ci __be64 ip_lo; 359862306a36Sopenharmony_ci __be32 r4[2]; 359962306a36Sopenharmony_ci}; 360062306a36Sopenharmony_ci 360162306a36Sopenharmony_ci#define FW_CLIP_CMD_ALLOC_S 31 360262306a36Sopenharmony_ci#define FW_CLIP_CMD_ALLOC_V(x) ((x) << FW_CLIP_CMD_ALLOC_S) 360362306a36Sopenharmony_ci#define FW_CLIP_CMD_ALLOC_F FW_CLIP_CMD_ALLOC_V(1U) 360462306a36Sopenharmony_ci 360562306a36Sopenharmony_ci#define FW_CLIP_CMD_FREE_S 30 360662306a36Sopenharmony_ci#define FW_CLIP_CMD_FREE_V(x) ((x) << FW_CLIP_CMD_FREE_S) 360762306a36Sopenharmony_ci#define FW_CLIP_CMD_FREE_F FW_CLIP_CMD_FREE_V(1U) 360862306a36Sopenharmony_ci 360962306a36Sopenharmony_cienum fw_error_type { 361062306a36Sopenharmony_ci FW_ERROR_TYPE_EXCEPTION = 0x0, 361162306a36Sopenharmony_ci FW_ERROR_TYPE_HWMODULE = 0x1, 361262306a36Sopenharmony_ci FW_ERROR_TYPE_WR = 0x2, 361362306a36Sopenharmony_ci FW_ERROR_TYPE_ACL = 0x3, 361462306a36Sopenharmony_ci}; 361562306a36Sopenharmony_ci 361662306a36Sopenharmony_cistruct fw_error_cmd { 361762306a36Sopenharmony_ci __be32 op_to_type; 361862306a36Sopenharmony_ci __be32 len16_pkd; 361962306a36Sopenharmony_ci union fw_error { 362062306a36Sopenharmony_ci struct fw_error_exception { 362162306a36Sopenharmony_ci __be32 info[6]; 362262306a36Sopenharmony_ci } exception; 362362306a36Sopenharmony_ci struct fw_error_hwmodule { 362462306a36Sopenharmony_ci __be32 regaddr; 362562306a36Sopenharmony_ci __be32 regval; 362662306a36Sopenharmony_ci } hwmodule; 362762306a36Sopenharmony_ci struct fw_error_wr { 362862306a36Sopenharmony_ci __be16 cidx; 362962306a36Sopenharmony_ci __be16 pfn_vfn; 363062306a36Sopenharmony_ci __be32 eqid; 363162306a36Sopenharmony_ci u8 wrhdr[16]; 363262306a36Sopenharmony_ci } wr; 363362306a36Sopenharmony_ci struct fw_error_acl { 363462306a36Sopenharmony_ci __be16 cidx; 363562306a36Sopenharmony_ci __be16 pfn_vfn; 363662306a36Sopenharmony_ci __be32 eqid; 363762306a36Sopenharmony_ci __be16 mv_pkd; 363862306a36Sopenharmony_ci u8 val[6]; 363962306a36Sopenharmony_ci __be64 r4; 364062306a36Sopenharmony_ci } acl; 364162306a36Sopenharmony_ci } u; 364262306a36Sopenharmony_ci}; 364362306a36Sopenharmony_ci 364462306a36Sopenharmony_cistruct fw_debug_cmd { 364562306a36Sopenharmony_ci __be32 op_type; 364662306a36Sopenharmony_ci __be32 len16_pkd; 364762306a36Sopenharmony_ci union fw_debug { 364862306a36Sopenharmony_ci struct fw_debug_assert { 364962306a36Sopenharmony_ci __be32 fcid; 365062306a36Sopenharmony_ci __be32 line; 365162306a36Sopenharmony_ci __be32 x; 365262306a36Sopenharmony_ci __be32 y; 365362306a36Sopenharmony_ci u8 filename_0_7[8]; 365462306a36Sopenharmony_ci u8 filename_8_15[8]; 365562306a36Sopenharmony_ci __be64 r3; 365662306a36Sopenharmony_ci } assert; 365762306a36Sopenharmony_ci struct fw_debug_prt { 365862306a36Sopenharmony_ci __be16 dprtstridx; 365962306a36Sopenharmony_ci __be16 r3[3]; 366062306a36Sopenharmony_ci __be32 dprtstrparam0; 366162306a36Sopenharmony_ci __be32 dprtstrparam1; 366262306a36Sopenharmony_ci __be32 dprtstrparam2; 366362306a36Sopenharmony_ci __be32 dprtstrparam3; 366462306a36Sopenharmony_ci } prt; 366562306a36Sopenharmony_ci } u; 366662306a36Sopenharmony_ci}; 366762306a36Sopenharmony_ci 366862306a36Sopenharmony_ci#define FW_DEBUG_CMD_TYPE_S 0 366962306a36Sopenharmony_ci#define FW_DEBUG_CMD_TYPE_M 0xff 367062306a36Sopenharmony_ci#define FW_DEBUG_CMD_TYPE_G(x) \ 367162306a36Sopenharmony_ci (((x) >> FW_DEBUG_CMD_TYPE_S) & FW_DEBUG_CMD_TYPE_M) 367262306a36Sopenharmony_ci 367362306a36Sopenharmony_cistruct fw_hma_cmd { 367462306a36Sopenharmony_ci __be32 op_pkd; 367562306a36Sopenharmony_ci __be32 retval_len16; 367662306a36Sopenharmony_ci __be32 mode_to_pcie_params; 367762306a36Sopenharmony_ci __be32 naddr_size; 367862306a36Sopenharmony_ci __be32 addr_size_pkd; 367962306a36Sopenharmony_ci __be32 r6; 368062306a36Sopenharmony_ci __be64 phy_address[5]; 368162306a36Sopenharmony_ci}; 368262306a36Sopenharmony_ci 368362306a36Sopenharmony_ci#define FW_HMA_CMD_MODE_S 31 368462306a36Sopenharmony_ci#define FW_HMA_CMD_MODE_M 0x1 368562306a36Sopenharmony_ci#define FW_HMA_CMD_MODE_V(x) ((x) << FW_HMA_CMD_MODE_S) 368662306a36Sopenharmony_ci#define FW_HMA_CMD_MODE_G(x) \ 368762306a36Sopenharmony_ci (((x) >> FW_HMA_CMD_MODE_S) & FW_HMA_CMD_MODE_M) 368862306a36Sopenharmony_ci#define FW_HMA_CMD_MODE_F FW_HMA_CMD_MODE_V(1U) 368962306a36Sopenharmony_ci 369062306a36Sopenharmony_ci#define FW_HMA_CMD_SOC_S 30 369162306a36Sopenharmony_ci#define FW_HMA_CMD_SOC_M 0x1 369262306a36Sopenharmony_ci#define FW_HMA_CMD_SOC_V(x) ((x) << FW_HMA_CMD_SOC_S) 369362306a36Sopenharmony_ci#define FW_HMA_CMD_SOC_G(x) (((x) >> FW_HMA_CMD_SOC_S) & FW_HMA_CMD_SOC_M) 369462306a36Sopenharmony_ci#define FW_HMA_CMD_SOC_F FW_HMA_CMD_SOC_V(1U) 369562306a36Sopenharmony_ci 369662306a36Sopenharmony_ci#define FW_HMA_CMD_EOC_S 29 369762306a36Sopenharmony_ci#define FW_HMA_CMD_EOC_M 0x1 369862306a36Sopenharmony_ci#define FW_HMA_CMD_EOC_V(x) ((x) << FW_HMA_CMD_EOC_S) 369962306a36Sopenharmony_ci#define FW_HMA_CMD_EOC_G(x) (((x) >> FW_HMA_CMD_EOC_S) & FW_HMA_CMD_EOC_M) 370062306a36Sopenharmony_ci#define FW_HMA_CMD_EOC_F FW_HMA_CMD_EOC_V(1U) 370162306a36Sopenharmony_ci 370262306a36Sopenharmony_ci#define FW_HMA_CMD_PCIE_PARAMS_S 0 370362306a36Sopenharmony_ci#define FW_HMA_CMD_PCIE_PARAMS_M 0x7ffffff 370462306a36Sopenharmony_ci#define FW_HMA_CMD_PCIE_PARAMS_V(x) ((x) << FW_HMA_CMD_PCIE_PARAMS_S) 370562306a36Sopenharmony_ci#define FW_HMA_CMD_PCIE_PARAMS_G(x) \ 370662306a36Sopenharmony_ci (((x) >> FW_HMA_CMD_PCIE_PARAMS_S) & FW_HMA_CMD_PCIE_PARAMS_M) 370762306a36Sopenharmony_ci 370862306a36Sopenharmony_ci#define FW_HMA_CMD_NADDR_S 12 370962306a36Sopenharmony_ci#define FW_HMA_CMD_NADDR_M 0x3f 371062306a36Sopenharmony_ci#define FW_HMA_CMD_NADDR_V(x) ((x) << FW_HMA_CMD_NADDR_S) 371162306a36Sopenharmony_ci#define FW_HMA_CMD_NADDR_G(x) \ 371262306a36Sopenharmony_ci (((x) >> FW_HMA_CMD_NADDR_S) & FW_HMA_CMD_NADDR_M) 371362306a36Sopenharmony_ci 371462306a36Sopenharmony_ci#define FW_HMA_CMD_SIZE_S 0 371562306a36Sopenharmony_ci#define FW_HMA_CMD_SIZE_M 0xfff 371662306a36Sopenharmony_ci#define FW_HMA_CMD_SIZE_V(x) ((x) << FW_HMA_CMD_SIZE_S) 371762306a36Sopenharmony_ci#define FW_HMA_CMD_SIZE_G(x) \ 371862306a36Sopenharmony_ci (((x) >> FW_HMA_CMD_SIZE_S) & FW_HMA_CMD_SIZE_M) 371962306a36Sopenharmony_ci 372062306a36Sopenharmony_ci#define FW_HMA_CMD_ADDR_SIZE_S 11 372162306a36Sopenharmony_ci#define FW_HMA_CMD_ADDR_SIZE_M 0x1fffff 372262306a36Sopenharmony_ci#define FW_HMA_CMD_ADDR_SIZE_V(x) ((x) << FW_HMA_CMD_ADDR_SIZE_S) 372362306a36Sopenharmony_ci#define FW_HMA_CMD_ADDR_SIZE_G(x) \ 372462306a36Sopenharmony_ci (((x) >> FW_HMA_CMD_ADDR_SIZE_S) & FW_HMA_CMD_ADDR_SIZE_M) 372562306a36Sopenharmony_ci 372662306a36Sopenharmony_cienum pcie_fw_eval { 372762306a36Sopenharmony_ci PCIE_FW_EVAL_CRASH = 0, 372862306a36Sopenharmony_ci}; 372962306a36Sopenharmony_ci 373062306a36Sopenharmony_ci#define PCIE_FW_ERR_S 31 373162306a36Sopenharmony_ci#define PCIE_FW_ERR_V(x) ((x) << PCIE_FW_ERR_S) 373262306a36Sopenharmony_ci#define PCIE_FW_ERR_F PCIE_FW_ERR_V(1U) 373362306a36Sopenharmony_ci 373462306a36Sopenharmony_ci#define PCIE_FW_INIT_S 30 373562306a36Sopenharmony_ci#define PCIE_FW_INIT_V(x) ((x) << PCIE_FW_INIT_S) 373662306a36Sopenharmony_ci#define PCIE_FW_INIT_F PCIE_FW_INIT_V(1U) 373762306a36Sopenharmony_ci 373862306a36Sopenharmony_ci#define PCIE_FW_HALT_S 29 373962306a36Sopenharmony_ci#define PCIE_FW_HALT_V(x) ((x) << PCIE_FW_HALT_S) 374062306a36Sopenharmony_ci#define PCIE_FW_HALT_F PCIE_FW_HALT_V(1U) 374162306a36Sopenharmony_ci 374262306a36Sopenharmony_ci#define PCIE_FW_EVAL_S 24 374362306a36Sopenharmony_ci#define PCIE_FW_EVAL_M 0x7 374462306a36Sopenharmony_ci#define PCIE_FW_EVAL_G(x) (((x) >> PCIE_FW_EVAL_S) & PCIE_FW_EVAL_M) 374562306a36Sopenharmony_ci 374662306a36Sopenharmony_ci#define PCIE_FW_MASTER_VLD_S 15 374762306a36Sopenharmony_ci#define PCIE_FW_MASTER_VLD_V(x) ((x) << PCIE_FW_MASTER_VLD_S) 374862306a36Sopenharmony_ci#define PCIE_FW_MASTER_VLD_F PCIE_FW_MASTER_VLD_V(1U) 374962306a36Sopenharmony_ci 375062306a36Sopenharmony_ci#define PCIE_FW_MASTER_S 12 375162306a36Sopenharmony_ci#define PCIE_FW_MASTER_M 0x7 375262306a36Sopenharmony_ci#define PCIE_FW_MASTER_V(x) ((x) << PCIE_FW_MASTER_S) 375362306a36Sopenharmony_ci#define PCIE_FW_MASTER_G(x) (((x) >> PCIE_FW_MASTER_S) & PCIE_FW_MASTER_M) 375462306a36Sopenharmony_ci 375562306a36Sopenharmony_cistruct fw_hdr { 375662306a36Sopenharmony_ci u8 ver; 375762306a36Sopenharmony_ci u8 chip; /* terminator chip type */ 375862306a36Sopenharmony_ci __be16 len512; /* bin length in units of 512-bytes */ 375962306a36Sopenharmony_ci __be32 fw_ver; /* firmware version */ 376062306a36Sopenharmony_ci __be32 tp_microcode_ver; 376162306a36Sopenharmony_ci u8 intfver_nic; 376262306a36Sopenharmony_ci u8 intfver_vnic; 376362306a36Sopenharmony_ci u8 intfver_ofld; 376462306a36Sopenharmony_ci u8 intfver_ri; 376562306a36Sopenharmony_ci u8 intfver_iscsipdu; 376662306a36Sopenharmony_ci u8 intfver_iscsi; 376762306a36Sopenharmony_ci u8 intfver_fcoepdu; 376862306a36Sopenharmony_ci u8 intfver_fcoe; 376962306a36Sopenharmony_ci __u32 reserved2; 377062306a36Sopenharmony_ci __u32 reserved3; 377162306a36Sopenharmony_ci __u32 reserved4; 377262306a36Sopenharmony_ci __be32 flags; 377362306a36Sopenharmony_ci __be32 reserved6[23]; 377462306a36Sopenharmony_ci}; 377562306a36Sopenharmony_ci 377662306a36Sopenharmony_cienum fw_hdr_chip { 377762306a36Sopenharmony_ci FW_HDR_CHIP_T4, 377862306a36Sopenharmony_ci FW_HDR_CHIP_T5, 377962306a36Sopenharmony_ci FW_HDR_CHIP_T6 378062306a36Sopenharmony_ci}; 378162306a36Sopenharmony_ci 378262306a36Sopenharmony_ci#define FW_HDR_FW_VER_MAJOR_S 24 378362306a36Sopenharmony_ci#define FW_HDR_FW_VER_MAJOR_M 0xff 378462306a36Sopenharmony_ci#define FW_HDR_FW_VER_MAJOR_V(x) \ 378562306a36Sopenharmony_ci ((x) << FW_HDR_FW_VER_MAJOR_S) 378662306a36Sopenharmony_ci#define FW_HDR_FW_VER_MAJOR_G(x) \ 378762306a36Sopenharmony_ci (((x) >> FW_HDR_FW_VER_MAJOR_S) & FW_HDR_FW_VER_MAJOR_M) 378862306a36Sopenharmony_ci 378962306a36Sopenharmony_ci#define FW_HDR_FW_VER_MINOR_S 16 379062306a36Sopenharmony_ci#define FW_HDR_FW_VER_MINOR_M 0xff 379162306a36Sopenharmony_ci#define FW_HDR_FW_VER_MINOR_V(x) \ 379262306a36Sopenharmony_ci ((x) << FW_HDR_FW_VER_MINOR_S) 379362306a36Sopenharmony_ci#define FW_HDR_FW_VER_MINOR_G(x) \ 379462306a36Sopenharmony_ci (((x) >> FW_HDR_FW_VER_MINOR_S) & FW_HDR_FW_VER_MINOR_M) 379562306a36Sopenharmony_ci 379662306a36Sopenharmony_ci#define FW_HDR_FW_VER_MICRO_S 8 379762306a36Sopenharmony_ci#define FW_HDR_FW_VER_MICRO_M 0xff 379862306a36Sopenharmony_ci#define FW_HDR_FW_VER_MICRO_V(x) \ 379962306a36Sopenharmony_ci ((x) << FW_HDR_FW_VER_MICRO_S) 380062306a36Sopenharmony_ci#define FW_HDR_FW_VER_MICRO_G(x) \ 380162306a36Sopenharmony_ci (((x) >> FW_HDR_FW_VER_MICRO_S) & FW_HDR_FW_VER_MICRO_M) 380262306a36Sopenharmony_ci 380362306a36Sopenharmony_ci#define FW_HDR_FW_VER_BUILD_S 0 380462306a36Sopenharmony_ci#define FW_HDR_FW_VER_BUILD_M 0xff 380562306a36Sopenharmony_ci#define FW_HDR_FW_VER_BUILD_V(x) \ 380662306a36Sopenharmony_ci ((x) << FW_HDR_FW_VER_BUILD_S) 380762306a36Sopenharmony_ci#define FW_HDR_FW_VER_BUILD_G(x) \ 380862306a36Sopenharmony_ci (((x) >> FW_HDR_FW_VER_BUILD_S) & FW_HDR_FW_VER_BUILD_M) 380962306a36Sopenharmony_ci 381062306a36Sopenharmony_cienum fw_hdr_intfver { 381162306a36Sopenharmony_ci FW_HDR_INTFVER_NIC = 0x00, 381262306a36Sopenharmony_ci FW_HDR_INTFVER_VNIC = 0x00, 381362306a36Sopenharmony_ci FW_HDR_INTFVER_OFLD = 0x00, 381462306a36Sopenharmony_ci FW_HDR_INTFVER_RI = 0x00, 381562306a36Sopenharmony_ci FW_HDR_INTFVER_ISCSIPDU = 0x00, 381662306a36Sopenharmony_ci FW_HDR_INTFVER_ISCSI = 0x00, 381762306a36Sopenharmony_ci FW_HDR_INTFVER_FCOEPDU = 0x00, 381862306a36Sopenharmony_ci FW_HDR_INTFVER_FCOE = 0x00, 381962306a36Sopenharmony_ci}; 382062306a36Sopenharmony_ci 382162306a36Sopenharmony_cienum fw_hdr_flags { 382262306a36Sopenharmony_ci FW_HDR_FLAGS_RESET_HALT = 0x00000001, 382362306a36Sopenharmony_ci}; 382462306a36Sopenharmony_ci 382562306a36Sopenharmony_ci/* length of the formatting string */ 382662306a36Sopenharmony_ci#define FW_DEVLOG_FMT_LEN 192 382762306a36Sopenharmony_ci 382862306a36Sopenharmony_ci/* maximum number of the formatting string parameters */ 382962306a36Sopenharmony_ci#define FW_DEVLOG_FMT_PARAMS_NUM 8 383062306a36Sopenharmony_ci 383162306a36Sopenharmony_ci/* priority levels */ 383262306a36Sopenharmony_cienum fw_devlog_level { 383362306a36Sopenharmony_ci FW_DEVLOG_LEVEL_EMERG = 0x0, 383462306a36Sopenharmony_ci FW_DEVLOG_LEVEL_CRIT = 0x1, 383562306a36Sopenharmony_ci FW_DEVLOG_LEVEL_ERR = 0x2, 383662306a36Sopenharmony_ci FW_DEVLOG_LEVEL_NOTICE = 0x3, 383762306a36Sopenharmony_ci FW_DEVLOG_LEVEL_INFO = 0x4, 383862306a36Sopenharmony_ci FW_DEVLOG_LEVEL_DEBUG = 0x5, 383962306a36Sopenharmony_ci FW_DEVLOG_LEVEL_MAX = 0x5, 384062306a36Sopenharmony_ci}; 384162306a36Sopenharmony_ci 384262306a36Sopenharmony_ci/* facilities that may send a log message */ 384362306a36Sopenharmony_cienum fw_devlog_facility { 384462306a36Sopenharmony_ci FW_DEVLOG_FACILITY_CORE = 0x00, 384562306a36Sopenharmony_ci FW_DEVLOG_FACILITY_CF = 0x01, 384662306a36Sopenharmony_ci FW_DEVLOG_FACILITY_SCHED = 0x02, 384762306a36Sopenharmony_ci FW_DEVLOG_FACILITY_TIMER = 0x04, 384862306a36Sopenharmony_ci FW_DEVLOG_FACILITY_RES = 0x06, 384962306a36Sopenharmony_ci FW_DEVLOG_FACILITY_HW = 0x08, 385062306a36Sopenharmony_ci FW_DEVLOG_FACILITY_FLR = 0x10, 385162306a36Sopenharmony_ci FW_DEVLOG_FACILITY_DMAQ = 0x12, 385262306a36Sopenharmony_ci FW_DEVLOG_FACILITY_PHY = 0x14, 385362306a36Sopenharmony_ci FW_DEVLOG_FACILITY_MAC = 0x16, 385462306a36Sopenharmony_ci FW_DEVLOG_FACILITY_PORT = 0x18, 385562306a36Sopenharmony_ci FW_DEVLOG_FACILITY_VI = 0x1A, 385662306a36Sopenharmony_ci FW_DEVLOG_FACILITY_FILTER = 0x1C, 385762306a36Sopenharmony_ci FW_DEVLOG_FACILITY_ACL = 0x1E, 385862306a36Sopenharmony_ci FW_DEVLOG_FACILITY_TM = 0x20, 385962306a36Sopenharmony_ci FW_DEVLOG_FACILITY_QFC = 0x22, 386062306a36Sopenharmony_ci FW_DEVLOG_FACILITY_DCB = 0x24, 386162306a36Sopenharmony_ci FW_DEVLOG_FACILITY_ETH = 0x26, 386262306a36Sopenharmony_ci FW_DEVLOG_FACILITY_OFLD = 0x28, 386362306a36Sopenharmony_ci FW_DEVLOG_FACILITY_RI = 0x2A, 386462306a36Sopenharmony_ci FW_DEVLOG_FACILITY_ISCSI = 0x2C, 386562306a36Sopenharmony_ci FW_DEVLOG_FACILITY_FCOE = 0x2E, 386662306a36Sopenharmony_ci FW_DEVLOG_FACILITY_FOISCSI = 0x30, 386762306a36Sopenharmony_ci FW_DEVLOG_FACILITY_FOFCOE = 0x32, 386862306a36Sopenharmony_ci FW_DEVLOG_FACILITY_CHNET = 0x34, 386962306a36Sopenharmony_ci FW_DEVLOG_FACILITY_MAX = 0x34, 387062306a36Sopenharmony_ci}; 387162306a36Sopenharmony_ci 387262306a36Sopenharmony_ci/* log message format */ 387362306a36Sopenharmony_cistruct fw_devlog_e { 387462306a36Sopenharmony_ci __be64 timestamp; 387562306a36Sopenharmony_ci __be32 seqno; 387662306a36Sopenharmony_ci __be16 reserved1; 387762306a36Sopenharmony_ci __u8 level; 387862306a36Sopenharmony_ci __u8 facility; 387962306a36Sopenharmony_ci __u8 fmt[FW_DEVLOG_FMT_LEN]; 388062306a36Sopenharmony_ci __be32 params[FW_DEVLOG_FMT_PARAMS_NUM]; 388162306a36Sopenharmony_ci __be32 reserved3[4]; 388262306a36Sopenharmony_ci}; 388362306a36Sopenharmony_ci 388462306a36Sopenharmony_cistruct fw_devlog_cmd { 388562306a36Sopenharmony_ci __be32 op_to_write; 388662306a36Sopenharmony_ci __be32 retval_len16; 388762306a36Sopenharmony_ci __u8 level; 388862306a36Sopenharmony_ci __u8 r2[7]; 388962306a36Sopenharmony_ci __be32 memtype_devlog_memaddr16_devlog; 389062306a36Sopenharmony_ci __be32 memsize_devlog; 389162306a36Sopenharmony_ci __be32 r3[2]; 389262306a36Sopenharmony_ci}; 389362306a36Sopenharmony_ci 389462306a36Sopenharmony_ci#define FW_DEVLOG_CMD_MEMTYPE_DEVLOG_S 28 389562306a36Sopenharmony_ci#define FW_DEVLOG_CMD_MEMTYPE_DEVLOG_M 0xf 389662306a36Sopenharmony_ci#define FW_DEVLOG_CMD_MEMTYPE_DEVLOG_G(x) \ 389762306a36Sopenharmony_ci (((x) >> FW_DEVLOG_CMD_MEMTYPE_DEVLOG_S) & \ 389862306a36Sopenharmony_ci FW_DEVLOG_CMD_MEMTYPE_DEVLOG_M) 389962306a36Sopenharmony_ci 390062306a36Sopenharmony_ci#define FW_DEVLOG_CMD_MEMADDR16_DEVLOG_S 0 390162306a36Sopenharmony_ci#define FW_DEVLOG_CMD_MEMADDR16_DEVLOG_M 0xfffffff 390262306a36Sopenharmony_ci#define FW_DEVLOG_CMD_MEMADDR16_DEVLOG_G(x) \ 390362306a36Sopenharmony_ci (((x) >> FW_DEVLOG_CMD_MEMADDR16_DEVLOG_S) & \ 390462306a36Sopenharmony_ci FW_DEVLOG_CMD_MEMADDR16_DEVLOG_M) 390562306a36Sopenharmony_ci 390662306a36Sopenharmony_ci/* P C I E F W P F 7 R E G I S T E R */ 390762306a36Sopenharmony_ci 390862306a36Sopenharmony_ci/* PF7 stores the Firmware Device Log parameters which allows Host Drivers to 390962306a36Sopenharmony_ci * access the "devlog" which needing to contact firmware. The encoding is 391062306a36Sopenharmony_ci * mostly the same as that returned by the DEVLOG command except for the size 391162306a36Sopenharmony_ci * which is encoded as the number of entries in multiples-1 of 128 here rather 391262306a36Sopenharmony_ci * than the memory size as is done in the DEVLOG command. Thus, 0 means 128 391362306a36Sopenharmony_ci * and 15 means 2048. This of course in turn constrains the allowed values 391462306a36Sopenharmony_ci * for the devlog size ... 391562306a36Sopenharmony_ci */ 391662306a36Sopenharmony_ci#define PCIE_FW_PF_DEVLOG 7 391762306a36Sopenharmony_ci 391862306a36Sopenharmony_ci#define PCIE_FW_PF_DEVLOG_NENTRIES128_S 28 391962306a36Sopenharmony_ci#define PCIE_FW_PF_DEVLOG_NENTRIES128_M 0xf 392062306a36Sopenharmony_ci#define PCIE_FW_PF_DEVLOG_NENTRIES128_V(x) \ 392162306a36Sopenharmony_ci ((x) << PCIE_FW_PF_DEVLOG_NENTRIES128_S) 392262306a36Sopenharmony_ci#define PCIE_FW_PF_DEVLOG_NENTRIES128_G(x) \ 392362306a36Sopenharmony_ci (((x) >> PCIE_FW_PF_DEVLOG_NENTRIES128_S) & \ 392462306a36Sopenharmony_ci PCIE_FW_PF_DEVLOG_NENTRIES128_M) 392562306a36Sopenharmony_ci 392662306a36Sopenharmony_ci#define PCIE_FW_PF_DEVLOG_ADDR16_S 4 392762306a36Sopenharmony_ci#define PCIE_FW_PF_DEVLOG_ADDR16_M 0xffffff 392862306a36Sopenharmony_ci#define PCIE_FW_PF_DEVLOG_ADDR16_V(x) ((x) << PCIE_FW_PF_DEVLOG_ADDR16_S) 392962306a36Sopenharmony_ci#define PCIE_FW_PF_DEVLOG_ADDR16_G(x) \ 393062306a36Sopenharmony_ci (((x) >> PCIE_FW_PF_DEVLOG_ADDR16_S) & PCIE_FW_PF_DEVLOG_ADDR16_M) 393162306a36Sopenharmony_ci 393262306a36Sopenharmony_ci#define PCIE_FW_PF_DEVLOG_MEMTYPE_S 0 393362306a36Sopenharmony_ci#define PCIE_FW_PF_DEVLOG_MEMTYPE_M 0xf 393462306a36Sopenharmony_ci#define PCIE_FW_PF_DEVLOG_MEMTYPE_V(x) ((x) << PCIE_FW_PF_DEVLOG_MEMTYPE_S) 393562306a36Sopenharmony_ci#define PCIE_FW_PF_DEVLOG_MEMTYPE_G(x) \ 393662306a36Sopenharmony_ci (((x) >> PCIE_FW_PF_DEVLOG_MEMTYPE_S) & PCIE_FW_PF_DEVLOG_MEMTYPE_M) 393762306a36Sopenharmony_ci 393862306a36Sopenharmony_ci#define MAX_IMM_OFLD_TX_DATA_WR_LEN (0xff + sizeof(struct fw_ofld_tx_data_wr)) 393962306a36Sopenharmony_ci 394062306a36Sopenharmony_cistruct fw_crypto_lookaside_wr { 394162306a36Sopenharmony_ci __be32 op_to_cctx_size; 394262306a36Sopenharmony_ci __be32 len16_pkd; 394362306a36Sopenharmony_ci __be32 session_id; 394462306a36Sopenharmony_ci __be32 rx_chid_to_rx_q_id; 394562306a36Sopenharmony_ci __be32 key_addr; 394662306a36Sopenharmony_ci __be32 pld_size_hash_size; 394762306a36Sopenharmony_ci __be64 cookie; 394862306a36Sopenharmony_ci}; 394962306a36Sopenharmony_ci 395062306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_OPCODE_S 24 395162306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_OPCODE_M 0xff 395262306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_OPCODE_V(x) \ 395362306a36Sopenharmony_ci ((x) << FW_CRYPTO_LOOKASIDE_WR_OPCODE_S) 395462306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_OPCODE_G(x) \ 395562306a36Sopenharmony_ci (((x) >> FW_CRYPTO_LOOKASIDE_WR_OPCODE_S) & \ 395662306a36Sopenharmony_ci FW_CRYPTO_LOOKASIDE_WR_OPCODE_M) 395762306a36Sopenharmony_ci 395862306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_COMPL_S 23 395962306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_COMPL_M 0x1 396062306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_COMPL_V(x) \ 396162306a36Sopenharmony_ci ((x) << FW_CRYPTO_LOOKASIDE_WR_COMPL_S) 396262306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_COMPL_G(x) \ 396362306a36Sopenharmony_ci (((x) >> FW_CRYPTO_LOOKASIDE_WR_COMPL_S) & \ 396462306a36Sopenharmony_ci FW_CRYPTO_LOOKASIDE_WR_COMPL_M) 396562306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_COMPL_F FW_CRYPTO_LOOKASIDE_WR_COMPL_V(1U) 396662306a36Sopenharmony_ci 396762306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_IMM_LEN_S 15 396862306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_IMM_LEN_M 0xff 396962306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_IMM_LEN_V(x) \ 397062306a36Sopenharmony_ci ((x) << FW_CRYPTO_LOOKASIDE_WR_IMM_LEN_S) 397162306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_IMM_LEN_G(x) \ 397262306a36Sopenharmony_ci (((x) >> FW_CRYPTO_LOOKASIDE_WR_IMM_LEN_S) & \ 397362306a36Sopenharmony_ci FW_CRYPTO_LOOKASIDE_WR_IMM_LEN_M) 397462306a36Sopenharmony_ci 397562306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_CCTX_LOC_S 5 397662306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_CCTX_LOC_M 0x3 397762306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_CCTX_LOC_V(x) \ 397862306a36Sopenharmony_ci ((x) << FW_CRYPTO_LOOKASIDE_WR_CCTX_LOC_S) 397962306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_CCTX_LOC_G(x) \ 398062306a36Sopenharmony_ci (((x) >> FW_CRYPTO_LOOKASIDE_WR_CCTX_LOC_S) & \ 398162306a36Sopenharmony_ci FW_CRYPTO_LOOKASIDE_WR_CCTX_LOC_M) 398262306a36Sopenharmony_ci 398362306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_CCTX_SIZE_S 0 398462306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_CCTX_SIZE_M 0x1f 398562306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_CCTX_SIZE_V(x) \ 398662306a36Sopenharmony_ci ((x) << FW_CRYPTO_LOOKASIDE_WR_CCTX_SIZE_S) 398762306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_CCTX_SIZE_G(x) \ 398862306a36Sopenharmony_ci (((x) >> FW_CRYPTO_LOOKASIDE_WR_CCTX_SIZE_S) & \ 398962306a36Sopenharmony_ci FW_CRYPTO_LOOKASIDE_WR_CCTX_SIZE_M) 399062306a36Sopenharmony_ci 399162306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_LEN16_S 0 399262306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_LEN16_M 0xff 399362306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_LEN16_V(x) \ 399462306a36Sopenharmony_ci ((x) << FW_CRYPTO_LOOKASIDE_WR_LEN16_S) 399562306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_LEN16_G(x) \ 399662306a36Sopenharmony_ci (((x) >> FW_CRYPTO_LOOKASIDE_WR_LEN16_S) & \ 399762306a36Sopenharmony_ci FW_CRYPTO_LOOKASIDE_WR_LEN16_M) 399862306a36Sopenharmony_ci 399962306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_RX_CHID_S 29 400062306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_RX_CHID_M 0x3 400162306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_RX_CHID_V(x) \ 400262306a36Sopenharmony_ci ((x) << FW_CRYPTO_LOOKASIDE_WR_RX_CHID_S) 400362306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_RX_CHID_G(x) \ 400462306a36Sopenharmony_ci (((x) >> FW_CRYPTO_LOOKASIDE_WR_RX_CHID_S) & \ 400562306a36Sopenharmony_ci FW_CRYPTO_LOOKASIDE_WR_RX_CHID_M) 400662306a36Sopenharmony_ci 400762306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_LCB_S 27 400862306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_LCB_M 0x3 400962306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_LCB_V(x) \ 401062306a36Sopenharmony_ci ((x) << FW_CRYPTO_LOOKASIDE_WR_LCB_S) 401162306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_LCB_G(x) \ 401262306a36Sopenharmony_ci (((x) >> FW_CRYPTO_LOOKASIDE_WR_LCB_S) & FW_CRYPTO_LOOKASIDE_WR_LCB_M) 401362306a36Sopenharmony_ci 401462306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_PHASH_S 25 401562306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_PHASH_M 0x3 401662306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_PHASH_V(x) \ 401762306a36Sopenharmony_ci ((x) << FW_CRYPTO_LOOKASIDE_WR_PHASH_S) 401862306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_PHASH_G(x) \ 401962306a36Sopenharmony_ci (((x) >> FW_CRYPTO_LOOKASIDE_WR_PHASH_S) & \ 402062306a36Sopenharmony_ci FW_CRYPTO_LOOKASIDE_WR_PHASH_M) 402162306a36Sopenharmony_ci 402262306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_IV_S 23 402362306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_IV_M 0x3 402462306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_IV_V(x) \ 402562306a36Sopenharmony_ci ((x) << FW_CRYPTO_LOOKASIDE_WR_IV_S) 402662306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_IV_G(x) \ 402762306a36Sopenharmony_ci (((x) >> FW_CRYPTO_LOOKASIDE_WR_IV_S) & FW_CRYPTO_LOOKASIDE_WR_IV_M) 402862306a36Sopenharmony_ci 402962306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_FQIDX_S 15 403062306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_FQIDX_M 0xff 403162306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_FQIDX_V(x) \ 403262306a36Sopenharmony_ci ((x) << FW_CRYPTO_LOOKASIDE_WR_FQIDX_S) 403362306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_FQIDX_G(x) \ 403462306a36Sopenharmony_ci (((x) >> FW_CRYPTO_LOOKASIDE_WR_FQIDX_S) & \ 403562306a36Sopenharmony_ci FW_CRYPTO_LOOKASIDE_WR_FQIDX_M) 403662306a36Sopenharmony_ci 403762306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_TX_CH_S 10 403862306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_TX_CH_M 0x3 403962306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_TX_CH_V(x) \ 404062306a36Sopenharmony_ci ((x) << FW_CRYPTO_LOOKASIDE_WR_TX_CH_S) 404162306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_TX_CH_G(x) \ 404262306a36Sopenharmony_ci (((x) >> FW_CRYPTO_LOOKASIDE_WR_TX_CH_S) & \ 404362306a36Sopenharmony_ci FW_CRYPTO_LOOKASIDE_WR_TX_CH_M) 404462306a36Sopenharmony_ci 404562306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_RX_Q_ID_S 0 404662306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_RX_Q_ID_M 0x3ff 404762306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_RX_Q_ID_V(x) \ 404862306a36Sopenharmony_ci ((x) << FW_CRYPTO_LOOKASIDE_WR_RX_Q_ID_S) 404962306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_RX_Q_ID_G(x) \ 405062306a36Sopenharmony_ci (((x) >> FW_CRYPTO_LOOKASIDE_WR_RX_Q_ID_S) & \ 405162306a36Sopenharmony_ci FW_CRYPTO_LOOKASIDE_WR_RX_Q_ID_M) 405262306a36Sopenharmony_ci 405362306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_PLD_SIZE_S 24 405462306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_PLD_SIZE_M 0xff 405562306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_PLD_SIZE_V(x) \ 405662306a36Sopenharmony_ci ((x) << FW_CRYPTO_LOOKASIDE_WR_PLD_SIZE_S) 405762306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_PLD_SIZE_G(x) \ 405862306a36Sopenharmony_ci (((x) >> FW_CRYPTO_LOOKASIDE_WR_PLD_SIZE_S) & \ 405962306a36Sopenharmony_ci FW_CRYPTO_LOOKASIDE_WR_PLD_SIZE_M) 406062306a36Sopenharmony_ci 406162306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_HASH_SIZE_S 17 406262306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_HASH_SIZE_M 0x7f 406362306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_HASH_SIZE_V(x) \ 406462306a36Sopenharmony_ci ((x) << FW_CRYPTO_LOOKASIDE_WR_HASH_SIZE_S) 406562306a36Sopenharmony_ci#define FW_CRYPTO_LOOKASIDE_WR_HASH_SIZE_G(x) \ 406662306a36Sopenharmony_ci (((x) >> FW_CRYPTO_LOOKASIDE_WR_HASH_SIZE_S) & \ 406762306a36Sopenharmony_ci FW_CRYPTO_LOOKASIDE_WR_HASH_SIZE_M) 406862306a36Sopenharmony_ci 406962306a36Sopenharmony_cistruct fw_tlstx_data_wr { 407062306a36Sopenharmony_ci __be32 op_to_immdlen; 407162306a36Sopenharmony_ci __be32 flowid_len16; 407262306a36Sopenharmony_ci __be32 plen; 407362306a36Sopenharmony_ci __be32 lsodisable_to_flags; 407462306a36Sopenharmony_ci __be32 r5; 407562306a36Sopenharmony_ci __be32 ctxloc_to_exp; 407662306a36Sopenharmony_ci __be16 mfs; 407762306a36Sopenharmony_ci __be16 adjustedplen_pkd; 407862306a36Sopenharmony_ci __be16 expinplenmax_pkd; 407962306a36Sopenharmony_ci u8 pdusinplenmax_pkd; 408062306a36Sopenharmony_ci u8 r10; 408162306a36Sopenharmony_ci}; 408262306a36Sopenharmony_ci 408362306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_OPCODE_S 24 408462306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_OPCODE_M 0xff 408562306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_OPCODE_V(x) ((x) << FW_TLSTX_DATA_WR_OPCODE_S) 408662306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_OPCODE_G(x) \ 408762306a36Sopenharmony_ci (((x) >> FW_TLSTX_DATA_WR_OPCODE_S) & FW_TLSTX_DATA_WR_OPCODE_M) 408862306a36Sopenharmony_ci 408962306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_COMPL_S 21 409062306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_COMPL_M 0x1 409162306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_COMPL_V(x) ((x) << FW_TLSTX_DATA_WR_COMPL_S) 409262306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_COMPL_G(x) \ 409362306a36Sopenharmony_ci (((x) >> FW_TLSTX_DATA_WR_COMPL_S) & FW_TLSTX_DATA_WR_COMPL_M) 409462306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_COMPL_F FW_TLSTX_DATA_WR_COMPL_V(1U) 409562306a36Sopenharmony_ci 409662306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_IMMDLEN_S 0 409762306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_IMMDLEN_M 0xff 409862306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_IMMDLEN_V(x) ((x) << FW_TLSTX_DATA_WR_IMMDLEN_S) 409962306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_IMMDLEN_G(x) \ 410062306a36Sopenharmony_ci (((x) >> FW_TLSTX_DATA_WR_IMMDLEN_S) & FW_TLSTX_DATA_WR_IMMDLEN_M) 410162306a36Sopenharmony_ci 410262306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_FLOWID_S 8 410362306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_FLOWID_M 0xfffff 410462306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_FLOWID_V(x) ((x) << FW_TLSTX_DATA_WR_FLOWID_S) 410562306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_FLOWID_G(x) \ 410662306a36Sopenharmony_ci (((x) >> FW_TLSTX_DATA_WR_FLOWID_S) & FW_TLSTX_DATA_WR_FLOWID_M) 410762306a36Sopenharmony_ci 410862306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_LEN16_S 0 410962306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_LEN16_M 0xff 411062306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_LEN16_V(x) ((x) << FW_TLSTX_DATA_WR_LEN16_S) 411162306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_LEN16_G(x) \ 411262306a36Sopenharmony_ci (((x) >> FW_TLSTX_DATA_WR_LEN16_S) & FW_TLSTX_DATA_WR_LEN16_M) 411362306a36Sopenharmony_ci 411462306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_LSODISABLE_S 31 411562306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_LSODISABLE_M 0x1 411662306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_LSODISABLE_V(x) \ 411762306a36Sopenharmony_ci ((x) << FW_TLSTX_DATA_WR_LSODISABLE_S) 411862306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_LSODISABLE_G(x) \ 411962306a36Sopenharmony_ci (((x) >> FW_TLSTX_DATA_WR_LSODISABLE_S) & FW_TLSTX_DATA_WR_LSODISABLE_M) 412062306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_LSODISABLE_F FW_TLSTX_DATA_WR_LSODISABLE_V(1U) 412162306a36Sopenharmony_ci 412262306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_ALIGNPLD_S 30 412362306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_ALIGNPLD_M 0x1 412462306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_ALIGNPLD_V(x) ((x) << FW_TLSTX_DATA_WR_ALIGNPLD_S) 412562306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_ALIGNPLD_G(x) \ 412662306a36Sopenharmony_ci (((x) >> FW_TLSTX_DATA_WR_ALIGNPLD_S) & FW_TLSTX_DATA_WR_ALIGNPLD_M) 412762306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_ALIGNPLD_F FW_TLSTX_DATA_WR_ALIGNPLD_V(1U) 412862306a36Sopenharmony_ci 412962306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_ALIGNPLDSHOVE_S 29 413062306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_ALIGNPLDSHOVE_M 0x1 413162306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_ALIGNPLDSHOVE_V(x) \ 413262306a36Sopenharmony_ci ((x) << FW_TLSTX_DATA_WR_ALIGNPLDSHOVE_S) 413362306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_ALIGNPLDSHOVE_G(x) \ 413462306a36Sopenharmony_ci (((x) >> FW_TLSTX_DATA_WR_ALIGNPLDSHOVE_S) & \ 413562306a36Sopenharmony_ci FW_TLSTX_DATA_WR_ALIGNPLDSHOVE_M) 413662306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_ALIGNPLDSHOVE_F FW_TLSTX_DATA_WR_ALIGNPLDSHOVE_V(1U) 413762306a36Sopenharmony_ci 413862306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_FLAGS_S 0 413962306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_FLAGS_M 0xfffffff 414062306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_FLAGS_V(x) ((x) << FW_TLSTX_DATA_WR_FLAGS_S) 414162306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_FLAGS_G(x) \ 414262306a36Sopenharmony_ci (((x) >> FW_TLSTX_DATA_WR_FLAGS_S) & FW_TLSTX_DATA_WR_FLAGS_M) 414362306a36Sopenharmony_ci 414462306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_CTXLOC_S 30 414562306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_CTXLOC_M 0x3 414662306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_CTXLOC_V(x) ((x) << FW_TLSTX_DATA_WR_CTXLOC_S) 414762306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_CTXLOC_G(x) \ 414862306a36Sopenharmony_ci (((x) >> FW_TLSTX_DATA_WR_CTXLOC_S) & FW_TLSTX_DATA_WR_CTXLOC_M) 414962306a36Sopenharmony_ci 415062306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_IVDSGL_S 29 415162306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_IVDSGL_M 0x1 415262306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_IVDSGL_V(x) ((x) << FW_TLSTX_DATA_WR_IVDSGL_S) 415362306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_IVDSGL_G(x) \ 415462306a36Sopenharmony_ci (((x) >> FW_TLSTX_DATA_WR_IVDSGL_S) & FW_TLSTX_DATA_WR_IVDSGL_M) 415562306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_IVDSGL_F FW_TLSTX_DATA_WR_IVDSGL_V(1U) 415662306a36Sopenharmony_ci 415762306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_KEYSIZE_S 24 415862306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_KEYSIZE_M 0x1f 415962306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_KEYSIZE_V(x) ((x) << FW_TLSTX_DATA_WR_KEYSIZE_S) 416062306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_KEYSIZE_G(x) \ 416162306a36Sopenharmony_ci (((x) >> FW_TLSTX_DATA_WR_KEYSIZE_S) & FW_TLSTX_DATA_WR_KEYSIZE_M) 416262306a36Sopenharmony_ci 416362306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_NUMIVS_S 14 416462306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_NUMIVS_M 0xff 416562306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_NUMIVS_V(x) ((x) << FW_TLSTX_DATA_WR_NUMIVS_S) 416662306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_NUMIVS_G(x) \ 416762306a36Sopenharmony_ci (((x) >> FW_TLSTX_DATA_WR_NUMIVS_S) & FW_TLSTX_DATA_WR_NUMIVS_M) 416862306a36Sopenharmony_ci 416962306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_EXP_S 0 417062306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_EXP_M 0x3fff 417162306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_EXP_V(x) ((x) << FW_TLSTX_DATA_WR_EXP_S) 417262306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_EXP_G(x) \ 417362306a36Sopenharmony_ci (((x) >> FW_TLSTX_DATA_WR_EXP_S) & FW_TLSTX_DATA_WR_EXP_M) 417462306a36Sopenharmony_ci 417562306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_ADJUSTEDPLEN_S 1 417662306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_ADJUSTEDPLEN_V(x) \ 417762306a36Sopenharmony_ci ((x) << FW_TLSTX_DATA_WR_ADJUSTEDPLEN_S) 417862306a36Sopenharmony_ci 417962306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_EXPINPLENMAX_S 4 418062306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_EXPINPLENMAX_V(x) \ 418162306a36Sopenharmony_ci ((x) << FW_TLSTX_DATA_WR_EXPINPLENMAX_S) 418262306a36Sopenharmony_ci 418362306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_PDUSINPLENMAX_S 2 418462306a36Sopenharmony_ci#define FW_TLSTX_DATA_WR_PDUSINPLENMAX_V(x) \ 418562306a36Sopenharmony_ci ((x) << FW_TLSTX_DATA_WR_PDUSINPLENMAX_S) 418662306a36Sopenharmony_ci 418762306a36Sopenharmony_ci#endif /* _T4FW_INTERFACE_H_ */ 4188