18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (C) 2005-2016 Broadcom. 48c2ecf20Sopenharmony_ci * All rights reserved. 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * Contact Information: 78c2ecf20Sopenharmony_ci * linux-drivers@emulex.com 88c2ecf20Sopenharmony_ci * 98c2ecf20Sopenharmony_ci * Emulex 108c2ecf20Sopenharmony_ci * 3333 Susan Street 118c2ecf20Sopenharmony_ci * Costa Mesa, CA 92626 128c2ecf20Sopenharmony_ci */ 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci/********* Mailbox door bell *************/ 158c2ecf20Sopenharmony_ci/* Used for driver communication with the FW. 168c2ecf20Sopenharmony_ci * The software must write this register twice to post any command. First, 178c2ecf20Sopenharmony_ci * it writes the register with hi=1 and the upper bits of the physical address 188c2ecf20Sopenharmony_ci * for the MAILBOX structure. Software must poll the ready bit until this 198c2ecf20Sopenharmony_ci * is acknowledged. Then, sotware writes the register with hi=0 with the lower 208c2ecf20Sopenharmony_ci * bits in the address. It must poll the ready bit until the command is 218c2ecf20Sopenharmony_ci * complete. Upon completion, the MAILBOX will contain a valid completion 228c2ecf20Sopenharmony_ci * queue entry. 238c2ecf20Sopenharmony_ci */ 248c2ecf20Sopenharmony_ci#define MPU_MAILBOX_DB_OFFSET 0x160 258c2ecf20Sopenharmony_ci#define MPU_MAILBOX_DB_RDY_MASK 0x1 /* bit 0 */ 268c2ecf20Sopenharmony_ci#define MPU_MAILBOX_DB_HI_MASK 0x2 /* bit 1 */ 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci#define MPU_EP_CONTROL 0 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci/********** MPU semphore: used for SH & BE *************/ 318c2ecf20Sopenharmony_ci#define SLIPORT_SOFTRESET_OFFSET 0x5c /* CSR BAR offset */ 328c2ecf20Sopenharmony_ci#define SLIPORT_SEMAPHORE_OFFSET_BEx 0xac /* CSR BAR offset */ 338c2ecf20Sopenharmony_ci#define SLIPORT_SEMAPHORE_OFFSET_SH 0x94 /* PCI-CFG offset */ 348c2ecf20Sopenharmony_ci#define POST_STAGE_MASK 0x0000FFFF 358c2ecf20Sopenharmony_ci#define POST_ERR_MASK 0x1 368c2ecf20Sopenharmony_ci#define POST_ERR_SHIFT 31 378c2ecf20Sopenharmony_ci#define POST_ERR_RECOVERY_CODE_MASK 0xFFF 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci/* Soft Reset register masks */ 408c2ecf20Sopenharmony_ci#define SLIPORT_SOFTRESET_SR_MASK 0x00000080 /* SR bit */ 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci/* MPU semphore POST stage values */ 438c2ecf20Sopenharmony_ci#define POST_STAGE_AWAITING_HOST_RDY 0x1 /* FW awaiting goahead from host */ 448c2ecf20Sopenharmony_ci#define POST_STAGE_HOST_RDY 0x2 /* Host has given go-ahed to FW */ 458c2ecf20Sopenharmony_ci#define POST_STAGE_BE_RESET 0x3 /* Host wants to reset chip */ 468c2ecf20Sopenharmony_ci#define POST_STAGE_ARMFW_RDY 0xc000 /* FW is done with POST */ 478c2ecf20Sopenharmony_ci#define POST_STAGE_RECOVERABLE_ERR 0xE000 /* Recoverable err detected */ 488c2ecf20Sopenharmony_ci/* FW has detected a UE and is dumping FAT log data */ 498c2ecf20Sopenharmony_ci#define POST_STAGE_FAT_LOG_START 0x0D00 508c2ecf20Sopenharmony_ci#define POST_STAGE_ARMFW_UE 0xF000 /*FW has asserted an UE*/ 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ci/* Lancer SLIPORT registers */ 538c2ecf20Sopenharmony_ci#define SLIPORT_STATUS_OFFSET 0x404 548c2ecf20Sopenharmony_ci#define SLIPORT_CONTROL_OFFSET 0x408 558c2ecf20Sopenharmony_ci#define SLIPORT_ERROR1_OFFSET 0x40C 568c2ecf20Sopenharmony_ci#define SLIPORT_ERROR2_OFFSET 0x410 578c2ecf20Sopenharmony_ci#define PHYSDEV_CONTROL_OFFSET 0x414 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ci#define SLIPORT_STATUS_ERR_MASK 0x80000000 608c2ecf20Sopenharmony_ci#define SLIPORT_STATUS_DIP_MASK 0x02000000 618c2ecf20Sopenharmony_ci#define SLIPORT_STATUS_RN_MASK 0x01000000 628c2ecf20Sopenharmony_ci#define SLIPORT_STATUS_RDY_MASK 0x00800000 638c2ecf20Sopenharmony_ci#define SLI_PORT_CONTROL_IP_MASK 0x08000000 648c2ecf20Sopenharmony_ci#define PHYSDEV_CONTROL_FW_RESET_MASK 0x00000002 658c2ecf20Sopenharmony_ci#define PHYSDEV_CONTROL_DD_MASK 0x00000004 668c2ecf20Sopenharmony_ci#define PHYSDEV_CONTROL_INP_MASK 0x40000000 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ci#define SLIPORT_ERROR_NO_RESOURCE1 0x2 698c2ecf20Sopenharmony_ci#define SLIPORT_ERROR_NO_RESOURCE2 0x9 708c2ecf20Sopenharmony_ci 718c2ecf20Sopenharmony_ci#define SLIPORT_ERROR_FW_RESET1 0x2 728c2ecf20Sopenharmony_ci#define SLIPORT_ERROR_FW_RESET2 0x0 738c2ecf20Sopenharmony_ci 748c2ecf20Sopenharmony_ci/********* Memory BAR register ************/ 758c2ecf20Sopenharmony_ci#define PCICFG_MEMBAR_CTRL_INT_CTRL_OFFSET 0xfc 768c2ecf20Sopenharmony_ci/* Host Interrupt Enable, if set interrupts are enabled although "PCI Interrupt 778c2ecf20Sopenharmony_ci * Disable" may still globally block interrupts in addition to individual 788c2ecf20Sopenharmony_ci * interrupt masks; a mechanism for the device driver to block all interrupts 798c2ecf20Sopenharmony_ci * atomically without having to arbitrate for the PCI Interrupt Disable bit 808c2ecf20Sopenharmony_ci * with the OS. 818c2ecf20Sopenharmony_ci */ 828c2ecf20Sopenharmony_ci#define MEMBAR_CTRL_INT_CTRL_HOSTINTR_MASK BIT(29) /* bit 29 */ 838c2ecf20Sopenharmony_ci 848c2ecf20Sopenharmony_ci/********* PCI Function Capability *********/ 858c2ecf20Sopenharmony_ci#define BE_FUNCTION_CAPS_RSS 0x2 868c2ecf20Sopenharmony_ci#define BE_FUNCTION_CAPS_SUPER_NIC 0x40 878c2ecf20Sopenharmony_ci 888c2ecf20Sopenharmony_ci/********* Power management (WOL) **********/ 898c2ecf20Sopenharmony_ci#define PCICFG_PM_CONTROL_OFFSET 0x44 908c2ecf20Sopenharmony_ci#define PCICFG_PM_CONTROL_MASK 0x108 /* bits 3 & 8 */ 918c2ecf20Sopenharmony_ci 928c2ecf20Sopenharmony_ci/********* Online Control Registers *******/ 938c2ecf20Sopenharmony_ci#define PCICFG_ONLINE0 0xB0 948c2ecf20Sopenharmony_ci#define PCICFG_ONLINE1 0xB4 958c2ecf20Sopenharmony_ci 968c2ecf20Sopenharmony_ci/********* UE Status and Mask Registers ***/ 978c2ecf20Sopenharmony_ci#define PCICFG_UE_STATUS_LOW 0xA0 988c2ecf20Sopenharmony_ci#define PCICFG_UE_STATUS_HIGH 0xA4 998c2ecf20Sopenharmony_ci#define PCICFG_UE_STATUS_LOW_MASK 0xA8 1008c2ecf20Sopenharmony_ci#define PCICFG_UE_STATUS_HI_MASK 0xAC 1018c2ecf20Sopenharmony_ci 1028c2ecf20Sopenharmony_ci/******** SLI_INTF ***********************/ 1038c2ecf20Sopenharmony_ci#define SLI_INTF_REG_OFFSET 0x58 1048c2ecf20Sopenharmony_ci#define SLI_INTF_VALID_MASK 0xE0000000 1058c2ecf20Sopenharmony_ci#define SLI_INTF_VALID 0xC0000000 1068c2ecf20Sopenharmony_ci#define SLI_INTF_HINT2_MASK 0x1F000000 1078c2ecf20Sopenharmony_ci#define SLI_INTF_HINT2_SHIFT 24 1088c2ecf20Sopenharmony_ci#define SLI_INTF_HINT1_MASK 0x00FF0000 1098c2ecf20Sopenharmony_ci#define SLI_INTF_HINT1_SHIFT 16 1108c2ecf20Sopenharmony_ci#define SLI_INTF_FAMILY_MASK 0x00000F00 1118c2ecf20Sopenharmony_ci#define SLI_INTF_FAMILY_SHIFT 8 1128c2ecf20Sopenharmony_ci#define SLI_INTF_IF_TYPE_MASK 0x0000F000 1138c2ecf20Sopenharmony_ci#define SLI_INTF_IF_TYPE_SHIFT 12 1148c2ecf20Sopenharmony_ci#define SLI_INTF_REV_MASK 0x000000F0 1158c2ecf20Sopenharmony_ci#define SLI_INTF_REV_SHIFT 4 1168c2ecf20Sopenharmony_ci#define SLI_INTF_FT_MASK 0x00000001 1178c2ecf20Sopenharmony_ci 1188c2ecf20Sopenharmony_ci#define SLI_INTF_TYPE_2 2 1198c2ecf20Sopenharmony_ci#define SLI_INTF_TYPE_3 3 1208c2ecf20Sopenharmony_ci 1218c2ecf20Sopenharmony_ci/********* ISR0 Register offset **********/ 1228c2ecf20Sopenharmony_ci#define CEV_ISR0_OFFSET 0xC18 1238c2ecf20Sopenharmony_ci#define CEV_ISR_SIZE 4 1248c2ecf20Sopenharmony_ci 1258c2ecf20Sopenharmony_ci/********* Event Q door bell *************/ 1268c2ecf20Sopenharmony_ci#define DB_EQ_OFFSET DB_CQ_OFFSET 1278c2ecf20Sopenharmony_ci#define DB_EQ_RING_ID_MASK 0x1FF /* bits 0 - 8 */ 1288c2ecf20Sopenharmony_ci#define DB_EQ_RING_ID_EXT_MASK 0x3e00 /* bits 9-13 */ 1298c2ecf20Sopenharmony_ci#define DB_EQ_RING_ID_EXT_MASK_SHIFT (2) /* qid bits 9-13 placing at 11-15 */ 1308c2ecf20Sopenharmony_ci 1318c2ecf20Sopenharmony_ci/* Clear the interrupt for this eq */ 1328c2ecf20Sopenharmony_ci#define DB_EQ_CLR_SHIFT (9) /* bit 9 */ 1338c2ecf20Sopenharmony_ci/* Must be 1 */ 1348c2ecf20Sopenharmony_ci#define DB_EQ_EVNT_SHIFT (10) /* bit 10 */ 1358c2ecf20Sopenharmony_ci/* Number of event entries processed */ 1368c2ecf20Sopenharmony_ci#define DB_EQ_NUM_POPPED_SHIFT (16) /* bits 16 - 28 */ 1378c2ecf20Sopenharmony_ci/* Rearm bit */ 1388c2ecf20Sopenharmony_ci#define DB_EQ_REARM_SHIFT (29) /* bit 29 */ 1398c2ecf20Sopenharmony_ci/* Rearm to interrupt delay encoding */ 1408c2ecf20Sopenharmony_ci#define DB_EQ_R2I_DLY_SHIFT (30) /* bits 30 - 31 */ 1418c2ecf20Sopenharmony_ci 1428c2ecf20Sopenharmony_ci/* Rearm to interrupt (R2I) delay multiplier encoding represents 3 different 1438c2ecf20Sopenharmony_ci * values configured in CEV_REARM2IRPT_DLY_MULT_CSR register. This value is 1448c2ecf20Sopenharmony_ci * programmed by host driver while ringing an EQ doorbell(EQ_DB) if a delay 1458c2ecf20Sopenharmony_ci * between rearming the EQ and next interrupt on this EQ is desired. 1468c2ecf20Sopenharmony_ci */ 1478c2ecf20Sopenharmony_ci#define R2I_DLY_ENC_0 0 /* No delay */ 1488c2ecf20Sopenharmony_ci#define R2I_DLY_ENC_1 1 /* maps to 160us EQ delay */ 1498c2ecf20Sopenharmony_ci#define R2I_DLY_ENC_2 2 /* maps to 96us EQ delay */ 1508c2ecf20Sopenharmony_ci#define R2I_DLY_ENC_3 3 /* maps to 48us EQ delay */ 1518c2ecf20Sopenharmony_ci 1528c2ecf20Sopenharmony_ci/********* Compl Q door bell *************/ 1538c2ecf20Sopenharmony_ci#define DB_CQ_OFFSET 0x120 1548c2ecf20Sopenharmony_ci#define DB_CQ_RING_ID_MASK 0x3FF /* bits 0 - 9 */ 1558c2ecf20Sopenharmony_ci#define DB_CQ_RING_ID_EXT_MASK 0x7C00 /* bits 10-14 */ 1568c2ecf20Sopenharmony_ci#define DB_CQ_RING_ID_EXT_MASK_SHIFT (1) /* qid bits 10-14 1578c2ecf20Sopenharmony_ci placing at 11-15 */ 1588c2ecf20Sopenharmony_ci 1598c2ecf20Sopenharmony_ci/* Number of event entries processed */ 1608c2ecf20Sopenharmony_ci#define DB_CQ_NUM_POPPED_SHIFT (16) /* bits 16 - 28 */ 1618c2ecf20Sopenharmony_ci/* Rearm bit */ 1628c2ecf20Sopenharmony_ci#define DB_CQ_REARM_SHIFT (29) /* bit 29 */ 1638c2ecf20Sopenharmony_ci 1648c2ecf20Sopenharmony_ci/********** TX ULP door bell *************/ 1658c2ecf20Sopenharmony_ci#define DB_TXULP1_OFFSET 0x60 1668c2ecf20Sopenharmony_ci#define DB_TXULP_RING_ID_MASK 0x7FF /* bits 0 - 10 */ 1678c2ecf20Sopenharmony_ci/* Number of tx entries posted */ 1688c2ecf20Sopenharmony_ci#define DB_TXULP_NUM_POSTED_SHIFT (16) /* bits 16 - 29 */ 1698c2ecf20Sopenharmony_ci#define DB_TXULP_NUM_POSTED_MASK 0x3FFF /* bits 16 - 29 */ 1708c2ecf20Sopenharmony_ci 1718c2ecf20Sopenharmony_ci/********** RQ(erx) door bell ************/ 1728c2ecf20Sopenharmony_ci#define DB_RQ_OFFSET 0x100 1738c2ecf20Sopenharmony_ci#define DB_RQ_RING_ID_MASK 0x3FF /* bits 0 - 9 */ 1748c2ecf20Sopenharmony_ci/* Number of rx frags posted */ 1758c2ecf20Sopenharmony_ci#define DB_RQ_NUM_POSTED_SHIFT (24) /* bits 24 - 31 */ 1768c2ecf20Sopenharmony_ci 1778c2ecf20Sopenharmony_ci/********** MCC door bell ************/ 1788c2ecf20Sopenharmony_ci#define DB_MCCQ_OFFSET 0x140 1798c2ecf20Sopenharmony_ci#define DB_MCCQ_RING_ID_MASK 0x7FF /* bits 0 - 10 */ 1808c2ecf20Sopenharmony_ci/* Number of entries posted */ 1818c2ecf20Sopenharmony_ci#define DB_MCCQ_NUM_POSTED_SHIFT (16) /* bits 16 - 29 */ 1828c2ecf20Sopenharmony_ci 1838c2ecf20Sopenharmony_ci/********** SRIOV VF PCICFG OFFSET ********/ 1848c2ecf20Sopenharmony_ci#define SRIOV_VF_PCICFG_OFFSET (4096) 1858c2ecf20Sopenharmony_ci 1868c2ecf20Sopenharmony_ci/********** FAT TABLE ********/ 1878c2ecf20Sopenharmony_ci#define RETRIEVE_FAT 0 1888c2ecf20Sopenharmony_ci#define QUERY_FAT 1 1898c2ecf20Sopenharmony_ci 1908c2ecf20Sopenharmony_ci/************* Rx Packet Type Encoding **************/ 1918c2ecf20Sopenharmony_ci#define BE_UNICAST_PACKET 0 1928c2ecf20Sopenharmony_ci#define BE_MULTICAST_PACKET 1 1938c2ecf20Sopenharmony_ci#define BE_BROADCAST_PACKET 2 1948c2ecf20Sopenharmony_ci#define BE_RSVD_PACKET 3 1958c2ecf20Sopenharmony_ci 1968c2ecf20Sopenharmony_ci/* 1978c2ecf20Sopenharmony_ci * BE descriptors: host memory data structures whose formats 1988c2ecf20Sopenharmony_ci * are hardwired in BE silicon. 1998c2ecf20Sopenharmony_ci */ 2008c2ecf20Sopenharmony_ci/* Event Queue Descriptor */ 2018c2ecf20Sopenharmony_ci#define EQ_ENTRY_VALID_MASK 0x1 /* bit 0 */ 2028c2ecf20Sopenharmony_ci#define EQ_ENTRY_RES_ID_MASK 0xFFFF /* bits 16 - 31 */ 2038c2ecf20Sopenharmony_ci#define EQ_ENTRY_RES_ID_SHIFT 16 2048c2ecf20Sopenharmony_ci 2058c2ecf20Sopenharmony_cistruct be_eq_entry { 2068c2ecf20Sopenharmony_ci u32 evt; 2078c2ecf20Sopenharmony_ci}; 2088c2ecf20Sopenharmony_ci 2098c2ecf20Sopenharmony_ci/* TX Queue Descriptor */ 2108c2ecf20Sopenharmony_ci#define ETH_WRB_FRAG_LEN_MASK 0xFFFF 2118c2ecf20Sopenharmony_cistruct be_eth_wrb { 2128c2ecf20Sopenharmony_ci __le32 frag_pa_hi; /* dword 0 */ 2138c2ecf20Sopenharmony_ci __le32 frag_pa_lo; /* dword 1 */ 2148c2ecf20Sopenharmony_ci u32 rsvd0; /* dword 2 */ 2158c2ecf20Sopenharmony_ci __le32 frag_len; /* dword 3: bits 0 - 15 */ 2168c2ecf20Sopenharmony_ci} __packed; 2178c2ecf20Sopenharmony_ci 2188c2ecf20Sopenharmony_ci/* Pseudo amap definition for eth_hdr_wrb in which each bit of the 2198c2ecf20Sopenharmony_ci * actual structure is defined as a byte : used to calculate 2208c2ecf20Sopenharmony_ci * offset/shift/mask of each field */ 2218c2ecf20Sopenharmony_cistruct amap_eth_hdr_wrb { 2228c2ecf20Sopenharmony_ci u8 rsvd0[32]; /* dword 0 */ 2238c2ecf20Sopenharmony_ci u8 rsvd1[32]; /* dword 1 */ 2248c2ecf20Sopenharmony_ci u8 complete; /* dword 2 */ 2258c2ecf20Sopenharmony_ci u8 event; 2268c2ecf20Sopenharmony_ci u8 crc; 2278c2ecf20Sopenharmony_ci u8 forward; 2288c2ecf20Sopenharmony_ci u8 lso6; 2298c2ecf20Sopenharmony_ci u8 mgmt; 2308c2ecf20Sopenharmony_ci u8 ipcs; 2318c2ecf20Sopenharmony_ci u8 udpcs; 2328c2ecf20Sopenharmony_ci u8 tcpcs; 2338c2ecf20Sopenharmony_ci u8 lso; 2348c2ecf20Sopenharmony_ci u8 vlan; 2358c2ecf20Sopenharmony_ci u8 gso[2]; 2368c2ecf20Sopenharmony_ci u8 num_wrb[5]; 2378c2ecf20Sopenharmony_ci u8 lso_mss[14]; 2388c2ecf20Sopenharmony_ci u8 len[16]; /* dword 3 */ 2398c2ecf20Sopenharmony_ci u8 vlan_tag[16]; 2408c2ecf20Sopenharmony_ci} __packed; 2418c2ecf20Sopenharmony_ci 2428c2ecf20Sopenharmony_ci#define TX_HDR_WRB_COMPL 1 /* word 2 */ 2438c2ecf20Sopenharmony_ci#define TX_HDR_WRB_EVT BIT(1) /* word 2 */ 2448c2ecf20Sopenharmony_ci#define TX_HDR_WRB_NUM_SHIFT 13 /* word 2: bits 13:17 */ 2458c2ecf20Sopenharmony_ci#define TX_HDR_WRB_NUM_MASK 0x1F /* word 2: bits 13:17 */ 2468c2ecf20Sopenharmony_ci 2478c2ecf20Sopenharmony_cistruct be_eth_hdr_wrb { 2488c2ecf20Sopenharmony_ci __le32 dw[4]; 2498c2ecf20Sopenharmony_ci}; 2508c2ecf20Sopenharmony_ci 2518c2ecf20Sopenharmony_ci/********* Tx Compl Status Encoding *********/ 2528c2ecf20Sopenharmony_ci#define BE_TX_COMP_HDR_PARSE_ERR 0x2 2538c2ecf20Sopenharmony_ci#define BE_TX_COMP_NDMA_ERR 0x3 2548c2ecf20Sopenharmony_ci#define BE_TX_COMP_ACL_ERR 0x5 2558c2ecf20Sopenharmony_ci 2568c2ecf20Sopenharmony_ci#define LANCER_TX_COMP_LSO_ERR 0x1 2578c2ecf20Sopenharmony_ci#define LANCER_TX_COMP_HSW_DROP_MAC_ERR 0x3 2588c2ecf20Sopenharmony_ci#define LANCER_TX_COMP_HSW_DROP_VLAN_ERR 0x5 2598c2ecf20Sopenharmony_ci#define LANCER_TX_COMP_QINQ_ERR 0x7 2608c2ecf20Sopenharmony_ci#define LANCER_TX_COMP_SGE_ERR 0x9 2618c2ecf20Sopenharmony_ci#define LANCER_TX_COMP_PARITY_ERR 0xb 2628c2ecf20Sopenharmony_ci#define LANCER_TX_COMP_DMA_ERR 0xd 2638c2ecf20Sopenharmony_ci 2648c2ecf20Sopenharmony_ci/* TX Compl Queue Descriptor */ 2658c2ecf20Sopenharmony_ci 2668c2ecf20Sopenharmony_ci/* Pseudo amap definition for eth_tx_compl in which each bit of the 2678c2ecf20Sopenharmony_ci * actual structure is defined as a byte: used to calculate 2688c2ecf20Sopenharmony_ci * offset/shift/mask of each field */ 2698c2ecf20Sopenharmony_cistruct amap_eth_tx_compl { 2708c2ecf20Sopenharmony_ci u8 wrb_index[16]; /* dword 0 */ 2718c2ecf20Sopenharmony_ci u8 ct[2]; /* dword 0 */ 2728c2ecf20Sopenharmony_ci u8 port[2]; /* dword 0 */ 2738c2ecf20Sopenharmony_ci u8 rsvd0[8]; /* dword 0 */ 2748c2ecf20Sopenharmony_ci u8 status[4]; /* dword 0 */ 2758c2ecf20Sopenharmony_ci u8 user_bytes[16]; /* dword 1 */ 2768c2ecf20Sopenharmony_ci u8 nwh_bytes[8]; /* dword 1 */ 2778c2ecf20Sopenharmony_ci u8 lso; /* dword 1 */ 2788c2ecf20Sopenharmony_ci u8 cast_enc[2]; /* dword 1 */ 2798c2ecf20Sopenharmony_ci u8 rsvd1[5]; /* dword 1 */ 2808c2ecf20Sopenharmony_ci u8 rsvd2[32]; /* dword 2 */ 2818c2ecf20Sopenharmony_ci u8 pkts[16]; /* dword 3 */ 2828c2ecf20Sopenharmony_ci u8 ringid[11]; /* dword 3 */ 2838c2ecf20Sopenharmony_ci u8 hash_val[4]; /* dword 3 */ 2848c2ecf20Sopenharmony_ci u8 valid; /* dword 3 */ 2858c2ecf20Sopenharmony_ci} __packed; 2868c2ecf20Sopenharmony_ci 2878c2ecf20Sopenharmony_cistruct be_eth_tx_compl { 2888c2ecf20Sopenharmony_ci u32 dw[4]; 2898c2ecf20Sopenharmony_ci}; 2908c2ecf20Sopenharmony_ci 2918c2ecf20Sopenharmony_ci/* RX Queue Descriptor */ 2928c2ecf20Sopenharmony_cistruct be_eth_rx_d { 2938c2ecf20Sopenharmony_ci u32 fragpa_hi; 2948c2ecf20Sopenharmony_ci u32 fragpa_lo; 2958c2ecf20Sopenharmony_ci}; 2968c2ecf20Sopenharmony_ci 2978c2ecf20Sopenharmony_ci/* RX Compl Queue Descriptor */ 2988c2ecf20Sopenharmony_ci 2998c2ecf20Sopenharmony_ci/* Pseudo amap definition for BE2 and BE3 legacy mode eth_rx_compl in which 3008c2ecf20Sopenharmony_ci * each bit of the actual structure is defined as a byte: used to calculate 3018c2ecf20Sopenharmony_ci * offset/shift/mask of each field */ 3028c2ecf20Sopenharmony_cistruct amap_eth_rx_compl_v0 { 3038c2ecf20Sopenharmony_ci u8 vlan_tag[16]; /* dword 0 */ 3048c2ecf20Sopenharmony_ci u8 pktsize[14]; /* dword 0 */ 3058c2ecf20Sopenharmony_ci u8 port; /* dword 0 */ 3068c2ecf20Sopenharmony_ci u8 ip_opt; /* dword 0 */ 3078c2ecf20Sopenharmony_ci u8 err; /* dword 1 */ 3088c2ecf20Sopenharmony_ci u8 rsshp; /* dword 1 */ 3098c2ecf20Sopenharmony_ci u8 ipf; /* dword 1 */ 3108c2ecf20Sopenharmony_ci u8 tcpf; /* dword 1 */ 3118c2ecf20Sopenharmony_ci u8 udpf; /* dword 1 */ 3128c2ecf20Sopenharmony_ci u8 ipcksm; /* dword 1 */ 3138c2ecf20Sopenharmony_ci u8 l4_cksm; /* dword 1 */ 3148c2ecf20Sopenharmony_ci u8 ip_version; /* dword 1 */ 3158c2ecf20Sopenharmony_ci u8 macdst[6]; /* dword 1 */ 3168c2ecf20Sopenharmony_ci u8 vtp; /* dword 1 */ 3178c2ecf20Sopenharmony_ci u8 ip_frag; /* dword 1 */ 3188c2ecf20Sopenharmony_ci u8 fragndx[10]; /* dword 1 */ 3198c2ecf20Sopenharmony_ci u8 ct[2]; /* dword 1 */ 3208c2ecf20Sopenharmony_ci u8 sw; /* dword 1 */ 3218c2ecf20Sopenharmony_ci u8 numfrags[3]; /* dword 1 */ 3228c2ecf20Sopenharmony_ci u8 rss_flush; /* dword 2 */ 3238c2ecf20Sopenharmony_ci u8 cast_enc[2]; /* dword 2 */ 3248c2ecf20Sopenharmony_ci u8 qnq; /* dword 2 */ 3258c2ecf20Sopenharmony_ci u8 rss_bank; /* dword 2 */ 3268c2ecf20Sopenharmony_ci u8 rsvd1[23]; /* dword 2 */ 3278c2ecf20Sopenharmony_ci u8 lro_pkt; /* dword 2 */ 3288c2ecf20Sopenharmony_ci u8 rsvd2[2]; /* dword 2 */ 3298c2ecf20Sopenharmony_ci u8 valid; /* dword 2 */ 3308c2ecf20Sopenharmony_ci u8 rsshash[32]; /* dword 3 */ 3318c2ecf20Sopenharmony_ci} __packed; 3328c2ecf20Sopenharmony_ci 3338c2ecf20Sopenharmony_ci/* Pseudo amap definition for BE3 native mode eth_rx_compl in which 3348c2ecf20Sopenharmony_ci * each bit of the actual structure is defined as a byte: used to calculate 3358c2ecf20Sopenharmony_ci * offset/shift/mask of each field */ 3368c2ecf20Sopenharmony_cistruct amap_eth_rx_compl_v1 { 3378c2ecf20Sopenharmony_ci u8 vlan_tag[16]; /* dword 0 */ 3388c2ecf20Sopenharmony_ci u8 pktsize[14]; /* dword 0 */ 3398c2ecf20Sopenharmony_ci u8 vtp; /* dword 0 */ 3408c2ecf20Sopenharmony_ci u8 ip_opt; /* dword 0 */ 3418c2ecf20Sopenharmony_ci u8 err; /* dword 1 */ 3428c2ecf20Sopenharmony_ci u8 rsshp; /* dword 1 */ 3438c2ecf20Sopenharmony_ci u8 ipf; /* dword 1 */ 3448c2ecf20Sopenharmony_ci u8 tcpf; /* dword 1 */ 3458c2ecf20Sopenharmony_ci u8 udpf; /* dword 1 */ 3468c2ecf20Sopenharmony_ci u8 ipcksm; /* dword 1 */ 3478c2ecf20Sopenharmony_ci u8 l4_cksm; /* dword 1 */ 3488c2ecf20Sopenharmony_ci u8 ip_version; /* dword 1 */ 3498c2ecf20Sopenharmony_ci u8 macdst[7]; /* dword 1 */ 3508c2ecf20Sopenharmony_ci u8 rsvd0; /* dword 1 */ 3518c2ecf20Sopenharmony_ci u8 fragndx[10]; /* dword 1 */ 3528c2ecf20Sopenharmony_ci u8 ct[2]; /* dword 1 */ 3538c2ecf20Sopenharmony_ci u8 sw; /* dword 1 */ 3548c2ecf20Sopenharmony_ci u8 numfrags[3]; /* dword 1 */ 3558c2ecf20Sopenharmony_ci u8 rss_flush; /* dword 2 */ 3568c2ecf20Sopenharmony_ci u8 cast_enc[2]; /* dword 2 */ 3578c2ecf20Sopenharmony_ci u8 qnq; /* dword 2 */ 3588c2ecf20Sopenharmony_ci u8 rss_bank; /* dword 2 */ 3598c2ecf20Sopenharmony_ci u8 port[2]; /* dword 2 */ 3608c2ecf20Sopenharmony_ci u8 vntagp; /* dword 2 */ 3618c2ecf20Sopenharmony_ci u8 header_len[8]; /* dword 2 */ 3628c2ecf20Sopenharmony_ci u8 header_split[2]; /* dword 2 */ 3638c2ecf20Sopenharmony_ci u8 rsvd1[12]; /* dword 2 */ 3648c2ecf20Sopenharmony_ci u8 tunneled; 3658c2ecf20Sopenharmony_ci u8 valid; /* dword 2 */ 3668c2ecf20Sopenharmony_ci u8 rsshash[32]; /* dword 3 */ 3678c2ecf20Sopenharmony_ci} __packed; 3688c2ecf20Sopenharmony_ci 3698c2ecf20Sopenharmony_cistruct be_eth_rx_compl { 3708c2ecf20Sopenharmony_ci u32 dw[4]; 3718c2ecf20Sopenharmony_ci}; 372