Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'sfc-siena-next'

Martin Habets says:

====================
sfc: Remove Siena bits from sfc.ko

Last year we split off Siena into it's own driver under directory siena.
This patch series removes the now unused Falcon and Siena code from sfc.ko.
No functional changes are intended.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>

+42 -4020
+1 -3
drivers/net/ethernet/sfc/ef10.c
··· 2209 2209 /* low two bits of label are what we want for type */ 2210 2210 BUILD_BUG_ON((EFX_TXQ_TYPE_OUTER_CSUM | EFX_TXQ_TYPE_INNER_CSUM) != 3); 2211 2211 tx_queue->type = tx_queue->label & 3; 2212 - return efx_nic_alloc_buffer(tx_queue->efx, &tx_queue->txd.buf, 2212 + return efx_nic_alloc_buffer(tx_queue->efx, &tx_queue->txd, 2213 2213 (tx_queue->ptr_mask + 1) * 2214 2214 sizeof(efx_qword_t), 2215 2215 GFP_KERNEL); ··· 4267 4267 .sriov_init = efx_ef10_sriov_init, 4268 4268 .sriov_fini = efx_ef10_sriov_fini, 4269 4269 .sriov_wanted = efx_ef10_sriov_wanted, 4270 - .sriov_reset = efx_ef10_sriov_reset, 4271 - .sriov_flr = efx_ef10_sriov_flr, 4272 4270 .sriov_set_vf_mac = efx_ef10_sriov_set_vf_mac, 4273 4271 .sriov_set_vf_vlan = efx_ef10_sriov_set_vf_vlan, 4274 4272 .sriov_set_vf_spoofchk = efx_ef10_sriov_set_vf_spoofchk,
+1 -1
drivers/net/ethernet/sfc/ef100_nic.c
··· 224 224 static int ef100_ev_probe(struct efx_channel *channel) 225 225 { 226 226 /* Allocate an extra descriptor for the QMDA status completion entry */ 227 - return efx_nic_alloc_buffer(channel->efx, &channel->eventq.buf, 227 + return efx_nic_alloc_buffer(channel->efx, &channel->eventq, 228 228 (channel->eventq_mask + 2) * 229 229 sizeof(efx_qword_t), 230 230 GFP_KERNEL);
+3 -3
drivers/net/ethernet/sfc/ef100_tx.c
··· 23 23 int ef100_tx_probe(struct efx_tx_queue *tx_queue) 24 24 { 25 25 /* Allocate an extra descriptor for the QMDA status completion entry */ 26 - return efx_nic_alloc_buffer(tx_queue->efx, &tx_queue->txd.buf, 26 + return efx_nic_alloc_buffer(tx_queue->efx, &tx_queue->txd, 27 27 (tx_queue->ptr_mask + 2) * 28 28 sizeof(efx_oword_t), 29 29 GFP_KERNEL); ··· 101 101 102 102 static efx_oword_t *ef100_tx_desc(struct efx_tx_queue *tx_queue, unsigned int index) 103 103 { 104 - if (likely(tx_queue->txd.buf.addr)) 105 - return ((efx_oword_t *)tx_queue->txd.buf.addr) + index; 104 + if (likely(tx_queue->txd.addr)) 105 + return ((efx_oword_t *)tx_queue->txd.addr) + index; 106 106 else 107 107 return NULL; 108 108 }
-2
drivers/net/ethernet/sfc/ef10_sriov.h
··· 35 35 36 36 int efx_ef10_sriov_configure(struct efx_nic *efx, int num_vfs); 37 37 int efx_ef10_sriov_init(struct efx_nic *efx); 38 - static inline void efx_ef10_sriov_reset(struct efx_nic *efx) {} 39 38 void efx_ef10_sriov_fini(struct efx_nic *efx); 40 - static inline void efx_ef10_sriov_flr(struct efx_nic *efx, unsigned vf_i) {} 41 39 42 40 int efx_ef10_sriov_set_vf_mac(struct efx_nic *efx, int vf, const u8 *mac); 43 41
-1
drivers/net/ethernet/sfc/efx.c
··· 605 605 #endif 606 606 .ndo_get_phys_port_id = efx_get_phys_port_id, 607 607 .ndo_get_phys_port_name = efx_get_phys_port_name, 608 - .ndo_setup_tc = efx_setup_tc, 609 608 #ifdef CONFIG_RFS_ACCEL 610 609 .ndo_rx_flow_steer = efx_filter_rfs, 611 610 #endif
-2
drivers/net/ethernet/sfc/efx.h
··· 30 30 tx_queue, skb); 31 31 } 32 32 void efx_xmit_done_single(struct efx_tx_queue *tx_queue); 33 - int efx_setup_tc(struct net_device *net_dev, enum tc_setup_type type, 34 - void *type_data); 35 33 extern unsigned int efx_piobuf_size; 36 34 37 35 /* RX */
+1 -29
drivers/net/ethernet/sfc/efx_channels.c
··· 713 713 struct efx_channel *channel; 714 714 int rc; 715 715 716 - /* Restart special buffer allocation */ 717 - efx->next_buffer_table = 0; 718 - 719 716 /* Probe channels in reverse, so that any 'extra' channels 720 717 * use the start of the buffer table. This allows the traffic 721 718 * channels to be resized without moving them or wasting the ··· 846 849 struct efx_channel *other_channel[EFX_MAX_CHANNELS], *channel, 847 850 *ptp_channel = efx_ptp_channel(efx); 848 851 struct efx_ptp_data *ptp_data = efx->ptp_data; 849 - unsigned int i, next_buffer_table = 0; 850 852 u32 old_rxq_entries, old_txq_entries; 853 + unsigned int i; 851 854 int rc, rc2; 852 855 853 856 rc = efx_check_disabled(efx); 854 857 if (rc) 855 858 return rc; 856 - 857 - /* Not all channels should be reallocated. We must avoid 858 - * reallocating their buffer table entries. 859 - */ 860 - efx_for_each_channel(channel, efx) { 861 - struct efx_rx_queue *rx_queue; 862 - struct efx_tx_queue *tx_queue; 863 - 864 - if (channel->type->copy) 865 - continue; 866 - next_buffer_table = max(next_buffer_table, 867 - channel->eventq.index + 868 - channel->eventq.entries); 869 - efx_for_each_channel_rx_queue(rx_queue, channel) 870 - next_buffer_table = max(next_buffer_table, 871 - rx_queue->rxd.index + 872 - rx_queue->rxd.entries); 873 - efx_for_each_channel_tx_queue(tx_queue, channel) 874 - next_buffer_table = max(next_buffer_table, 875 - tx_queue->txd.index + 876 - tx_queue->txd.entries); 877 - } 878 859 879 860 efx_device_detach_sync(efx); 880 861 efx_stop_all(efx); ··· 878 903 efx->txq_entries = txq_entries; 879 904 for (i = 0; i < efx->n_channels; i++) 880 905 swap(efx->channel[i], other_channel[i]); 881 - 882 - /* Restart buffer table allocation */ 883 - efx->next_buffer_table = next_buffer_table; 884 906 885 907 for (i = 0; i < efx->n_channels; i++) { 886 908 channel = efx->channel[i];
-7
drivers/net/ethernet/sfc/efx_common.c
··· 35 35 36 36 /* This is the time (in jiffies) between invocations of the hardware 37 37 * monitor. 38 - * On Falcon-based NICs, this will: 39 - * - Check the on-board hardware monitor; 40 - * - Poll the link state and reconfigure the hardware as necessary. 41 - * On Siena-based NICs for power systems with EEH support, this will give EEH a 42 - * chance to start. 43 38 */ 44 39 static unsigned int efx_monitor_interval = 1 * HZ; 45 40 ··· 780 785 mutex_unlock(&efx->rss_lock); 781 786 efx->type->filter_table_restore(efx); 782 787 up_write(&efx->filter_sem); 783 - if (efx->type->sriov_reset) 784 - efx->type->sriov_reset(efx); 785 788 786 789 mutex_unlock(&efx->mac_lock); 787 790
-2929
drivers/net/ethernet/sfc/farch_regs.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-only */ 2 - /**************************************************************************** 3 - * Driver for Solarflare network controllers and boards 4 - * Copyright 2005-2006 Fen Systems Ltd. 5 - * Copyright 2006-2012 Solarflare Communications Inc. 6 - */ 7 - 8 - #ifndef EFX_FARCH_REGS_H 9 - #define EFX_FARCH_REGS_H 10 - 11 - /* 12 - * Falcon hardware architecture definitions have a name prefix following 13 - * the format: 14 - * 15 - * F<type>_<min-rev><max-rev>_ 16 - * 17 - * The following <type> strings are used: 18 - * 19 - * MMIO register MC register Host memory structure 20 - * ------------------------------------------------------------- 21 - * Address R MCR 22 - * Bitfield RF MCRF SF 23 - * Enumerator FE MCFE SE 24 - * 25 - * <min-rev> is the first revision to which the definition applies: 26 - * 27 - * A: Falcon A1 (SFC4000AB) 28 - * B: Falcon B0 (SFC4000BA) 29 - * C: Siena A0 (SFL9021AA) 30 - * 31 - * If the definition has been changed or removed in later revisions 32 - * then <max-rev> is the last revision to which the definition applies; 33 - * otherwise it is "Z". 34 - */ 35 - 36 - /************************************************************************** 37 - * 38 - * Falcon/Siena registers and descriptors 39 - * 40 - ************************************************************************** 41 - */ 42 - 43 - /* ADR_REGION_REG: Address region register */ 44 - #define FR_AZ_ADR_REGION 0x00000000 45 - #define FRF_AZ_ADR_REGION3_LBN 96 46 - #define FRF_AZ_ADR_REGION3_WIDTH 18 47 - #define FRF_AZ_ADR_REGION2_LBN 64 48 - #define FRF_AZ_ADR_REGION2_WIDTH 18 49 - #define FRF_AZ_ADR_REGION1_LBN 32 50 - #define FRF_AZ_ADR_REGION1_WIDTH 18 51 - #define FRF_AZ_ADR_REGION0_LBN 0 52 - #define FRF_AZ_ADR_REGION0_WIDTH 18 53 - 54 - /* INT_EN_REG_KER: Kernel driver Interrupt enable register */ 55 - #define FR_AZ_INT_EN_KER 0x00000010 56 - #define FRF_AZ_KER_INT_LEVE_SEL_LBN 8 57 - #define FRF_AZ_KER_INT_LEVE_SEL_WIDTH 6 58 - #define FRF_AZ_KER_INT_CHAR_LBN 4 59 - #define FRF_AZ_KER_INT_CHAR_WIDTH 1 60 - #define FRF_AZ_KER_INT_KER_LBN 3 61 - #define FRF_AZ_KER_INT_KER_WIDTH 1 62 - #define FRF_AZ_DRV_INT_EN_KER_LBN 0 63 - #define FRF_AZ_DRV_INT_EN_KER_WIDTH 1 64 - 65 - /* INT_EN_REG_CHAR: Char Driver interrupt enable register */ 66 - #define FR_BZ_INT_EN_CHAR 0x00000020 67 - #define FRF_BZ_CHAR_INT_LEVE_SEL_LBN 8 68 - #define FRF_BZ_CHAR_INT_LEVE_SEL_WIDTH 6 69 - #define FRF_BZ_CHAR_INT_CHAR_LBN 4 70 - #define FRF_BZ_CHAR_INT_CHAR_WIDTH 1 71 - #define FRF_BZ_CHAR_INT_KER_LBN 3 72 - #define FRF_BZ_CHAR_INT_KER_WIDTH 1 73 - #define FRF_BZ_DRV_INT_EN_CHAR_LBN 0 74 - #define FRF_BZ_DRV_INT_EN_CHAR_WIDTH 1 75 - 76 - /* INT_ADR_REG_KER: Interrupt host address for Kernel driver */ 77 - #define FR_AZ_INT_ADR_KER 0x00000030 78 - #define FRF_AZ_NORM_INT_VEC_DIS_KER_LBN 64 79 - #define FRF_AZ_NORM_INT_VEC_DIS_KER_WIDTH 1 80 - #define FRF_AZ_INT_ADR_KER_LBN 0 81 - #define FRF_AZ_INT_ADR_KER_WIDTH 64 82 - 83 - /* INT_ADR_REG_CHAR: Interrupt host address for Char driver */ 84 - #define FR_BZ_INT_ADR_CHAR 0x00000040 85 - #define FRF_BZ_NORM_INT_VEC_DIS_CHAR_LBN 64 86 - #define FRF_BZ_NORM_INT_VEC_DIS_CHAR_WIDTH 1 87 - #define FRF_BZ_INT_ADR_CHAR_LBN 0 88 - #define FRF_BZ_INT_ADR_CHAR_WIDTH 64 89 - 90 - /* INT_ACK_KER: Kernel interrupt acknowledge register */ 91 - #define FR_AA_INT_ACK_KER 0x00000050 92 - #define FRF_AA_INT_ACK_KER_FIELD_LBN 0 93 - #define FRF_AA_INT_ACK_KER_FIELD_WIDTH 32 94 - 95 - /* INT_ISR0_REG: Function 0 Interrupt Acknowledge Status register */ 96 - #define FR_BZ_INT_ISR0 0x00000090 97 - #define FRF_BZ_INT_ISR_REG_LBN 0 98 - #define FRF_BZ_INT_ISR_REG_WIDTH 64 99 - 100 - /* HW_INIT_REG: Hardware initialization register */ 101 - #define FR_AZ_HW_INIT 0x000000c0 102 - #define FRF_BB_BDMRD_CPLF_FULL_LBN 124 103 - #define FRF_BB_BDMRD_CPLF_FULL_WIDTH 1 104 - #define FRF_BB_PCIE_CPL_TIMEOUT_CTRL_LBN 121 105 - #define FRF_BB_PCIE_CPL_TIMEOUT_CTRL_WIDTH 3 106 - #define FRF_CZ_TX_MRG_TAGS_LBN 120 107 - #define FRF_CZ_TX_MRG_TAGS_WIDTH 1 108 - #define FRF_AB_TRGT_MASK_ALL_LBN 100 109 - #define FRF_AB_TRGT_MASK_ALL_WIDTH 1 110 - #define FRF_AZ_DOORBELL_DROP_LBN 92 111 - #define FRF_AZ_DOORBELL_DROP_WIDTH 8 112 - #define FRF_AB_TX_RREQ_MASK_EN_LBN 76 113 - #define FRF_AB_TX_RREQ_MASK_EN_WIDTH 1 114 - #define FRF_AB_PE_EIDLE_DIS_LBN 75 115 - #define FRF_AB_PE_EIDLE_DIS_WIDTH 1 116 - #define FRF_AA_FC_BLOCKING_EN_LBN 45 117 - #define FRF_AA_FC_BLOCKING_EN_WIDTH 1 118 - #define FRF_BZ_B2B_REQ_EN_LBN 45 119 - #define FRF_BZ_B2B_REQ_EN_WIDTH 1 120 - #define FRF_AA_B2B_REQ_EN_LBN 44 121 - #define FRF_AA_B2B_REQ_EN_WIDTH 1 122 - #define FRF_BB_FC_BLOCKING_EN_LBN 44 123 - #define FRF_BB_FC_BLOCKING_EN_WIDTH 1 124 - #define FRF_AZ_POST_WR_MASK_LBN 40 125 - #define FRF_AZ_POST_WR_MASK_WIDTH 4 126 - #define FRF_AZ_TLP_TC_LBN 34 127 - #define FRF_AZ_TLP_TC_WIDTH 3 128 - #define FRF_AZ_TLP_ATTR_LBN 32 129 - #define FRF_AZ_TLP_ATTR_WIDTH 2 130 - #define FRF_AB_INTB_VEC_LBN 24 131 - #define FRF_AB_INTB_VEC_WIDTH 5 132 - #define FRF_AB_INTA_VEC_LBN 16 133 - #define FRF_AB_INTA_VEC_WIDTH 5 134 - #define FRF_AZ_WD_TIMER_LBN 8 135 - #define FRF_AZ_WD_TIMER_WIDTH 8 136 - #define FRF_AZ_US_DISABLE_LBN 5 137 - #define FRF_AZ_US_DISABLE_WIDTH 1 138 - #define FRF_AZ_TLP_EP_LBN 4 139 - #define FRF_AZ_TLP_EP_WIDTH 1 140 - #define FRF_AZ_ATTR_SEL_LBN 3 141 - #define FRF_AZ_ATTR_SEL_WIDTH 1 142 - #define FRF_AZ_TD_SEL_LBN 1 143 - #define FRF_AZ_TD_SEL_WIDTH 1 144 - #define FRF_AZ_TLP_TD_LBN 0 145 - #define FRF_AZ_TLP_TD_WIDTH 1 146 - 147 - /* EE_SPI_HCMD_REG: SPI host command register */ 148 - #define FR_AB_EE_SPI_HCMD 0x00000100 149 - #define FRF_AB_EE_SPI_HCMD_CMD_EN_LBN 31 150 - #define FRF_AB_EE_SPI_HCMD_CMD_EN_WIDTH 1 151 - #define FRF_AB_EE_WR_TIMER_ACTIVE_LBN 28 152 - #define FRF_AB_EE_WR_TIMER_ACTIVE_WIDTH 1 153 - #define FRF_AB_EE_SPI_HCMD_SF_SEL_LBN 24 154 - #define FRF_AB_EE_SPI_HCMD_SF_SEL_WIDTH 1 155 - #define FRF_AB_EE_SPI_HCMD_DABCNT_LBN 16 156 - #define FRF_AB_EE_SPI_HCMD_DABCNT_WIDTH 5 157 - #define FRF_AB_EE_SPI_HCMD_READ_LBN 15 158 - #define FRF_AB_EE_SPI_HCMD_READ_WIDTH 1 159 - #define FRF_AB_EE_SPI_HCMD_DUBCNT_LBN 12 160 - #define FRF_AB_EE_SPI_HCMD_DUBCNT_WIDTH 2 161 - #define FRF_AB_EE_SPI_HCMD_ADBCNT_LBN 8 162 - #define FRF_AB_EE_SPI_HCMD_ADBCNT_WIDTH 2 163 - #define FRF_AB_EE_SPI_HCMD_ENC_LBN 0 164 - #define FRF_AB_EE_SPI_HCMD_ENC_WIDTH 8 165 - 166 - /* USR_EV_CFG: User Level Event Configuration register */ 167 - #define FR_CZ_USR_EV_CFG 0x00000100 168 - #define FRF_CZ_USREV_DIS_LBN 16 169 - #define FRF_CZ_USREV_DIS_WIDTH 1 170 - #define FRF_CZ_DFLT_EVQ_LBN 0 171 - #define FRF_CZ_DFLT_EVQ_WIDTH 10 172 - 173 - /* EE_SPI_HADR_REG: SPI host address register */ 174 - #define FR_AB_EE_SPI_HADR 0x00000110 175 - #define FRF_AB_EE_SPI_HADR_DUBYTE_LBN 24 176 - #define FRF_AB_EE_SPI_HADR_DUBYTE_WIDTH 8 177 - #define FRF_AB_EE_SPI_HADR_ADR_LBN 0 178 - #define FRF_AB_EE_SPI_HADR_ADR_WIDTH 24 179 - 180 - /* EE_SPI_HDATA_REG: SPI host data register */ 181 - #define FR_AB_EE_SPI_HDATA 0x00000120 182 - #define FRF_AB_EE_SPI_HDATA3_LBN 96 183 - #define FRF_AB_EE_SPI_HDATA3_WIDTH 32 184 - #define FRF_AB_EE_SPI_HDATA2_LBN 64 185 - #define FRF_AB_EE_SPI_HDATA2_WIDTH 32 186 - #define FRF_AB_EE_SPI_HDATA1_LBN 32 187 - #define FRF_AB_EE_SPI_HDATA1_WIDTH 32 188 - #define FRF_AB_EE_SPI_HDATA0_LBN 0 189 - #define FRF_AB_EE_SPI_HDATA0_WIDTH 32 190 - 191 - /* EE_BASE_PAGE_REG: Expansion ROM base mirror register */ 192 - #define FR_AB_EE_BASE_PAGE 0x00000130 193 - #define FRF_AB_EE_EXPROM_MASK_LBN 16 194 - #define FRF_AB_EE_EXPROM_MASK_WIDTH 13 195 - #define FRF_AB_EE_EXP_ROM_WINDOW_BASE_LBN 0 196 - #define FRF_AB_EE_EXP_ROM_WINDOW_BASE_WIDTH 13 197 - 198 - /* EE_VPD_CFG0_REG: SPI/VPD configuration register 0 */ 199 - #define FR_AB_EE_VPD_CFG0 0x00000140 200 - #define FRF_AB_EE_SF_FASTRD_EN_LBN 127 201 - #define FRF_AB_EE_SF_FASTRD_EN_WIDTH 1 202 - #define FRF_AB_EE_SF_CLOCK_DIV_LBN 120 203 - #define FRF_AB_EE_SF_CLOCK_DIV_WIDTH 7 204 - #define FRF_AB_EE_VPD_WIP_POLL_LBN 119 205 - #define FRF_AB_EE_VPD_WIP_POLL_WIDTH 1 206 - #define FRF_AB_EE_EE_CLOCK_DIV_LBN 112 207 - #define FRF_AB_EE_EE_CLOCK_DIV_WIDTH 7 208 - #define FRF_AB_EE_EE_WR_TMR_VALUE_LBN 96 209 - #define FRF_AB_EE_EE_WR_TMR_VALUE_WIDTH 16 210 - #define FRF_AB_EE_VPDW_LENGTH_LBN 80 211 - #define FRF_AB_EE_VPDW_LENGTH_WIDTH 15 212 - #define FRF_AB_EE_VPDW_BASE_LBN 64 213 - #define FRF_AB_EE_VPDW_BASE_WIDTH 15 214 - #define FRF_AB_EE_VPD_WR_CMD_EN_LBN 56 215 - #define FRF_AB_EE_VPD_WR_CMD_EN_WIDTH 8 216 - #define FRF_AB_EE_VPD_BASE_LBN 32 217 - #define FRF_AB_EE_VPD_BASE_WIDTH 24 218 - #define FRF_AB_EE_VPD_LENGTH_LBN 16 219 - #define FRF_AB_EE_VPD_LENGTH_WIDTH 15 220 - #define FRF_AB_EE_VPD_AD_SIZE_LBN 8 221 - #define FRF_AB_EE_VPD_AD_SIZE_WIDTH 5 222 - #define FRF_AB_EE_VPD_ACCESS_ON_LBN 5 223 - #define FRF_AB_EE_VPD_ACCESS_ON_WIDTH 1 224 - #define FRF_AB_EE_VPD_ACCESS_BLOCK_LBN 4 225 - #define FRF_AB_EE_VPD_ACCESS_BLOCK_WIDTH 1 226 - #define FRF_AB_EE_VPD_DEV_SF_SEL_LBN 2 227 - #define FRF_AB_EE_VPD_DEV_SF_SEL_WIDTH 1 228 - #define FRF_AB_EE_VPD_EN_AD9_MODE_LBN 1 229 - #define FRF_AB_EE_VPD_EN_AD9_MODE_WIDTH 1 230 - #define FRF_AB_EE_VPD_EN_LBN 0 231 - #define FRF_AB_EE_VPD_EN_WIDTH 1 232 - 233 - /* EE_VPD_SW_CNTL_REG: VPD access SW control register */ 234 - #define FR_AB_EE_VPD_SW_CNTL 0x00000150 235 - #define FRF_AB_EE_VPD_CYCLE_PENDING_LBN 31 236 - #define FRF_AB_EE_VPD_CYCLE_PENDING_WIDTH 1 237 - #define FRF_AB_EE_VPD_CYC_WRITE_LBN 28 238 - #define FRF_AB_EE_VPD_CYC_WRITE_WIDTH 1 239 - #define FRF_AB_EE_VPD_CYC_ADR_LBN 0 240 - #define FRF_AB_EE_VPD_CYC_ADR_WIDTH 15 241 - 242 - /* EE_VPD_SW_DATA_REG: VPD access SW data register */ 243 - #define FR_AB_EE_VPD_SW_DATA 0x00000160 244 - #define FRF_AB_EE_VPD_CYC_DAT_LBN 0 245 - #define FRF_AB_EE_VPD_CYC_DAT_WIDTH 32 246 - 247 - /* PBMX_DBG_IADDR_REG: Capture Module address register */ 248 - #define FR_CZ_PBMX_DBG_IADDR 0x000001f0 249 - #define FRF_CZ_PBMX_DBG_IADDR_LBN 0 250 - #define FRF_CZ_PBMX_DBG_IADDR_WIDTH 32 251 - 252 - /* PCIE_CORE_INDIRECT_REG: Indirect Access to PCIE Core registers */ 253 - #define FR_BB_PCIE_CORE_INDIRECT 0x000001f0 254 - #define FRF_BB_PCIE_CORE_TARGET_DATA_LBN 32 255 - #define FRF_BB_PCIE_CORE_TARGET_DATA_WIDTH 32 256 - #define FRF_BB_PCIE_CORE_INDIRECT_ACCESS_DIR_LBN 15 257 - #define FRF_BB_PCIE_CORE_INDIRECT_ACCESS_DIR_WIDTH 1 258 - #define FRF_BB_PCIE_CORE_TARGET_REG_ADRS_LBN 0 259 - #define FRF_BB_PCIE_CORE_TARGET_REG_ADRS_WIDTH 12 260 - 261 - /* PBMX_DBG_IDATA_REG: Capture Module data register */ 262 - #define FR_CZ_PBMX_DBG_IDATA 0x000001f8 263 - #define FRF_CZ_PBMX_DBG_IDATA_LBN 0 264 - #define FRF_CZ_PBMX_DBG_IDATA_WIDTH 64 265 - 266 - /* NIC_STAT_REG: NIC status register */ 267 - #define FR_AB_NIC_STAT 0x00000200 268 - #define FRF_BB_AER_DIS_LBN 34 269 - #define FRF_BB_AER_DIS_WIDTH 1 270 - #define FRF_BB_EE_STRAP_EN_LBN 31 271 - #define FRF_BB_EE_STRAP_EN_WIDTH 1 272 - #define FRF_BB_EE_STRAP_LBN 24 273 - #define FRF_BB_EE_STRAP_WIDTH 4 274 - #define FRF_BB_REVISION_ID_LBN 17 275 - #define FRF_BB_REVISION_ID_WIDTH 7 276 - #define FRF_AB_ONCHIP_SRAM_LBN 16 277 - #define FRF_AB_ONCHIP_SRAM_WIDTH 1 278 - #define FRF_AB_SF_PRST_LBN 9 279 - #define FRF_AB_SF_PRST_WIDTH 1 280 - #define FRF_AB_EE_PRST_LBN 8 281 - #define FRF_AB_EE_PRST_WIDTH 1 282 - #define FRF_AB_ATE_MODE_LBN 3 283 - #define FRF_AB_ATE_MODE_WIDTH 1 284 - #define FRF_AB_STRAP_PINS_LBN 0 285 - #define FRF_AB_STRAP_PINS_WIDTH 3 286 - 287 - /* GPIO_CTL_REG: GPIO control register */ 288 - #define FR_AB_GPIO_CTL 0x00000210 289 - #define FRF_AB_GPIO_OUT3_LBN 112 290 - #define FRF_AB_GPIO_OUT3_WIDTH 16 291 - #define FRF_AB_GPIO_IN3_LBN 104 292 - #define FRF_AB_GPIO_IN3_WIDTH 8 293 - #define FRF_AB_GPIO_PWRUP_VALUE3_LBN 96 294 - #define FRF_AB_GPIO_PWRUP_VALUE3_WIDTH 8 295 - #define FRF_AB_GPIO_OUT2_LBN 80 296 - #define FRF_AB_GPIO_OUT2_WIDTH 16 297 - #define FRF_AB_GPIO_IN2_LBN 72 298 - #define FRF_AB_GPIO_IN2_WIDTH 8 299 - #define FRF_AB_GPIO_PWRUP_VALUE2_LBN 64 300 - #define FRF_AB_GPIO_PWRUP_VALUE2_WIDTH 8 301 - #define FRF_AB_GPIO15_OEN_LBN 63 302 - #define FRF_AB_GPIO15_OEN_WIDTH 1 303 - #define FRF_AB_GPIO14_OEN_LBN 62 304 - #define FRF_AB_GPIO14_OEN_WIDTH 1 305 - #define FRF_AB_GPIO13_OEN_LBN 61 306 - #define FRF_AB_GPIO13_OEN_WIDTH 1 307 - #define FRF_AB_GPIO12_OEN_LBN 60 308 - #define FRF_AB_GPIO12_OEN_WIDTH 1 309 - #define FRF_AB_GPIO11_OEN_LBN 59 310 - #define FRF_AB_GPIO11_OEN_WIDTH 1 311 - #define FRF_AB_GPIO10_OEN_LBN 58 312 - #define FRF_AB_GPIO10_OEN_WIDTH 1 313 - #define FRF_AB_GPIO9_OEN_LBN 57 314 - #define FRF_AB_GPIO9_OEN_WIDTH 1 315 - #define FRF_AB_GPIO8_OEN_LBN 56 316 - #define FRF_AB_GPIO8_OEN_WIDTH 1 317 - #define FRF_AB_GPIO15_OUT_LBN 55 318 - #define FRF_AB_GPIO15_OUT_WIDTH 1 319 - #define FRF_AB_GPIO14_OUT_LBN 54 320 - #define FRF_AB_GPIO14_OUT_WIDTH 1 321 - #define FRF_AB_GPIO13_OUT_LBN 53 322 - #define FRF_AB_GPIO13_OUT_WIDTH 1 323 - #define FRF_AB_GPIO12_OUT_LBN 52 324 - #define FRF_AB_GPIO12_OUT_WIDTH 1 325 - #define FRF_AB_GPIO11_OUT_LBN 51 326 - #define FRF_AB_GPIO11_OUT_WIDTH 1 327 - #define FRF_AB_GPIO10_OUT_LBN 50 328 - #define FRF_AB_GPIO10_OUT_WIDTH 1 329 - #define FRF_AB_GPIO9_OUT_LBN 49 330 - #define FRF_AB_GPIO9_OUT_WIDTH 1 331 - #define FRF_AB_GPIO8_OUT_LBN 48 332 - #define FRF_AB_GPIO8_OUT_WIDTH 1 333 - #define FRF_AB_GPIO15_IN_LBN 47 334 - #define FRF_AB_GPIO15_IN_WIDTH 1 335 - #define FRF_AB_GPIO14_IN_LBN 46 336 - #define FRF_AB_GPIO14_IN_WIDTH 1 337 - #define FRF_AB_GPIO13_IN_LBN 45 338 - #define FRF_AB_GPIO13_IN_WIDTH 1 339 - #define FRF_AB_GPIO12_IN_LBN 44 340 - #define FRF_AB_GPIO12_IN_WIDTH 1 341 - #define FRF_AB_GPIO11_IN_LBN 43 342 - #define FRF_AB_GPIO11_IN_WIDTH 1 343 - #define FRF_AB_GPIO10_IN_LBN 42 344 - #define FRF_AB_GPIO10_IN_WIDTH 1 345 - #define FRF_AB_GPIO9_IN_LBN 41 346 - #define FRF_AB_GPIO9_IN_WIDTH 1 347 - #define FRF_AB_GPIO8_IN_LBN 40 348 - #define FRF_AB_GPIO8_IN_WIDTH 1 349 - #define FRF_AB_GPIO15_PWRUP_VALUE_LBN 39 350 - #define FRF_AB_GPIO15_PWRUP_VALUE_WIDTH 1 351 - #define FRF_AB_GPIO14_PWRUP_VALUE_LBN 38 352 - #define FRF_AB_GPIO14_PWRUP_VALUE_WIDTH 1 353 - #define FRF_AB_GPIO13_PWRUP_VALUE_LBN 37 354 - #define FRF_AB_GPIO13_PWRUP_VALUE_WIDTH 1 355 - #define FRF_AB_GPIO12_PWRUP_VALUE_LBN 36 356 - #define FRF_AB_GPIO12_PWRUP_VALUE_WIDTH 1 357 - #define FRF_AB_GPIO11_PWRUP_VALUE_LBN 35 358 - #define FRF_AB_GPIO11_PWRUP_VALUE_WIDTH 1 359 - #define FRF_AB_GPIO10_PWRUP_VALUE_LBN 34 360 - #define FRF_AB_GPIO10_PWRUP_VALUE_WIDTH 1 361 - #define FRF_AB_GPIO9_PWRUP_VALUE_LBN 33 362 - #define FRF_AB_GPIO9_PWRUP_VALUE_WIDTH 1 363 - #define FRF_AB_GPIO8_PWRUP_VALUE_LBN 32 364 - #define FRF_AB_GPIO8_PWRUP_VALUE_WIDTH 1 365 - #define FRF_AB_CLK156_OUT_EN_LBN 31 366 - #define FRF_AB_CLK156_OUT_EN_WIDTH 1 367 - #define FRF_AB_USE_NIC_CLK_LBN 30 368 - #define FRF_AB_USE_NIC_CLK_WIDTH 1 369 - #define FRF_AB_GPIO5_OEN_LBN 29 370 - #define FRF_AB_GPIO5_OEN_WIDTH 1 371 - #define FRF_AB_GPIO4_OEN_LBN 28 372 - #define FRF_AB_GPIO4_OEN_WIDTH 1 373 - #define FRF_AB_GPIO3_OEN_LBN 27 374 - #define FRF_AB_GPIO3_OEN_WIDTH 1 375 - #define FRF_AB_GPIO2_OEN_LBN 26 376 - #define FRF_AB_GPIO2_OEN_WIDTH 1 377 - #define FRF_AB_GPIO1_OEN_LBN 25 378 - #define FRF_AB_GPIO1_OEN_WIDTH 1 379 - #define FRF_AB_GPIO0_OEN_LBN 24 380 - #define FRF_AB_GPIO0_OEN_WIDTH 1 381 - #define FRF_AB_GPIO7_OUT_LBN 23 382 - #define FRF_AB_GPIO7_OUT_WIDTH 1 383 - #define FRF_AB_GPIO6_OUT_LBN 22 384 - #define FRF_AB_GPIO6_OUT_WIDTH 1 385 - #define FRF_AB_GPIO5_OUT_LBN 21 386 - #define FRF_AB_GPIO5_OUT_WIDTH 1 387 - #define FRF_AB_GPIO4_OUT_LBN 20 388 - #define FRF_AB_GPIO4_OUT_WIDTH 1 389 - #define FRF_AB_GPIO3_OUT_LBN 19 390 - #define FRF_AB_GPIO3_OUT_WIDTH 1 391 - #define FRF_AB_GPIO2_OUT_LBN 18 392 - #define FRF_AB_GPIO2_OUT_WIDTH 1 393 - #define FRF_AB_GPIO1_OUT_LBN 17 394 - #define FRF_AB_GPIO1_OUT_WIDTH 1 395 - #define FRF_AB_GPIO0_OUT_LBN 16 396 - #define FRF_AB_GPIO0_OUT_WIDTH 1 397 - #define FRF_AB_GPIO7_IN_LBN 15 398 - #define FRF_AB_GPIO7_IN_WIDTH 1 399 - #define FRF_AB_GPIO6_IN_LBN 14 400 - #define FRF_AB_GPIO6_IN_WIDTH 1 401 - #define FRF_AB_GPIO5_IN_LBN 13 402 - #define FRF_AB_GPIO5_IN_WIDTH 1 403 - #define FRF_AB_GPIO4_IN_LBN 12 404 - #define FRF_AB_GPIO4_IN_WIDTH 1 405 - #define FRF_AB_GPIO3_IN_LBN 11 406 - #define FRF_AB_GPIO3_IN_WIDTH 1 407 - #define FRF_AB_GPIO2_IN_LBN 10 408 - #define FRF_AB_GPIO2_IN_WIDTH 1 409 - #define FRF_AB_GPIO1_IN_LBN 9 410 - #define FRF_AB_GPIO1_IN_WIDTH 1 411 - #define FRF_AB_GPIO0_IN_LBN 8 412 - #define FRF_AB_GPIO0_IN_WIDTH 1 413 - #define FRF_AB_GPIO7_PWRUP_VALUE_LBN 7 414 - #define FRF_AB_GPIO7_PWRUP_VALUE_WIDTH 1 415 - #define FRF_AB_GPIO6_PWRUP_VALUE_LBN 6 416 - #define FRF_AB_GPIO6_PWRUP_VALUE_WIDTH 1 417 - #define FRF_AB_GPIO5_PWRUP_VALUE_LBN 5 418 - #define FRF_AB_GPIO5_PWRUP_VALUE_WIDTH 1 419 - #define FRF_AB_GPIO4_PWRUP_VALUE_LBN 4 420 - #define FRF_AB_GPIO4_PWRUP_VALUE_WIDTH 1 421 - #define FRF_AB_GPIO3_PWRUP_VALUE_LBN 3 422 - #define FRF_AB_GPIO3_PWRUP_VALUE_WIDTH 1 423 - #define FRF_AB_GPIO2_PWRUP_VALUE_LBN 2 424 - #define FRF_AB_GPIO2_PWRUP_VALUE_WIDTH 1 425 - #define FRF_AB_GPIO1_PWRUP_VALUE_LBN 1 426 - #define FRF_AB_GPIO1_PWRUP_VALUE_WIDTH 1 427 - #define FRF_AB_GPIO0_PWRUP_VALUE_LBN 0 428 - #define FRF_AB_GPIO0_PWRUP_VALUE_WIDTH 1 429 - 430 - /* GLB_CTL_REG: Global control register */ 431 - #define FR_AB_GLB_CTL 0x00000220 432 - #define FRF_AB_EXT_PHY_RST_CTL_LBN 63 433 - #define FRF_AB_EXT_PHY_RST_CTL_WIDTH 1 434 - #define FRF_AB_XAUI_SD_RST_CTL_LBN 62 435 - #define FRF_AB_XAUI_SD_RST_CTL_WIDTH 1 436 - #define FRF_AB_PCIE_SD_RST_CTL_LBN 61 437 - #define FRF_AB_PCIE_SD_RST_CTL_WIDTH 1 438 - #define FRF_AA_PCIX_RST_CTL_LBN 60 439 - #define FRF_AA_PCIX_RST_CTL_WIDTH 1 440 - #define FRF_BB_BIU_RST_CTL_LBN 60 441 - #define FRF_BB_BIU_RST_CTL_WIDTH 1 442 - #define FRF_AB_PCIE_STKY_RST_CTL_LBN 59 443 - #define FRF_AB_PCIE_STKY_RST_CTL_WIDTH 1 444 - #define FRF_AB_PCIE_NSTKY_RST_CTL_LBN 58 445 - #define FRF_AB_PCIE_NSTKY_RST_CTL_WIDTH 1 446 - #define FRF_AB_PCIE_CORE_RST_CTL_LBN 57 447 - #define FRF_AB_PCIE_CORE_RST_CTL_WIDTH 1 448 - #define FRF_AB_XGRX_RST_CTL_LBN 56 449 - #define FRF_AB_XGRX_RST_CTL_WIDTH 1 450 - #define FRF_AB_XGTX_RST_CTL_LBN 55 451 - #define FRF_AB_XGTX_RST_CTL_WIDTH 1 452 - #define FRF_AB_EM_RST_CTL_LBN 54 453 - #define FRF_AB_EM_RST_CTL_WIDTH 1 454 - #define FRF_AB_EV_RST_CTL_LBN 53 455 - #define FRF_AB_EV_RST_CTL_WIDTH 1 456 - #define FRF_AB_SR_RST_CTL_LBN 52 457 - #define FRF_AB_SR_RST_CTL_WIDTH 1 458 - #define FRF_AB_RX_RST_CTL_LBN 51 459 - #define FRF_AB_RX_RST_CTL_WIDTH 1 460 - #define FRF_AB_TX_RST_CTL_LBN 50 461 - #define FRF_AB_TX_RST_CTL_WIDTH 1 462 - #define FRF_AB_EE_RST_CTL_LBN 49 463 - #define FRF_AB_EE_RST_CTL_WIDTH 1 464 - #define FRF_AB_CS_RST_CTL_LBN 48 465 - #define FRF_AB_CS_RST_CTL_WIDTH 1 466 - #define FRF_AB_HOT_RST_CTL_LBN 40 467 - #define FRF_AB_HOT_RST_CTL_WIDTH 2 468 - #define FRF_AB_RST_EXT_PHY_LBN 31 469 - #define FRF_AB_RST_EXT_PHY_WIDTH 1 470 - #define FRF_AB_RST_XAUI_SD_LBN 30 471 - #define FRF_AB_RST_XAUI_SD_WIDTH 1 472 - #define FRF_AB_RST_PCIE_SD_LBN 29 473 - #define FRF_AB_RST_PCIE_SD_WIDTH 1 474 - #define FRF_AA_RST_PCIX_LBN 28 475 - #define FRF_AA_RST_PCIX_WIDTH 1 476 - #define FRF_BB_RST_BIU_LBN 28 477 - #define FRF_BB_RST_BIU_WIDTH 1 478 - #define FRF_AB_RST_PCIE_STKY_LBN 27 479 - #define FRF_AB_RST_PCIE_STKY_WIDTH 1 480 - #define FRF_AB_RST_PCIE_NSTKY_LBN 26 481 - #define FRF_AB_RST_PCIE_NSTKY_WIDTH 1 482 - #define FRF_AB_RST_PCIE_CORE_LBN 25 483 - #define FRF_AB_RST_PCIE_CORE_WIDTH 1 484 - #define FRF_AB_RST_XGRX_LBN 24 485 - #define FRF_AB_RST_XGRX_WIDTH 1 486 - #define FRF_AB_RST_XGTX_LBN 23 487 - #define FRF_AB_RST_XGTX_WIDTH 1 488 - #define FRF_AB_RST_EM_LBN 22 489 - #define FRF_AB_RST_EM_WIDTH 1 490 - #define FRF_AB_RST_EV_LBN 21 491 - #define FRF_AB_RST_EV_WIDTH 1 492 - #define FRF_AB_RST_SR_LBN 20 493 - #define FRF_AB_RST_SR_WIDTH 1 494 - #define FRF_AB_RST_RX_LBN 19 495 - #define FRF_AB_RST_RX_WIDTH 1 496 - #define FRF_AB_RST_TX_LBN 18 497 - #define FRF_AB_RST_TX_WIDTH 1 498 - #define FRF_AB_RST_SF_LBN 17 499 - #define FRF_AB_RST_SF_WIDTH 1 500 - #define FRF_AB_RST_CS_LBN 16 501 - #define FRF_AB_RST_CS_WIDTH 1 502 - #define FRF_AB_INT_RST_DUR_LBN 4 503 - #define FRF_AB_INT_RST_DUR_WIDTH 3 504 - #define FRF_AB_EXT_PHY_RST_DUR_LBN 1 505 - #define FRF_AB_EXT_PHY_RST_DUR_WIDTH 3 506 - #define FFE_AB_EXT_PHY_RST_DUR_10240US 7 507 - #define FFE_AB_EXT_PHY_RST_DUR_5120US 6 508 - #define FFE_AB_EXT_PHY_RST_DUR_2560US 5 509 - #define FFE_AB_EXT_PHY_RST_DUR_1280US 4 510 - #define FFE_AB_EXT_PHY_RST_DUR_640US 3 511 - #define FFE_AB_EXT_PHY_RST_DUR_320US 2 512 - #define FFE_AB_EXT_PHY_RST_DUR_160US 1 513 - #define FFE_AB_EXT_PHY_RST_DUR_80US 0 514 - #define FRF_AB_SWRST_LBN 0 515 - #define FRF_AB_SWRST_WIDTH 1 516 - 517 - /* FATAL_INTR_REG_KER: Fatal interrupt register for Kernel */ 518 - #define FR_AZ_FATAL_INTR_KER 0x00000230 519 - #define FRF_CZ_SRAM_PERR_INT_P_KER_EN_LBN 44 520 - #define FRF_CZ_SRAM_PERR_INT_P_KER_EN_WIDTH 1 521 - #define FRF_AB_PCI_BUSERR_INT_KER_EN_LBN 43 522 - #define FRF_AB_PCI_BUSERR_INT_KER_EN_WIDTH 1 523 - #define FRF_CZ_MBU_PERR_INT_KER_EN_LBN 43 524 - #define FRF_CZ_MBU_PERR_INT_KER_EN_WIDTH 1 525 - #define FRF_AZ_SRAM_OOB_INT_KER_EN_LBN 42 526 - #define FRF_AZ_SRAM_OOB_INT_KER_EN_WIDTH 1 527 - #define FRF_AZ_BUFID_OOB_INT_KER_EN_LBN 41 528 - #define FRF_AZ_BUFID_OOB_INT_KER_EN_WIDTH 1 529 - #define FRF_AZ_MEM_PERR_INT_KER_EN_LBN 40 530 - #define FRF_AZ_MEM_PERR_INT_KER_EN_WIDTH 1 531 - #define FRF_AZ_RBUF_OWN_INT_KER_EN_LBN 39 532 - #define FRF_AZ_RBUF_OWN_INT_KER_EN_WIDTH 1 533 - #define FRF_AZ_TBUF_OWN_INT_KER_EN_LBN 38 534 - #define FRF_AZ_TBUF_OWN_INT_KER_EN_WIDTH 1 535 - #define FRF_AZ_RDESCQ_OWN_INT_KER_EN_LBN 37 536 - #define FRF_AZ_RDESCQ_OWN_INT_KER_EN_WIDTH 1 537 - #define FRF_AZ_TDESCQ_OWN_INT_KER_EN_LBN 36 538 - #define FRF_AZ_TDESCQ_OWN_INT_KER_EN_WIDTH 1 539 - #define FRF_AZ_EVQ_OWN_INT_KER_EN_LBN 35 540 - #define FRF_AZ_EVQ_OWN_INT_KER_EN_WIDTH 1 541 - #define FRF_AZ_EVF_OFLO_INT_KER_EN_LBN 34 542 - #define FRF_AZ_EVF_OFLO_INT_KER_EN_WIDTH 1 543 - #define FRF_AZ_ILL_ADR_INT_KER_EN_LBN 33 544 - #define FRF_AZ_ILL_ADR_INT_KER_EN_WIDTH 1 545 - #define FRF_AZ_SRM_PERR_INT_KER_EN_LBN 32 546 - #define FRF_AZ_SRM_PERR_INT_KER_EN_WIDTH 1 547 - #define FRF_CZ_SRAM_PERR_INT_P_KER_LBN 12 548 - #define FRF_CZ_SRAM_PERR_INT_P_KER_WIDTH 1 549 - #define FRF_AB_PCI_BUSERR_INT_KER_LBN 11 550 - #define FRF_AB_PCI_BUSERR_INT_KER_WIDTH 1 551 - #define FRF_CZ_MBU_PERR_INT_KER_LBN 11 552 - #define FRF_CZ_MBU_PERR_INT_KER_WIDTH 1 553 - #define FRF_AZ_SRAM_OOB_INT_KER_LBN 10 554 - #define FRF_AZ_SRAM_OOB_INT_KER_WIDTH 1 555 - #define FRF_AZ_BUFID_DC_OOB_INT_KER_LBN 9 556 - #define FRF_AZ_BUFID_DC_OOB_INT_KER_WIDTH 1 557 - #define FRF_AZ_MEM_PERR_INT_KER_LBN 8 558 - #define FRF_AZ_MEM_PERR_INT_KER_WIDTH 1 559 - #define FRF_AZ_RBUF_OWN_INT_KER_LBN 7 560 - #define FRF_AZ_RBUF_OWN_INT_KER_WIDTH 1 561 - #define FRF_AZ_TBUF_OWN_INT_KER_LBN 6 562 - #define FRF_AZ_TBUF_OWN_INT_KER_WIDTH 1 563 - #define FRF_AZ_RDESCQ_OWN_INT_KER_LBN 5 564 - #define FRF_AZ_RDESCQ_OWN_INT_KER_WIDTH 1 565 - #define FRF_AZ_TDESCQ_OWN_INT_KER_LBN 4 566 - #define FRF_AZ_TDESCQ_OWN_INT_KER_WIDTH 1 567 - #define FRF_AZ_EVQ_OWN_INT_KER_LBN 3 568 - #define FRF_AZ_EVQ_OWN_INT_KER_WIDTH 1 569 - #define FRF_AZ_EVF_OFLO_INT_KER_LBN 2 570 - #define FRF_AZ_EVF_OFLO_INT_KER_WIDTH 1 571 - #define FRF_AZ_ILL_ADR_INT_KER_LBN 1 572 - #define FRF_AZ_ILL_ADR_INT_KER_WIDTH 1 573 - #define FRF_AZ_SRM_PERR_INT_KER_LBN 0 574 - #define FRF_AZ_SRM_PERR_INT_KER_WIDTH 1 575 - 576 - /* FATAL_INTR_REG_CHAR: Fatal interrupt register for Char */ 577 - #define FR_BZ_FATAL_INTR_CHAR 0x00000240 578 - #define FRF_CZ_SRAM_PERR_INT_P_CHAR_EN_LBN 44 579 - #define FRF_CZ_SRAM_PERR_INT_P_CHAR_EN_WIDTH 1 580 - #define FRF_BB_PCI_BUSERR_INT_CHAR_EN_LBN 43 581 - #define FRF_BB_PCI_BUSERR_INT_CHAR_EN_WIDTH 1 582 - #define FRF_CZ_MBU_PERR_INT_CHAR_EN_LBN 43 583 - #define FRF_CZ_MBU_PERR_INT_CHAR_EN_WIDTH 1 584 - #define FRF_BZ_SRAM_OOB_INT_CHAR_EN_LBN 42 585 - #define FRF_BZ_SRAM_OOB_INT_CHAR_EN_WIDTH 1 586 - #define FRF_BZ_BUFID_OOB_INT_CHAR_EN_LBN 41 587 - #define FRF_BZ_BUFID_OOB_INT_CHAR_EN_WIDTH 1 588 - #define FRF_BZ_MEM_PERR_INT_CHAR_EN_LBN 40 589 - #define FRF_BZ_MEM_PERR_INT_CHAR_EN_WIDTH 1 590 - #define FRF_BZ_RBUF_OWN_INT_CHAR_EN_LBN 39 591 - #define FRF_BZ_RBUF_OWN_INT_CHAR_EN_WIDTH 1 592 - #define FRF_BZ_TBUF_OWN_INT_CHAR_EN_LBN 38 593 - #define FRF_BZ_TBUF_OWN_INT_CHAR_EN_WIDTH 1 594 - #define FRF_BZ_RDESCQ_OWN_INT_CHAR_EN_LBN 37 595 - #define FRF_BZ_RDESCQ_OWN_INT_CHAR_EN_WIDTH 1 596 - #define FRF_BZ_TDESCQ_OWN_INT_CHAR_EN_LBN 36 597 - #define FRF_BZ_TDESCQ_OWN_INT_CHAR_EN_WIDTH 1 598 - #define FRF_BZ_EVQ_OWN_INT_CHAR_EN_LBN 35 599 - #define FRF_BZ_EVQ_OWN_INT_CHAR_EN_WIDTH 1 600 - #define FRF_BZ_EVF_OFLO_INT_CHAR_EN_LBN 34 601 - #define FRF_BZ_EVF_OFLO_INT_CHAR_EN_WIDTH 1 602 - #define FRF_BZ_ILL_ADR_INT_CHAR_EN_LBN 33 603 - #define FRF_BZ_ILL_ADR_INT_CHAR_EN_WIDTH 1 604 - #define FRF_BZ_SRM_PERR_INT_CHAR_EN_LBN 32 605 - #define FRF_BZ_SRM_PERR_INT_CHAR_EN_WIDTH 1 606 - #define FRF_CZ_SRAM_PERR_INT_P_CHAR_LBN 12 607 - #define FRF_CZ_SRAM_PERR_INT_P_CHAR_WIDTH 1 608 - #define FRF_BB_PCI_BUSERR_INT_CHAR_LBN 11 609 - #define FRF_BB_PCI_BUSERR_INT_CHAR_WIDTH 1 610 - #define FRF_CZ_MBU_PERR_INT_CHAR_LBN 11 611 - #define FRF_CZ_MBU_PERR_INT_CHAR_WIDTH 1 612 - #define FRF_BZ_SRAM_OOB_INT_CHAR_LBN 10 613 - #define FRF_BZ_SRAM_OOB_INT_CHAR_WIDTH 1 614 - #define FRF_BZ_BUFID_DC_OOB_INT_CHAR_LBN 9 615 - #define FRF_BZ_BUFID_DC_OOB_INT_CHAR_WIDTH 1 616 - #define FRF_BZ_MEM_PERR_INT_CHAR_LBN 8 617 - #define FRF_BZ_MEM_PERR_INT_CHAR_WIDTH 1 618 - #define FRF_BZ_RBUF_OWN_INT_CHAR_LBN 7 619 - #define FRF_BZ_RBUF_OWN_INT_CHAR_WIDTH 1 620 - #define FRF_BZ_TBUF_OWN_INT_CHAR_LBN 6 621 - #define FRF_BZ_TBUF_OWN_INT_CHAR_WIDTH 1 622 - #define FRF_BZ_RDESCQ_OWN_INT_CHAR_LBN 5 623 - #define FRF_BZ_RDESCQ_OWN_INT_CHAR_WIDTH 1 624 - #define FRF_BZ_TDESCQ_OWN_INT_CHAR_LBN 4 625 - #define FRF_BZ_TDESCQ_OWN_INT_CHAR_WIDTH 1 626 - #define FRF_BZ_EVQ_OWN_INT_CHAR_LBN 3 627 - #define FRF_BZ_EVQ_OWN_INT_CHAR_WIDTH 1 628 - #define FRF_BZ_EVF_OFLO_INT_CHAR_LBN 2 629 - #define FRF_BZ_EVF_OFLO_INT_CHAR_WIDTH 1 630 - #define FRF_BZ_ILL_ADR_INT_CHAR_LBN 1 631 - #define FRF_BZ_ILL_ADR_INT_CHAR_WIDTH 1 632 - #define FRF_BZ_SRM_PERR_INT_CHAR_LBN 0 633 - #define FRF_BZ_SRM_PERR_INT_CHAR_WIDTH 1 634 - 635 - /* DP_CTRL_REG: Datapath control register */ 636 - #define FR_BZ_DP_CTRL 0x00000250 637 - #define FRF_BZ_FLS_EVQ_ID_LBN 0 638 - #define FRF_BZ_FLS_EVQ_ID_WIDTH 12 639 - 640 - /* MEM_STAT_REG: Memory status register */ 641 - #define FR_AZ_MEM_STAT 0x00000260 642 - #define FRF_AB_MEM_PERR_VEC_LBN 53 643 - #define FRF_AB_MEM_PERR_VEC_WIDTH 38 644 - #define FRF_AB_MBIST_CORR_LBN 38 645 - #define FRF_AB_MBIST_CORR_WIDTH 15 646 - #define FRF_AB_MBIST_ERR_LBN 0 647 - #define FRF_AB_MBIST_ERR_WIDTH 40 648 - #define FRF_CZ_MEM_PERR_VEC_LBN 0 649 - #define FRF_CZ_MEM_PERR_VEC_WIDTH 35 650 - 651 - /* CS_DEBUG_REG: Debug register */ 652 - #define FR_AZ_CS_DEBUG 0x00000270 653 - #define FRF_AB_GLB_DEBUG2_SEL_LBN 50 654 - #define FRF_AB_GLB_DEBUG2_SEL_WIDTH 3 655 - #define FRF_AB_DEBUG_BLK_SEL2_LBN 47 656 - #define FRF_AB_DEBUG_BLK_SEL2_WIDTH 3 657 - #define FRF_AB_DEBUG_BLK_SEL1_LBN 44 658 - #define FRF_AB_DEBUG_BLK_SEL1_WIDTH 3 659 - #define FRF_AB_DEBUG_BLK_SEL0_LBN 41 660 - #define FRF_AB_DEBUG_BLK_SEL0_WIDTH 3 661 - #define FRF_CZ_CS_PORT_NUM_LBN 40 662 - #define FRF_CZ_CS_PORT_NUM_WIDTH 2 663 - #define FRF_AB_MISC_DEBUG_ADDR_LBN 36 664 - #define FRF_AB_MISC_DEBUG_ADDR_WIDTH 5 665 - #define FRF_AB_SERDES_DEBUG_ADDR_LBN 31 666 - #define FRF_AB_SERDES_DEBUG_ADDR_WIDTH 5 667 - #define FRF_CZ_CS_PORT_FPE_LBN 1 668 - #define FRF_CZ_CS_PORT_FPE_WIDTH 35 669 - #define FRF_AB_EM_DEBUG_ADDR_LBN 26 670 - #define FRF_AB_EM_DEBUG_ADDR_WIDTH 5 671 - #define FRF_AB_SR_DEBUG_ADDR_LBN 21 672 - #define FRF_AB_SR_DEBUG_ADDR_WIDTH 5 673 - #define FRF_AB_EV_DEBUG_ADDR_LBN 16 674 - #define FRF_AB_EV_DEBUG_ADDR_WIDTH 5 675 - #define FRF_AB_RX_DEBUG_ADDR_LBN 11 676 - #define FRF_AB_RX_DEBUG_ADDR_WIDTH 5 677 - #define FRF_AB_TX_DEBUG_ADDR_LBN 6 678 - #define FRF_AB_TX_DEBUG_ADDR_WIDTH 5 679 - #define FRF_AB_CS_BIU_DEBUG_ADDR_LBN 1 680 - #define FRF_AB_CS_BIU_DEBUG_ADDR_WIDTH 5 681 - #define FRF_AZ_CS_DEBUG_EN_LBN 0 682 - #define FRF_AZ_CS_DEBUG_EN_WIDTH 1 683 - 684 - /* DRIVER_REG: Driver scratch register [0-7] */ 685 - #define FR_AZ_DRIVER 0x00000280 686 - #define FR_AZ_DRIVER_STEP 16 687 - #define FR_AZ_DRIVER_ROWS 8 688 - #define FRF_AZ_DRIVER_DW0_LBN 0 689 - #define FRF_AZ_DRIVER_DW0_WIDTH 32 690 - 691 - /* ALTERA_BUILD_REG: Altera build register */ 692 - #define FR_AZ_ALTERA_BUILD 0x00000300 693 - #define FRF_AZ_ALTERA_BUILD_VER_LBN 0 694 - #define FRF_AZ_ALTERA_BUILD_VER_WIDTH 32 695 - 696 - /* CSR_SPARE_REG: Spare register */ 697 - #define FR_AZ_CSR_SPARE 0x00000310 698 - #define FRF_AB_MEM_PERR_EN_LBN 64 699 - #define FRF_AB_MEM_PERR_EN_WIDTH 38 700 - #define FRF_CZ_MEM_PERR_EN_LBN 64 701 - #define FRF_CZ_MEM_PERR_EN_WIDTH 35 702 - #define FRF_AB_MEM_PERR_EN_TX_DATA_LBN 72 703 - #define FRF_AB_MEM_PERR_EN_TX_DATA_WIDTH 2 704 - #define FRF_AZ_CSR_SPARE_BITS_LBN 0 705 - #define FRF_AZ_CSR_SPARE_BITS_WIDTH 32 706 - 707 - /* PCIE_SD_CTL0123_REG: PCIE SerDes control register 0 to 3 */ 708 - #define FR_AB_PCIE_SD_CTL0123 0x00000320 709 - #define FRF_AB_PCIE_TESTSIG_H_LBN 96 710 - #define FRF_AB_PCIE_TESTSIG_H_WIDTH 19 711 - #define FRF_AB_PCIE_TESTSIG_L_LBN 64 712 - #define FRF_AB_PCIE_TESTSIG_L_WIDTH 19 713 - #define FRF_AB_PCIE_OFFSET_LBN 56 714 - #define FRF_AB_PCIE_OFFSET_WIDTH 8 715 - #define FRF_AB_PCIE_OFFSETEN_H_LBN 55 716 - #define FRF_AB_PCIE_OFFSETEN_H_WIDTH 1 717 - #define FRF_AB_PCIE_OFFSETEN_L_LBN 54 718 - #define FRF_AB_PCIE_OFFSETEN_L_WIDTH 1 719 - #define FRF_AB_PCIE_HIVMODE_H_LBN 53 720 - #define FRF_AB_PCIE_HIVMODE_H_WIDTH 1 721 - #define FRF_AB_PCIE_HIVMODE_L_LBN 52 722 - #define FRF_AB_PCIE_HIVMODE_L_WIDTH 1 723 - #define FRF_AB_PCIE_PARRESET_H_LBN 51 724 - #define FRF_AB_PCIE_PARRESET_H_WIDTH 1 725 - #define FRF_AB_PCIE_PARRESET_L_LBN 50 726 - #define FRF_AB_PCIE_PARRESET_L_WIDTH 1 727 - #define FRF_AB_PCIE_LPBKWDRV_H_LBN 49 728 - #define FRF_AB_PCIE_LPBKWDRV_H_WIDTH 1 729 - #define FRF_AB_PCIE_LPBKWDRV_L_LBN 48 730 - #define FRF_AB_PCIE_LPBKWDRV_L_WIDTH 1 731 - #define FRF_AB_PCIE_LPBK_LBN 40 732 - #define FRF_AB_PCIE_LPBK_WIDTH 8 733 - #define FRF_AB_PCIE_PARLPBK_LBN 32 734 - #define FRF_AB_PCIE_PARLPBK_WIDTH 8 735 - #define FRF_AB_PCIE_RXTERMADJ_H_LBN 30 736 - #define FRF_AB_PCIE_RXTERMADJ_H_WIDTH 2 737 - #define FRF_AB_PCIE_RXTERMADJ_L_LBN 28 738 - #define FRF_AB_PCIE_RXTERMADJ_L_WIDTH 2 739 - #define FFE_AB_PCIE_RXTERMADJ_MIN15PCNT 3 740 - #define FFE_AB_PCIE_RXTERMADJ_PL10PCNT 2 741 - #define FFE_AB_PCIE_RXTERMADJ_MIN17PCNT 1 742 - #define FFE_AB_PCIE_RXTERMADJ_NOMNL 0 743 - #define FRF_AB_PCIE_TXTERMADJ_H_LBN 26 744 - #define FRF_AB_PCIE_TXTERMADJ_H_WIDTH 2 745 - #define FRF_AB_PCIE_TXTERMADJ_L_LBN 24 746 - #define FRF_AB_PCIE_TXTERMADJ_L_WIDTH 2 747 - #define FFE_AB_PCIE_TXTERMADJ_MIN15PCNT 3 748 - #define FFE_AB_PCIE_TXTERMADJ_PL10PCNT 2 749 - #define FFE_AB_PCIE_TXTERMADJ_MIN17PCNT 1 750 - #define FFE_AB_PCIE_TXTERMADJ_NOMNL 0 751 - #define FRF_AB_PCIE_RXEQCTL_H_LBN 18 752 - #define FRF_AB_PCIE_RXEQCTL_H_WIDTH 2 753 - #define FRF_AB_PCIE_RXEQCTL_L_LBN 16 754 - #define FRF_AB_PCIE_RXEQCTL_L_WIDTH 2 755 - #define FFE_AB_PCIE_RXEQCTL_OFF_ALT 3 756 - #define FFE_AB_PCIE_RXEQCTL_OFF 2 757 - #define FFE_AB_PCIE_RXEQCTL_MIN 1 758 - #define FFE_AB_PCIE_RXEQCTL_MAX 0 759 - #define FRF_AB_PCIE_HIDRV_LBN 8 760 - #define FRF_AB_PCIE_HIDRV_WIDTH 8 761 - #define FRF_AB_PCIE_LODRV_LBN 0 762 - #define FRF_AB_PCIE_LODRV_WIDTH 8 763 - 764 - /* PCIE_SD_CTL45_REG: PCIE SerDes control register 4 and 5 */ 765 - #define FR_AB_PCIE_SD_CTL45 0x00000330 766 - #define FRF_AB_PCIE_DTX7_LBN 60 767 - #define FRF_AB_PCIE_DTX7_WIDTH 4 768 - #define FRF_AB_PCIE_DTX6_LBN 56 769 - #define FRF_AB_PCIE_DTX6_WIDTH 4 770 - #define FRF_AB_PCIE_DTX5_LBN 52 771 - #define FRF_AB_PCIE_DTX5_WIDTH 4 772 - #define FRF_AB_PCIE_DTX4_LBN 48 773 - #define FRF_AB_PCIE_DTX4_WIDTH 4 774 - #define FRF_AB_PCIE_DTX3_LBN 44 775 - #define FRF_AB_PCIE_DTX3_WIDTH 4 776 - #define FRF_AB_PCIE_DTX2_LBN 40 777 - #define FRF_AB_PCIE_DTX2_WIDTH 4 778 - #define FRF_AB_PCIE_DTX1_LBN 36 779 - #define FRF_AB_PCIE_DTX1_WIDTH 4 780 - #define FRF_AB_PCIE_DTX0_LBN 32 781 - #define FRF_AB_PCIE_DTX0_WIDTH 4 782 - #define FRF_AB_PCIE_DEQ7_LBN 28 783 - #define FRF_AB_PCIE_DEQ7_WIDTH 4 784 - #define FRF_AB_PCIE_DEQ6_LBN 24 785 - #define FRF_AB_PCIE_DEQ6_WIDTH 4 786 - #define FRF_AB_PCIE_DEQ5_LBN 20 787 - #define FRF_AB_PCIE_DEQ5_WIDTH 4 788 - #define FRF_AB_PCIE_DEQ4_LBN 16 789 - #define FRF_AB_PCIE_DEQ4_WIDTH 4 790 - #define FRF_AB_PCIE_DEQ3_LBN 12 791 - #define FRF_AB_PCIE_DEQ3_WIDTH 4 792 - #define FRF_AB_PCIE_DEQ2_LBN 8 793 - #define FRF_AB_PCIE_DEQ2_WIDTH 4 794 - #define FRF_AB_PCIE_DEQ1_LBN 4 795 - #define FRF_AB_PCIE_DEQ1_WIDTH 4 796 - #define FRF_AB_PCIE_DEQ0_LBN 0 797 - #define FRF_AB_PCIE_DEQ0_WIDTH 4 798 - 799 - /* PCIE_PCS_CTL_STAT_REG: PCIE PCS control and status register */ 800 - #define FR_AB_PCIE_PCS_CTL_STAT 0x00000340 801 - #define FRF_AB_PCIE_PRBSERRCOUNT0_H_LBN 52 802 - #define FRF_AB_PCIE_PRBSERRCOUNT0_H_WIDTH 4 803 - #define FRF_AB_PCIE_PRBSERRCOUNT0_L_LBN 48 804 - #define FRF_AB_PCIE_PRBSERRCOUNT0_L_WIDTH 4 805 - #define FRF_AB_PCIE_PRBSERR_LBN 40 806 - #define FRF_AB_PCIE_PRBSERR_WIDTH 8 807 - #define FRF_AB_PCIE_PRBSERRH0_LBN 32 808 - #define FRF_AB_PCIE_PRBSERRH0_WIDTH 8 809 - #define FRF_AB_PCIE_FASTINIT_H_LBN 15 810 - #define FRF_AB_PCIE_FASTINIT_H_WIDTH 1 811 - #define FRF_AB_PCIE_FASTINIT_L_LBN 14 812 - #define FRF_AB_PCIE_FASTINIT_L_WIDTH 1 813 - #define FRF_AB_PCIE_CTCDISABLE_H_LBN 13 814 - #define FRF_AB_PCIE_CTCDISABLE_H_WIDTH 1 815 - #define FRF_AB_PCIE_CTCDISABLE_L_LBN 12 816 - #define FRF_AB_PCIE_CTCDISABLE_L_WIDTH 1 817 - #define FRF_AB_PCIE_PRBSSYNC_H_LBN 11 818 - #define FRF_AB_PCIE_PRBSSYNC_H_WIDTH 1 819 - #define FRF_AB_PCIE_PRBSSYNC_L_LBN 10 820 - #define FRF_AB_PCIE_PRBSSYNC_L_WIDTH 1 821 - #define FRF_AB_PCIE_PRBSERRACK_H_LBN 9 822 - #define FRF_AB_PCIE_PRBSERRACK_H_WIDTH 1 823 - #define FRF_AB_PCIE_PRBSERRACK_L_LBN 8 824 - #define FRF_AB_PCIE_PRBSERRACK_L_WIDTH 1 825 - #define FRF_AB_PCIE_PRBSSEL_LBN 0 826 - #define FRF_AB_PCIE_PRBSSEL_WIDTH 8 827 - 828 - /* DEBUG_DATA_OUT_REG: Live Debug and Debug 2 out ports */ 829 - #define FR_BB_DEBUG_DATA_OUT 0x00000350 830 - #define FRF_BB_DEBUG2_PORT_LBN 25 831 - #define FRF_BB_DEBUG2_PORT_WIDTH 15 832 - #define FRF_BB_DEBUG1_PORT_LBN 0 833 - #define FRF_BB_DEBUG1_PORT_WIDTH 25 834 - 835 - /* EVQ_RPTR_REGP0: Event queue read pointer register */ 836 - #define FR_BZ_EVQ_RPTR_P0 0x00000400 837 - #define FR_BZ_EVQ_RPTR_P0_STEP 8192 838 - #define FR_BZ_EVQ_RPTR_P0_ROWS 1024 839 - /* EVQ_RPTR_REG_KER: Event queue read pointer register */ 840 - #define FR_AA_EVQ_RPTR_KER 0x00011b00 841 - #define FR_AA_EVQ_RPTR_KER_STEP 4 842 - #define FR_AA_EVQ_RPTR_KER_ROWS 4 843 - /* EVQ_RPTR_REG: Event queue read pointer register */ 844 - #define FR_BZ_EVQ_RPTR 0x00fa0000 845 - #define FR_BZ_EVQ_RPTR_STEP 16 846 - #define FR_BB_EVQ_RPTR_ROWS 4096 847 - #define FR_CZ_EVQ_RPTR_ROWS 1024 848 - /* EVQ_RPTR_REGP123: Event queue read pointer register */ 849 - #define FR_BB_EVQ_RPTR_P123 0x01000400 850 - #define FR_BB_EVQ_RPTR_P123_STEP 8192 851 - #define FR_BB_EVQ_RPTR_P123_ROWS 3072 852 - #define FRF_AZ_EVQ_RPTR_VLD_LBN 15 853 - #define FRF_AZ_EVQ_RPTR_VLD_WIDTH 1 854 - #define FRF_AZ_EVQ_RPTR_LBN 0 855 - #define FRF_AZ_EVQ_RPTR_WIDTH 15 856 - 857 - /* TIMER_COMMAND_REGP0: Timer Command Registers */ 858 - #define FR_BZ_TIMER_COMMAND_P0 0x00000420 859 - #define FR_BZ_TIMER_COMMAND_P0_STEP 8192 860 - #define FR_BZ_TIMER_COMMAND_P0_ROWS 1024 861 - /* TIMER_COMMAND_REG_KER: Timer Command Registers */ 862 - #define FR_AA_TIMER_COMMAND_KER 0x00000420 863 - #define FR_AA_TIMER_COMMAND_KER_STEP 8192 864 - #define FR_AA_TIMER_COMMAND_KER_ROWS 4 865 - /* TIMER_COMMAND_REGP123: Timer Command Registers */ 866 - #define FR_BB_TIMER_COMMAND_P123 0x01000420 867 - #define FR_BB_TIMER_COMMAND_P123_STEP 8192 868 - #define FR_BB_TIMER_COMMAND_P123_ROWS 3072 869 - #define FRF_CZ_TC_TIMER_MODE_LBN 14 870 - #define FRF_CZ_TC_TIMER_MODE_WIDTH 2 871 - #define FRF_AB_TC_TIMER_MODE_LBN 12 872 - #define FRF_AB_TC_TIMER_MODE_WIDTH 2 873 - #define FRF_CZ_TC_TIMER_VAL_LBN 0 874 - #define FRF_CZ_TC_TIMER_VAL_WIDTH 14 875 - #define FRF_AB_TC_TIMER_VAL_LBN 0 876 - #define FRF_AB_TC_TIMER_VAL_WIDTH 12 877 - 878 - /* DRV_EV_REG: Driver generated event register */ 879 - #define FR_AZ_DRV_EV 0x00000440 880 - #define FRF_AZ_DRV_EV_QID_LBN 64 881 - #define FRF_AZ_DRV_EV_QID_WIDTH 12 882 - #define FRF_AZ_DRV_EV_DATA_LBN 0 883 - #define FRF_AZ_DRV_EV_DATA_WIDTH 64 884 - 885 - /* EVQ_CTL_REG: Event queue control register */ 886 - #define FR_AZ_EVQ_CTL 0x00000450 887 - #define FRF_CZ_RX_EVQ_WAKEUP_MASK_LBN 15 888 - #define FRF_CZ_RX_EVQ_WAKEUP_MASK_WIDTH 10 889 - #define FRF_BB_RX_EVQ_WAKEUP_MASK_LBN 15 890 - #define FRF_BB_RX_EVQ_WAKEUP_MASK_WIDTH 6 891 - #define FRF_AZ_EVQ_OWNERR_CTL_LBN 14 892 - #define FRF_AZ_EVQ_OWNERR_CTL_WIDTH 1 893 - #define FRF_AZ_EVQ_FIFO_AF_TH_LBN 7 894 - #define FRF_AZ_EVQ_FIFO_AF_TH_WIDTH 7 895 - #define FRF_AZ_EVQ_FIFO_NOTAF_TH_LBN 0 896 - #define FRF_AZ_EVQ_FIFO_NOTAF_TH_WIDTH 7 897 - 898 - /* EVQ_CNT1_REG: Event counter 1 register */ 899 - #define FR_AZ_EVQ_CNT1 0x00000460 900 - #define FRF_AZ_EVQ_CNT_PRE_FIFO_LBN 120 901 - #define FRF_AZ_EVQ_CNT_PRE_FIFO_WIDTH 7 902 - #define FRF_AZ_EVQ_CNT_TOBIU_LBN 100 903 - #define FRF_AZ_EVQ_CNT_TOBIU_WIDTH 20 904 - #define FRF_AZ_EVQ_TX_REQ_CNT_LBN 80 905 - #define FRF_AZ_EVQ_TX_REQ_CNT_WIDTH 20 906 - #define FRF_AZ_EVQ_RX_REQ_CNT_LBN 60 907 - #define FRF_AZ_EVQ_RX_REQ_CNT_WIDTH 20 908 - #define FRF_AZ_EVQ_EM_REQ_CNT_LBN 40 909 - #define FRF_AZ_EVQ_EM_REQ_CNT_WIDTH 20 910 - #define FRF_AZ_EVQ_CSR_REQ_CNT_LBN 20 911 - #define FRF_AZ_EVQ_CSR_REQ_CNT_WIDTH 20 912 - #define FRF_AZ_EVQ_ERR_REQ_CNT_LBN 0 913 - #define FRF_AZ_EVQ_ERR_REQ_CNT_WIDTH 20 914 - 915 - /* EVQ_CNT2_REG: Event counter 2 register */ 916 - #define FR_AZ_EVQ_CNT2 0x00000470 917 - #define FRF_AZ_EVQ_UPD_REQ_CNT_LBN 104 918 - #define FRF_AZ_EVQ_UPD_REQ_CNT_WIDTH 20 919 - #define FRF_AZ_EVQ_CLR_REQ_CNT_LBN 84 920 - #define FRF_AZ_EVQ_CLR_REQ_CNT_WIDTH 20 921 - #define FRF_AZ_EVQ_RDY_CNT_LBN 80 922 - #define FRF_AZ_EVQ_RDY_CNT_WIDTH 4 923 - #define FRF_AZ_EVQ_WU_REQ_CNT_LBN 60 924 - #define FRF_AZ_EVQ_WU_REQ_CNT_WIDTH 20 925 - #define FRF_AZ_EVQ_WET_REQ_CNT_LBN 40 926 - #define FRF_AZ_EVQ_WET_REQ_CNT_WIDTH 20 927 - #define FRF_AZ_EVQ_INIT_REQ_CNT_LBN 20 928 - #define FRF_AZ_EVQ_INIT_REQ_CNT_WIDTH 20 929 - #define FRF_AZ_EVQ_TM_REQ_CNT_LBN 0 930 - #define FRF_AZ_EVQ_TM_REQ_CNT_WIDTH 20 931 - 932 - /* USR_EV_REG: Event mailbox register */ 933 - #define FR_CZ_USR_EV 0x00000540 934 - #define FR_CZ_USR_EV_STEP 8192 935 - #define FR_CZ_USR_EV_ROWS 1024 936 - #define FRF_CZ_USR_EV_DATA_LBN 0 937 - #define FRF_CZ_USR_EV_DATA_WIDTH 32 938 - 939 - /* BUF_TBL_CFG_REG: Buffer table configuration register */ 940 - #define FR_AZ_BUF_TBL_CFG 0x00000600 941 - #define FRF_AZ_BUF_TBL_MODE_LBN 3 942 - #define FRF_AZ_BUF_TBL_MODE_WIDTH 1 943 - 944 - /* SRM_RX_DC_CFG_REG: SRAM receive descriptor cache configuration register */ 945 - #define FR_AZ_SRM_RX_DC_CFG 0x00000610 946 - #define FRF_AZ_SRM_CLK_TMP_EN_LBN 21 947 - #define FRF_AZ_SRM_CLK_TMP_EN_WIDTH 1 948 - #define FRF_AZ_SRM_RX_DC_BASE_ADR_LBN 0 949 - #define FRF_AZ_SRM_RX_DC_BASE_ADR_WIDTH 21 950 - 951 - /* SRM_TX_DC_CFG_REG: SRAM transmit descriptor cache configuration register */ 952 - #define FR_AZ_SRM_TX_DC_CFG 0x00000620 953 - #define FRF_AZ_SRM_TX_DC_BASE_ADR_LBN 0 954 - #define FRF_AZ_SRM_TX_DC_BASE_ADR_WIDTH 21 955 - 956 - /* SRM_CFG_REG: SRAM configuration register */ 957 - #define FR_AZ_SRM_CFG 0x00000630 958 - #define FRF_AZ_SRM_OOB_ADR_INTEN_LBN 5 959 - #define FRF_AZ_SRM_OOB_ADR_INTEN_WIDTH 1 960 - #define FRF_AZ_SRM_OOB_BUF_INTEN_LBN 4 961 - #define FRF_AZ_SRM_OOB_BUF_INTEN_WIDTH 1 962 - #define FRF_AZ_SRM_INIT_EN_LBN 3 963 - #define FRF_AZ_SRM_INIT_EN_WIDTH 1 964 - #define FRF_AZ_SRM_NUM_BANK_LBN 2 965 - #define FRF_AZ_SRM_NUM_BANK_WIDTH 1 966 - #define FRF_AZ_SRM_BANK_SIZE_LBN 0 967 - #define FRF_AZ_SRM_BANK_SIZE_WIDTH 2 968 - 969 - /* BUF_TBL_UPD_REG: Buffer table update register */ 970 - #define FR_AZ_BUF_TBL_UPD 0x00000650 971 - #define FRF_AZ_BUF_UPD_CMD_LBN 63 972 - #define FRF_AZ_BUF_UPD_CMD_WIDTH 1 973 - #define FRF_AZ_BUF_CLR_CMD_LBN 62 974 - #define FRF_AZ_BUF_CLR_CMD_WIDTH 1 975 - #define FRF_AZ_BUF_CLR_END_ID_LBN 32 976 - #define FRF_AZ_BUF_CLR_END_ID_WIDTH 20 977 - #define FRF_AZ_BUF_CLR_START_ID_LBN 0 978 - #define FRF_AZ_BUF_CLR_START_ID_WIDTH 20 979 - 980 - /* SRM_UPD_EVQ_REG: Buffer table update register */ 981 - #define FR_AZ_SRM_UPD_EVQ 0x00000660 982 - #define FRF_AZ_SRM_UPD_EVQ_ID_LBN 0 983 - #define FRF_AZ_SRM_UPD_EVQ_ID_WIDTH 12 984 - 985 - /* SRAM_PARITY_REG: SRAM parity register. */ 986 - #define FR_AZ_SRAM_PARITY 0x00000670 987 - #define FRF_CZ_BYPASS_ECC_LBN 3 988 - #define FRF_CZ_BYPASS_ECC_WIDTH 1 989 - #define FRF_CZ_SEC_INT_LBN 2 990 - #define FRF_CZ_SEC_INT_WIDTH 1 991 - #define FRF_CZ_FORCE_SRAM_DOUBLE_ERR_LBN 1 992 - #define FRF_CZ_FORCE_SRAM_DOUBLE_ERR_WIDTH 1 993 - #define FRF_AB_FORCE_SRAM_PERR_LBN 0 994 - #define FRF_AB_FORCE_SRAM_PERR_WIDTH 1 995 - #define FRF_CZ_FORCE_SRAM_SINGLE_ERR_LBN 0 996 - #define FRF_CZ_FORCE_SRAM_SINGLE_ERR_WIDTH 1 997 - 998 - /* RX_CFG_REG: Receive configuration register */ 999 - #define FR_AZ_RX_CFG 0x00000800 1000 - #define FRF_CZ_RX_MIN_KBUF_SIZE_LBN 72 1001 - #define FRF_CZ_RX_MIN_KBUF_SIZE_WIDTH 14 1002 - #define FRF_CZ_RX_HDR_SPLIT_EN_LBN 71 1003 - #define FRF_CZ_RX_HDR_SPLIT_EN_WIDTH 1 1004 - #define FRF_CZ_RX_HDR_SPLIT_PLD_BUF_SIZE_LBN 62 1005 - #define FRF_CZ_RX_HDR_SPLIT_PLD_BUF_SIZE_WIDTH 9 1006 - #define FRF_CZ_RX_HDR_SPLIT_HDR_BUF_SIZE_LBN 53 1007 - #define FRF_CZ_RX_HDR_SPLIT_HDR_BUF_SIZE_WIDTH 9 1008 - #define FRF_CZ_RX_PRE_RFF_IPG_LBN 49 1009 - #define FRF_CZ_RX_PRE_RFF_IPG_WIDTH 4 1010 - #define FRF_BZ_RX_TCP_SUP_LBN 48 1011 - #define FRF_BZ_RX_TCP_SUP_WIDTH 1 1012 - #define FRF_BZ_RX_INGR_EN_LBN 47 1013 - #define FRF_BZ_RX_INGR_EN_WIDTH 1 1014 - #define FRF_BZ_RX_IP_HASH_LBN 46 1015 - #define FRF_BZ_RX_IP_HASH_WIDTH 1 1016 - #define FRF_BZ_RX_HASH_ALG_LBN 45 1017 - #define FRF_BZ_RX_HASH_ALG_WIDTH 1 1018 - #define FRF_BZ_RX_HASH_INSRT_HDR_LBN 44 1019 - #define FRF_BZ_RX_HASH_INSRT_HDR_WIDTH 1 1020 - #define FRF_BZ_RX_DESC_PUSH_EN_LBN 43 1021 - #define FRF_BZ_RX_DESC_PUSH_EN_WIDTH 1 1022 - #define FRF_BZ_RX_RDW_PATCH_EN_LBN 42 1023 - #define FRF_BZ_RX_RDW_PATCH_EN_WIDTH 1 1024 - #define FRF_BB_RX_PCI_BURST_SIZE_LBN 39 1025 - #define FRF_BB_RX_PCI_BURST_SIZE_WIDTH 3 1026 - #define FRF_BZ_RX_OWNERR_CTL_LBN 38 1027 - #define FRF_BZ_RX_OWNERR_CTL_WIDTH 1 1028 - #define FRF_BZ_RX_XON_TX_TH_LBN 33 1029 - #define FRF_BZ_RX_XON_TX_TH_WIDTH 5 1030 - #define FRF_AA_RX_DESC_PUSH_EN_LBN 35 1031 - #define FRF_AA_RX_DESC_PUSH_EN_WIDTH 1 1032 - #define FRF_AA_RX_RDW_PATCH_EN_LBN 34 1033 - #define FRF_AA_RX_RDW_PATCH_EN_WIDTH 1 1034 - #define FRF_AA_RX_PCI_BURST_SIZE_LBN 31 1035 - #define FRF_AA_RX_PCI_BURST_SIZE_WIDTH 3 1036 - #define FRF_BZ_RX_XOFF_TX_TH_LBN 28 1037 - #define FRF_BZ_RX_XOFF_TX_TH_WIDTH 5 1038 - #define FRF_AA_RX_OWNERR_CTL_LBN 30 1039 - #define FRF_AA_RX_OWNERR_CTL_WIDTH 1 1040 - #define FRF_AA_RX_XON_TX_TH_LBN 25 1041 - #define FRF_AA_RX_XON_TX_TH_WIDTH 5 1042 - #define FRF_BZ_RX_USR_BUF_SIZE_LBN 19 1043 - #define FRF_BZ_RX_USR_BUF_SIZE_WIDTH 9 1044 - #define FRF_AA_RX_XOFF_TX_TH_LBN 20 1045 - #define FRF_AA_RX_XOFF_TX_TH_WIDTH 5 1046 - #define FRF_AA_RX_USR_BUF_SIZE_LBN 11 1047 - #define FRF_AA_RX_USR_BUF_SIZE_WIDTH 9 1048 - #define FRF_BZ_RX_XON_MAC_TH_LBN 10 1049 - #define FRF_BZ_RX_XON_MAC_TH_WIDTH 9 1050 - #define FRF_AA_RX_XON_MAC_TH_LBN 6 1051 - #define FRF_AA_RX_XON_MAC_TH_WIDTH 5 1052 - #define FRF_BZ_RX_XOFF_MAC_TH_LBN 1 1053 - #define FRF_BZ_RX_XOFF_MAC_TH_WIDTH 9 1054 - #define FRF_AA_RX_XOFF_MAC_TH_LBN 1 1055 - #define FRF_AA_RX_XOFF_MAC_TH_WIDTH 5 1056 - #define FRF_AZ_RX_XOFF_MAC_EN_LBN 0 1057 - #define FRF_AZ_RX_XOFF_MAC_EN_WIDTH 1 1058 - 1059 - /* RX_FILTER_CTL_REG: Receive filter control registers */ 1060 - #define FR_BZ_RX_FILTER_CTL 0x00000810 1061 - #define FRF_CZ_ETHERNET_WILDCARD_SEARCH_LIMIT_LBN 94 1062 - #define FRF_CZ_ETHERNET_WILDCARD_SEARCH_LIMIT_WIDTH 8 1063 - #define FRF_CZ_ETHERNET_FULL_SEARCH_LIMIT_LBN 86 1064 - #define FRF_CZ_ETHERNET_FULL_SEARCH_LIMIT_WIDTH 8 1065 - #define FRF_CZ_RX_FILTER_ALL_VLAN_ETHERTYPES_LBN 85 1066 - #define FRF_CZ_RX_FILTER_ALL_VLAN_ETHERTYPES_WIDTH 1 1067 - #define FRF_CZ_RX_VLAN_MATCH_ETHERTYPE_LBN 69 1068 - #define FRF_CZ_RX_VLAN_MATCH_ETHERTYPE_WIDTH 16 1069 - #define FRF_CZ_MULTICAST_NOMATCH_Q_ID_LBN 57 1070 - #define FRF_CZ_MULTICAST_NOMATCH_Q_ID_WIDTH 12 1071 - #define FRF_CZ_MULTICAST_NOMATCH_RSS_ENABLED_LBN 56 1072 - #define FRF_CZ_MULTICAST_NOMATCH_RSS_ENABLED_WIDTH 1 1073 - #define FRF_CZ_MULTICAST_NOMATCH_IP_OVERRIDE_LBN 55 1074 - #define FRF_CZ_MULTICAST_NOMATCH_IP_OVERRIDE_WIDTH 1 1075 - #define FRF_CZ_UNICAST_NOMATCH_Q_ID_LBN 43 1076 - #define FRF_CZ_UNICAST_NOMATCH_Q_ID_WIDTH 12 1077 - #define FRF_CZ_UNICAST_NOMATCH_RSS_ENABLED_LBN 42 1078 - #define FRF_CZ_UNICAST_NOMATCH_RSS_ENABLED_WIDTH 1 1079 - #define FRF_CZ_UNICAST_NOMATCH_IP_OVERRIDE_LBN 41 1080 - #define FRF_CZ_UNICAST_NOMATCH_IP_OVERRIDE_WIDTH 1 1081 - #define FRF_BZ_SCATTER_ENBL_NO_MATCH_Q_LBN 40 1082 - #define FRF_BZ_SCATTER_ENBL_NO_MATCH_Q_WIDTH 1 1083 - #define FRF_BZ_UDP_FULL_SRCH_LIMIT_LBN 32 1084 - #define FRF_BZ_UDP_FULL_SRCH_LIMIT_WIDTH 8 1085 - #define FRF_BZ_NUM_KER_LBN 24 1086 - #define FRF_BZ_NUM_KER_WIDTH 2 1087 - #define FRF_BZ_UDP_WILD_SRCH_LIMIT_LBN 16 1088 - #define FRF_BZ_UDP_WILD_SRCH_LIMIT_WIDTH 8 1089 - #define FRF_BZ_TCP_WILD_SRCH_LIMIT_LBN 8 1090 - #define FRF_BZ_TCP_WILD_SRCH_LIMIT_WIDTH 8 1091 - #define FRF_BZ_TCP_FULL_SRCH_LIMIT_LBN 0 1092 - #define FRF_BZ_TCP_FULL_SRCH_LIMIT_WIDTH 8 1093 - 1094 - /* RX_FLUSH_DESCQ_REG: Receive flush descriptor queue register */ 1095 - #define FR_AZ_RX_FLUSH_DESCQ 0x00000820 1096 - #define FRF_AZ_RX_FLUSH_DESCQ_CMD_LBN 24 1097 - #define FRF_AZ_RX_FLUSH_DESCQ_CMD_WIDTH 1 1098 - #define FRF_AZ_RX_FLUSH_DESCQ_LBN 0 1099 - #define FRF_AZ_RX_FLUSH_DESCQ_WIDTH 12 1100 - 1101 - /* RX_DESC_UPD_REGP0: Receive descriptor update register. */ 1102 - #define FR_BZ_RX_DESC_UPD_P0 0x00000830 1103 - #define FR_BZ_RX_DESC_UPD_P0_STEP 8192 1104 - #define FR_BZ_RX_DESC_UPD_P0_ROWS 1024 1105 - /* RX_DESC_UPD_REG_KER: Receive descriptor update register. */ 1106 - #define FR_AA_RX_DESC_UPD_KER 0x00000830 1107 - #define FR_AA_RX_DESC_UPD_KER_STEP 8192 1108 - #define FR_AA_RX_DESC_UPD_KER_ROWS 4 1109 - /* RX_DESC_UPD_REGP123: Receive descriptor update register. */ 1110 - #define FR_BB_RX_DESC_UPD_P123 0x01000830 1111 - #define FR_BB_RX_DESC_UPD_P123_STEP 8192 1112 - #define FR_BB_RX_DESC_UPD_P123_ROWS 3072 1113 - #define FRF_AZ_RX_DESC_WPTR_LBN 96 1114 - #define FRF_AZ_RX_DESC_WPTR_WIDTH 12 1115 - #define FRF_AZ_RX_DESC_PUSH_CMD_LBN 95 1116 - #define FRF_AZ_RX_DESC_PUSH_CMD_WIDTH 1 1117 - #define FRF_AZ_RX_DESC_LBN 0 1118 - #define FRF_AZ_RX_DESC_WIDTH 64 1119 - 1120 - /* RX_DC_CFG_REG: Receive descriptor cache configuration register */ 1121 - #define FR_AZ_RX_DC_CFG 0x00000840 1122 - #define FRF_AB_RX_MAX_PF_LBN 2 1123 - #define FRF_AB_RX_MAX_PF_WIDTH 2 1124 - #define FRF_AZ_RX_DC_SIZE_LBN 0 1125 - #define FRF_AZ_RX_DC_SIZE_WIDTH 2 1126 - #define FFE_AZ_RX_DC_SIZE_64 3 1127 - #define FFE_AZ_RX_DC_SIZE_32 2 1128 - #define FFE_AZ_RX_DC_SIZE_16 1 1129 - #define FFE_AZ_RX_DC_SIZE_8 0 1130 - 1131 - /* RX_DC_PF_WM_REG: Receive descriptor cache pre-fetch watermark register */ 1132 - #define FR_AZ_RX_DC_PF_WM 0x00000850 1133 - #define FRF_AZ_RX_DC_PF_HWM_LBN 6 1134 - #define FRF_AZ_RX_DC_PF_HWM_WIDTH 6 1135 - #define FRF_AZ_RX_DC_PF_LWM_LBN 0 1136 - #define FRF_AZ_RX_DC_PF_LWM_WIDTH 6 1137 - 1138 - /* RX_RSS_TKEY_REG: RSS Toeplitz hash key */ 1139 - #define FR_BZ_RX_RSS_TKEY 0x00000860 1140 - #define FRF_BZ_RX_RSS_TKEY_HI_LBN 64 1141 - #define FRF_BZ_RX_RSS_TKEY_HI_WIDTH 64 1142 - #define FRF_BZ_RX_RSS_TKEY_LO_LBN 0 1143 - #define FRF_BZ_RX_RSS_TKEY_LO_WIDTH 64 1144 - 1145 - /* RX_NODESC_DROP_REG: Receive dropped packet counter register */ 1146 - #define FR_AZ_RX_NODESC_DROP 0x00000880 1147 - #define FRF_CZ_RX_NODESC_DROP_CNT_LBN 0 1148 - #define FRF_CZ_RX_NODESC_DROP_CNT_WIDTH 32 1149 - #define FRF_AB_RX_NODESC_DROP_CNT_LBN 0 1150 - #define FRF_AB_RX_NODESC_DROP_CNT_WIDTH 16 1151 - 1152 - /* RX_SELF_RST_REG: Receive self reset register */ 1153 - #define FR_AA_RX_SELF_RST 0x00000890 1154 - #define FRF_AA_RX_ISCSI_DIS_LBN 17 1155 - #define FRF_AA_RX_ISCSI_DIS_WIDTH 1 1156 - #define FRF_AA_RX_SW_RST_REG_LBN 16 1157 - #define FRF_AA_RX_SW_RST_REG_WIDTH 1 1158 - #define FRF_AA_RX_NODESC_WAIT_DIS_LBN 9 1159 - #define FRF_AA_RX_NODESC_WAIT_DIS_WIDTH 1 1160 - #define FRF_AA_RX_SELF_RST_EN_LBN 8 1161 - #define FRF_AA_RX_SELF_RST_EN_WIDTH 1 1162 - #define FRF_AA_RX_MAX_PF_LAT_LBN 4 1163 - #define FRF_AA_RX_MAX_PF_LAT_WIDTH 4 1164 - #define FRF_AA_RX_MAX_LU_LAT_LBN 0 1165 - #define FRF_AA_RX_MAX_LU_LAT_WIDTH 4 1166 - 1167 - /* RX_DEBUG_REG: undocumented register */ 1168 - #define FR_AZ_RX_DEBUG 0x000008a0 1169 - #define FRF_AZ_RX_DEBUG_LBN 0 1170 - #define FRF_AZ_RX_DEBUG_WIDTH 64 1171 - 1172 - /* RX_PUSH_DROP_REG: Receive descriptor push dropped counter register */ 1173 - #define FR_AZ_RX_PUSH_DROP 0x000008b0 1174 - #define FRF_AZ_RX_PUSH_DROP_CNT_LBN 0 1175 - #define FRF_AZ_RX_PUSH_DROP_CNT_WIDTH 32 1176 - 1177 - /* RX_RSS_IPV6_REG1: IPv6 RSS Toeplitz hash key low bytes */ 1178 - #define FR_CZ_RX_RSS_IPV6_REG1 0x000008d0 1179 - #define FRF_CZ_RX_RSS_IPV6_TKEY_LO_LBN 0 1180 - #define FRF_CZ_RX_RSS_IPV6_TKEY_LO_WIDTH 128 1181 - 1182 - /* RX_RSS_IPV6_REG2: IPv6 RSS Toeplitz hash key middle bytes */ 1183 - #define FR_CZ_RX_RSS_IPV6_REG2 0x000008e0 1184 - #define FRF_CZ_RX_RSS_IPV6_TKEY_MID_LBN 0 1185 - #define FRF_CZ_RX_RSS_IPV6_TKEY_MID_WIDTH 128 1186 - 1187 - /* RX_RSS_IPV6_REG3: IPv6 RSS Toeplitz hash key upper bytes and IPv6 RSS settings */ 1188 - #define FR_CZ_RX_RSS_IPV6_REG3 0x000008f0 1189 - #define FRF_CZ_RX_RSS_IPV6_THASH_ENABLE_LBN 66 1190 - #define FRF_CZ_RX_RSS_IPV6_THASH_ENABLE_WIDTH 1 1191 - #define FRF_CZ_RX_RSS_IPV6_IP_THASH_ENABLE_LBN 65 1192 - #define FRF_CZ_RX_RSS_IPV6_IP_THASH_ENABLE_WIDTH 1 1193 - #define FRF_CZ_RX_RSS_IPV6_TCP_SUPPRESS_LBN 64 1194 - #define FRF_CZ_RX_RSS_IPV6_TCP_SUPPRESS_WIDTH 1 1195 - #define FRF_CZ_RX_RSS_IPV6_TKEY_HI_LBN 0 1196 - #define FRF_CZ_RX_RSS_IPV6_TKEY_HI_WIDTH 64 1197 - 1198 - /* TX_FLUSH_DESCQ_REG: Transmit flush descriptor queue register */ 1199 - #define FR_AZ_TX_FLUSH_DESCQ 0x00000a00 1200 - #define FRF_AZ_TX_FLUSH_DESCQ_CMD_LBN 12 1201 - #define FRF_AZ_TX_FLUSH_DESCQ_CMD_WIDTH 1 1202 - #define FRF_AZ_TX_FLUSH_DESCQ_LBN 0 1203 - #define FRF_AZ_TX_FLUSH_DESCQ_WIDTH 12 1204 - 1205 - /* TX_DESC_UPD_REGP0: Transmit descriptor update register. */ 1206 - #define FR_BZ_TX_DESC_UPD_P0 0x00000a10 1207 - #define FR_BZ_TX_DESC_UPD_P0_STEP 8192 1208 - #define FR_BZ_TX_DESC_UPD_P0_ROWS 1024 1209 - /* TX_DESC_UPD_REG_KER: Transmit descriptor update register. */ 1210 - #define FR_AA_TX_DESC_UPD_KER 0x00000a10 1211 - #define FR_AA_TX_DESC_UPD_KER_STEP 8192 1212 - #define FR_AA_TX_DESC_UPD_KER_ROWS 8 1213 - /* TX_DESC_UPD_REGP123: Transmit descriptor update register. */ 1214 - #define FR_BB_TX_DESC_UPD_P123 0x01000a10 1215 - #define FR_BB_TX_DESC_UPD_P123_STEP 8192 1216 - #define FR_BB_TX_DESC_UPD_P123_ROWS 3072 1217 - #define FRF_AZ_TX_DESC_WPTR_LBN 96 1218 - #define FRF_AZ_TX_DESC_WPTR_WIDTH 12 1219 - #define FRF_AZ_TX_DESC_PUSH_CMD_LBN 95 1220 - #define FRF_AZ_TX_DESC_PUSH_CMD_WIDTH 1 1221 - #define FRF_AZ_TX_DESC_LBN 0 1222 - #define FRF_AZ_TX_DESC_WIDTH 95 1223 - 1224 - /* TX_DC_CFG_REG: Transmit descriptor cache configuration register */ 1225 - #define FR_AZ_TX_DC_CFG 0x00000a20 1226 - #define FRF_AZ_TX_DC_SIZE_LBN 0 1227 - #define FRF_AZ_TX_DC_SIZE_WIDTH 2 1228 - #define FFE_AZ_TX_DC_SIZE_32 2 1229 - #define FFE_AZ_TX_DC_SIZE_16 1 1230 - #define FFE_AZ_TX_DC_SIZE_8 0 1231 - 1232 - /* TX_CHKSM_CFG_REG: Transmit checksum configuration register */ 1233 - #define FR_AA_TX_CHKSM_CFG 0x00000a30 1234 - #define FRF_AA_TX_Q_CHKSM_DIS_96_127_LBN 96 1235 - #define FRF_AA_TX_Q_CHKSM_DIS_96_127_WIDTH 32 1236 - #define FRF_AA_TX_Q_CHKSM_DIS_64_95_LBN 64 1237 - #define FRF_AA_TX_Q_CHKSM_DIS_64_95_WIDTH 32 1238 - #define FRF_AA_TX_Q_CHKSM_DIS_32_63_LBN 32 1239 - #define FRF_AA_TX_Q_CHKSM_DIS_32_63_WIDTH 32 1240 - #define FRF_AA_TX_Q_CHKSM_DIS_0_31_LBN 0 1241 - #define FRF_AA_TX_Q_CHKSM_DIS_0_31_WIDTH 32 1242 - 1243 - /* TX_CFG_REG: Transmit configuration register */ 1244 - #define FR_AZ_TX_CFG 0x00000a50 1245 - #define FRF_CZ_TX_CONT_LOOKUP_THRESH_RANGE_LBN 114 1246 - #define FRF_CZ_TX_CONT_LOOKUP_THRESH_RANGE_WIDTH 8 1247 - #define FRF_CZ_TX_FILTER_TEST_MODE_BIT_LBN 113 1248 - #define FRF_CZ_TX_FILTER_TEST_MODE_BIT_WIDTH 1 1249 - #define FRF_CZ_TX_ETH_FILTER_WILD_SEARCH_RANGE_LBN 105 1250 - #define FRF_CZ_TX_ETH_FILTER_WILD_SEARCH_RANGE_WIDTH 8 1251 - #define FRF_CZ_TX_ETH_FILTER_FULL_SEARCH_RANGE_LBN 97 1252 - #define FRF_CZ_TX_ETH_FILTER_FULL_SEARCH_RANGE_WIDTH 8 1253 - #define FRF_CZ_TX_UDPIP_FILTER_WILD_SEARCH_RANGE_LBN 89 1254 - #define FRF_CZ_TX_UDPIP_FILTER_WILD_SEARCH_RANGE_WIDTH 8 1255 - #define FRF_CZ_TX_UDPIP_FILTER_FULL_SEARCH_RANGE_LBN 81 1256 - #define FRF_CZ_TX_UDPIP_FILTER_FULL_SEARCH_RANGE_WIDTH 8 1257 - #define FRF_CZ_TX_TCPIP_FILTER_WILD_SEARCH_RANGE_LBN 73 1258 - #define FRF_CZ_TX_TCPIP_FILTER_WILD_SEARCH_RANGE_WIDTH 8 1259 - #define FRF_CZ_TX_TCPIP_FILTER_FULL_SEARCH_RANGE_LBN 65 1260 - #define FRF_CZ_TX_TCPIP_FILTER_FULL_SEARCH_RANGE_WIDTH 8 1261 - #define FRF_CZ_TX_FILTER_ALL_VLAN_ETHERTYPES_BIT_LBN 64 1262 - #define FRF_CZ_TX_FILTER_ALL_VLAN_ETHERTYPES_BIT_WIDTH 1 1263 - #define FRF_CZ_TX_VLAN_MATCH_ETHERTYPE_RANGE_LBN 48 1264 - #define FRF_CZ_TX_VLAN_MATCH_ETHERTYPE_RANGE_WIDTH 16 1265 - #define FRF_CZ_TX_FILTER_EN_BIT_LBN 47 1266 - #define FRF_CZ_TX_FILTER_EN_BIT_WIDTH 1 1267 - #define FRF_AZ_TX_IP_ID_P0_OFS_LBN 16 1268 - #define FRF_AZ_TX_IP_ID_P0_OFS_WIDTH 15 1269 - #define FRF_AZ_TX_NO_EOP_DISC_EN_LBN 5 1270 - #define FRF_AZ_TX_NO_EOP_DISC_EN_WIDTH 1 1271 - #define FRF_AZ_TX_P1_PRI_EN_LBN 4 1272 - #define FRF_AZ_TX_P1_PRI_EN_WIDTH 1 1273 - #define FRF_AZ_TX_OWNERR_CTL_LBN 2 1274 - #define FRF_AZ_TX_OWNERR_CTL_WIDTH 1 1275 - #define FRF_AA_TX_NON_IP_DROP_DIS_LBN 1 1276 - #define FRF_AA_TX_NON_IP_DROP_DIS_WIDTH 1 1277 - #define FRF_AZ_TX_IP_ID_REP_EN_LBN 0 1278 - #define FRF_AZ_TX_IP_ID_REP_EN_WIDTH 1 1279 - 1280 - /* TX_PUSH_DROP_REG: Transmit push dropped register */ 1281 - #define FR_AZ_TX_PUSH_DROP 0x00000a60 1282 - #define FRF_AZ_TX_PUSH_DROP_CNT_LBN 0 1283 - #define FRF_AZ_TX_PUSH_DROP_CNT_WIDTH 32 1284 - 1285 - /* TX_RESERVED_REG: Transmit configuration register */ 1286 - #define FR_AZ_TX_RESERVED 0x00000a80 1287 - #define FRF_AZ_TX_EVT_CNT_LBN 121 1288 - #define FRF_AZ_TX_EVT_CNT_WIDTH 7 1289 - #define FRF_AZ_TX_PREF_AGE_CNT_LBN 119 1290 - #define FRF_AZ_TX_PREF_AGE_CNT_WIDTH 2 1291 - #define FRF_AZ_TX_RD_COMP_TMR_LBN 96 1292 - #define FRF_AZ_TX_RD_COMP_TMR_WIDTH 23 1293 - #define FRF_AZ_TX_PUSH_EN_LBN 89 1294 - #define FRF_AZ_TX_PUSH_EN_WIDTH 1 1295 - #define FRF_AZ_TX_PUSH_CHK_DIS_LBN 88 1296 - #define FRF_AZ_TX_PUSH_CHK_DIS_WIDTH 1 1297 - #define FRF_AZ_TX_D_FF_FULL_P0_LBN 85 1298 - #define FRF_AZ_TX_D_FF_FULL_P0_WIDTH 1 1299 - #define FRF_AZ_TX_DMAR_ST_P0_LBN 81 1300 - #define FRF_AZ_TX_DMAR_ST_P0_WIDTH 1 1301 - #define FRF_AZ_TX_DMAQ_ST_LBN 78 1302 - #define FRF_AZ_TX_DMAQ_ST_WIDTH 1 1303 - #define FRF_AZ_TX_RX_SPACER_LBN 64 1304 - #define FRF_AZ_TX_RX_SPACER_WIDTH 8 1305 - #define FRF_AZ_TX_DROP_ABORT_EN_LBN 60 1306 - #define FRF_AZ_TX_DROP_ABORT_EN_WIDTH 1 1307 - #define FRF_AZ_TX_SOFT_EVT_EN_LBN 59 1308 - #define FRF_AZ_TX_SOFT_EVT_EN_WIDTH 1 1309 - #define FRF_AZ_TX_PS_EVT_DIS_LBN 58 1310 - #define FRF_AZ_TX_PS_EVT_DIS_WIDTH 1 1311 - #define FRF_AZ_TX_RX_SPACER_EN_LBN 57 1312 - #define FRF_AZ_TX_RX_SPACER_EN_WIDTH 1 1313 - #define FRF_AZ_TX_XP_TIMER_LBN 52 1314 - #define FRF_AZ_TX_XP_TIMER_WIDTH 5 1315 - #define FRF_AZ_TX_PREF_SPACER_LBN 44 1316 - #define FRF_AZ_TX_PREF_SPACER_WIDTH 8 1317 - #define FRF_AZ_TX_PREF_WD_TMR_LBN 22 1318 - #define FRF_AZ_TX_PREF_WD_TMR_WIDTH 22 1319 - #define FRF_AZ_TX_ONLY1TAG_LBN 21 1320 - #define FRF_AZ_TX_ONLY1TAG_WIDTH 1 1321 - #define FRF_AZ_TX_PREF_THRESHOLD_LBN 19 1322 - #define FRF_AZ_TX_PREF_THRESHOLD_WIDTH 2 1323 - #define FRF_AZ_TX_ONE_PKT_PER_Q_LBN 18 1324 - #define FRF_AZ_TX_ONE_PKT_PER_Q_WIDTH 1 1325 - #define FRF_AZ_TX_DIS_NON_IP_EV_LBN 17 1326 - #define FRF_AZ_TX_DIS_NON_IP_EV_WIDTH 1 1327 - #define FRF_AA_TX_DMA_FF_THR_LBN 16 1328 - #define FRF_AA_TX_DMA_FF_THR_WIDTH 1 1329 - #define FRF_AZ_TX_DMA_SPACER_LBN 8 1330 - #define FRF_AZ_TX_DMA_SPACER_WIDTH 8 1331 - #define FRF_AA_TX_TCP_DIS_LBN 7 1332 - #define FRF_AA_TX_TCP_DIS_WIDTH 1 1333 - #define FRF_BZ_TX_FLUSH_MIN_LEN_EN_LBN 7 1334 - #define FRF_BZ_TX_FLUSH_MIN_LEN_EN_WIDTH 1 1335 - #define FRF_AA_TX_IP_DIS_LBN 6 1336 - #define FRF_AA_TX_IP_DIS_WIDTH 1 1337 - #define FRF_AZ_TX_MAX_CPL_LBN 2 1338 - #define FRF_AZ_TX_MAX_CPL_WIDTH 2 1339 - #define FFE_AZ_TX_MAX_CPL_16 3 1340 - #define FFE_AZ_TX_MAX_CPL_8 2 1341 - #define FFE_AZ_TX_MAX_CPL_4 1 1342 - #define FFE_AZ_TX_MAX_CPL_NOLIMIT 0 1343 - #define FRF_AZ_TX_MAX_PREF_LBN 0 1344 - #define FRF_AZ_TX_MAX_PREF_WIDTH 2 1345 - #define FFE_AZ_TX_MAX_PREF_32 3 1346 - #define FFE_AZ_TX_MAX_PREF_16 2 1347 - #define FFE_AZ_TX_MAX_PREF_8 1 1348 - #define FFE_AZ_TX_MAX_PREF_OFF 0 1349 - 1350 - /* TX_PACE_REG: Transmit pace control register */ 1351 - #define FR_BZ_TX_PACE 0x00000a90 1352 - #define FRF_BZ_TX_PACE_SB_NOT_AF_LBN 19 1353 - #define FRF_BZ_TX_PACE_SB_NOT_AF_WIDTH 10 1354 - #define FRF_BZ_TX_PACE_SB_AF_LBN 9 1355 - #define FRF_BZ_TX_PACE_SB_AF_WIDTH 10 1356 - #define FRF_BZ_TX_PACE_FB_BASE_LBN 5 1357 - #define FRF_BZ_TX_PACE_FB_BASE_WIDTH 4 1358 - #define FRF_BZ_TX_PACE_BIN_TH_LBN 0 1359 - #define FRF_BZ_TX_PACE_BIN_TH_WIDTH 5 1360 - 1361 - /* TX_PACE_DROP_QID_REG: PACE Drop QID Counter */ 1362 - #define FR_BZ_TX_PACE_DROP_QID 0x00000aa0 1363 - #define FRF_BZ_TX_PACE_QID_DRP_CNT_LBN 0 1364 - #define FRF_BZ_TX_PACE_QID_DRP_CNT_WIDTH 16 1365 - 1366 - /* TX_VLAN_REG: Transmit VLAN tag register */ 1367 - #define FR_BB_TX_VLAN 0x00000ae0 1368 - #define FRF_BB_TX_VLAN_EN_LBN 127 1369 - #define FRF_BB_TX_VLAN_EN_WIDTH 1 1370 - #define FRF_BB_TX_VLAN7_PORT1_EN_LBN 125 1371 - #define FRF_BB_TX_VLAN7_PORT1_EN_WIDTH 1 1372 - #define FRF_BB_TX_VLAN7_PORT0_EN_LBN 124 1373 - #define FRF_BB_TX_VLAN7_PORT0_EN_WIDTH 1 1374 - #define FRF_BB_TX_VLAN7_LBN 112 1375 - #define FRF_BB_TX_VLAN7_WIDTH 12 1376 - #define FRF_BB_TX_VLAN6_PORT1_EN_LBN 109 1377 - #define FRF_BB_TX_VLAN6_PORT1_EN_WIDTH 1 1378 - #define FRF_BB_TX_VLAN6_PORT0_EN_LBN 108 1379 - #define FRF_BB_TX_VLAN6_PORT0_EN_WIDTH 1 1380 - #define FRF_BB_TX_VLAN6_LBN 96 1381 - #define FRF_BB_TX_VLAN6_WIDTH 12 1382 - #define FRF_BB_TX_VLAN5_PORT1_EN_LBN 93 1383 - #define FRF_BB_TX_VLAN5_PORT1_EN_WIDTH 1 1384 - #define FRF_BB_TX_VLAN5_PORT0_EN_LBN 92 1385 - #define FRF_BB_TX_VLAN5_PORT0_EN_WIDTH 1 1386 - #define FRF_BB_TX_VLAN5_LBN 80 1387 - #define FRF_BB_TX_VLAN5_WIDTH 12 1388 - #define FRF_BB_TX_VLAN4_PORT1_EN_LBN 77 1389 - #define FRF_BB_TX_VLAN4_PORT1_EN_WIDTH 1 1390 - #define FRF_BB_TX_VLAN4_PORT0_EN_LBN 76 1391 - #define FRF_BB_TX_VLAN4_PORT0_EN_WIDTH 1 1392 - #define FRF_BB_TX_VLAN4_LBN 64 1393 - #define FRF_BB_TX_VLAN4_WIDTH 12 1394 - #define FRF_BB_TX_VLAN3_PORT1_EN_LBN 61 1395 - #define FRF_BB_TX_VLAN3_PORT1_EN_WIDTH 1 1396 - #define FRF_BB_TX_VLAN3_PORT0_EN_LBN 60 1397 - #define FRF_BB_TX_VLAN3_PORT0_EN_WIDTH 1 1398 - #define FRF_BB_TX_VLAN3_LBN 48 1399 - #define FRF_BB_TX_VLAN3_WIDTH 12 1400 - #define FRF_BB_TX_VLAN2_PORT1_EN_LBN 45 1401 - #define FRF_BB_TX_VLAN2_PORT1_EN_WIDTH 1 1402 - #define FRF_BB_TX_VLAN2_PORT0_EN_LBN 44 1403 - #define FRF_BB_TX_VLAN2_PORT0_EN_WIDTH 1 1404 - #define FRF_BB_TX_VLAN2_LBN 32 1405 - #define FRF_BB_TX_VLAN2_WIDTH 12 1406 - #define FRF_BB_TX_VLAN1_PORT1_EN_LBN 29 1407 - #define FRF_BB_TX_VLAN1_PORT1_EN_WIDTH 1 1408 - #define FRF_BB_TX_VLAN1_PORT0_EN_LBN 28 1409 - #define FRF_BB_TX_VLAN1_PORT0_EN_WIDTH 1 1410 - #define FRF_BB_TX_VLAN1_LBN 16 1411 - #define FRF_BB_TX_VLAN1_WIDTH 12 1412 - #define FRF_BB_TX_VLAN0_PORT1_EN_LBN 13 1413 - #define FRF_BB_TX_VLAN0_PORT1_EN_WIDTH 1 1414 - #define FRF_BB_TX_VLAN0_PORT0_EN_LBN 12 1415 - #define FRF_BB_TX_VLAN0_PORT0_EN_WIDTH 1 1416 - #define FRF_BB_TX_VLAN0_LBN 0 1417 - #define FRF_BB_TX_VLAN0_WIDTH 12 1418 - 1419 - /* TX_IPFIL_PORTEN_REG: Transmit filter control register */ 1420 - #define FR_BZ_TX_IPFIL_PORTEN 0x00000af0 1421 - #define FRF_BZ_TX_MADR0_FIL_EN_LBN 64 1422 - #define FRF_BZ_TX_MADR0_FIL_EN_WIDTH 1 1423 - #define FRF_BB_TX_IPFIL31_PORT_EN_LBN 62 1424 - #define FRF_BB_TX_IPFIL31_PORT_EN_WIDTH 1 1425 - #define FRF_BB_TX_IPFIL30_PORT_EN_LBN 60 1426 - #define FRF_BB_TX_IPFIL30_PORT_EN_WIDTH 1 1427 - #define FRF_BB_TX_IPFIL29_PORT_EN_LBN 58 1428 - #define FRF_BB_TX_IPFIL29_PORT_EN_WIDTH 1 1429 - #define FRF_BB_TX_IPFIL28_PORT_EN_LBN 56 1430 - #define FRF_BB_TX_IPFIL28_PORT_EN_WIDTH 1 1431 - #define FRF_BB_TX_IPFIL27_PORT_EN_LBN 54 1432 - #define FRF_BB_TX_IPFIL27_PORT_EN_WIDTH 1 1433 - #define FRF_BB_TX_IPFIL26_PORT_EN_LBN 52 1434 - #define FRF_BB_TX_IPFIL26_PORT_EN_WIDTH 1 1435 - #define FRF_BB_TX_IPFIL25_PORT_EN_LBN 50 1436 - #define FRF_BB_TX_IPFIL25_PORT_EN_WIDTH 1 1437 - #define FRF_BB_TX_IPFIL24_PORT_EN_LBN 48 1438 - #define FRF_BB_TX_IPFIL24_PORT_EN_WIDTH 1 1439 - #define FRF_BB_TX_IPFIL23_PORT_EN_LBN 46 1440 - #define FRF_BB_TX_IPFIL23_PORT_EN_WIDTH 1 1441 - #define FRF_BB_TX_IPFIL22_PORT_EN_LBN 44 1442 - #define FRF_BB_TX_IPFIL22_PORT_EN_WIDTH 1 1443 - #define FRF_BB_TX_IPFIL21_PORT_EN_LBN 42 1444 - #define FRF_BB_TX_IPFIL21_PORT_EN_WIDTH 1 1445 - #define FRF_BB_TX_IPFIL20_PORT_EN_LBN 40 1446 - #define FRF_BB_TX_IPFIL20_PORT_EN_WIDTH 1 1447 - #define FRF_BB_TX_IPFIL19_PORT_EN_LBN 38 1448 - #define FRF_BB_TX_IPFIL19_PORT_EN_WIDTH 1 1449 - #define FRF_BB_TX_IPFIL18_PORT_EN_LBN 36 1450 - #define FRF_BB_TX_IPFIL18_PORT_EN_WIDTH 1 1451 - #define FRF_BB_TX_IPFIL17_PORT_EN_LBN 34 1452 - #define FRF_BB_TX_IPFIL17_PORT_EN_WIDTH 1 1453 - #define FRF_BB_TX_IPFIL16_PORT_EN_LBN 32 1454 - #define FRF_BB_TX_IPFIL16_PORT_EN_WIDTH 1 1455 - #define FRF_BB_TX_IPFIL15_PORT_EN_LBN 30 1456 - #define FRF_BB_TX_IPFIL15_PORT_EN_WIDTH 1 1457 - #define FRF_BB_TX_IPFIL14_PORT_EN_LBN 28 1458 - #define FRF_BB_TX_IPFIL14_PORT_EN_WIDTH 1 1459 - #define FRF_BB_TX_IPFIL13_PORT_EN_LBN 26 1460 - #define FRF_BB_TX_IPFIL13_PORT_EN_WIDTH 1 1461 - #define FRF_BB_TX_IPFIL12_PORT_EN_LBN 24 1462 - #define FRF_BB_TX_IPFIL12_PORT_EN_WIDTH 1 1463 - #define FRF_BB_TX_IPFIL11_PORT_EN_LBN 22 1464 - #define FRF_BB_TX_IPFIL11_PORT_EN_WIDTH 1 1465 - #define FRF_BB_TX_IPFIL10_PORT_EN_LBN 20 1466 - #define FRF_BB_TX_IPFIL10_PORT_EN_WIDTH 1 1467 - #define FRF_BB_TX_IPFIL9_PORT_EN_LBN 18 1468 - #define FRF_BB_TX_IPFIL9_PORT_EN_WIDTH 1 1469 - #define FRF_BB_TX_IPFIL8_PORT_EN_LBN 16 1470 - #define FRF_BB_TX_IPFIL8_PORT_EN_WIDTH 1 1471 - #define FRF_BB_TX_IPFIL7_PORT_EN_LBN 14 1472 - #define FRF_BB_TX_IPFIL7_PORT_EN_WIDTH 1 1473 - #define FRF_BB_TX_IPFIL6_PORT_EN_LBN 12 1474 - #define FRF_BB_TX_IPFIL6_PORT_EN_WIDTH 1 1475 - #define FRF_BB_TX_IPFIL5_PORT_EN_LBN 10 1476 - #define FRF_BB_TX_IPFIL5_PORT_EN_WIDTH 1 1477 - #define FRF_BB_TX_IPFIL4_PORT_EN_LBN 8 1478 - #define FRF_BB_TX_IPFIL4_PORT_EN_WIDTH 1 1479 - #define FRF_BB_TX_IPFIL3_PORT_EN_LBN 6 1480 - #define FRF_BB_TX_IPFIL3_PORT_EN_WIDTH 1 1481 - #define FRF_BB_TX_IPFIL2_PORT_EN_LBN 4 1482 - #define FRF_BB_TX_IPFIL2_PORT_EN_WIDTH 1 1483 - #define FRF_BB_TX_IPFIL1_PORT_EN_LBN 2 1484 - #define FRF_BB_TX_IPFIL1_PORT_EN_WIDTH 1 1485 - #define FRF_BB_TX_IPFIL0_PORT_EN_LBN 0 1486 - #define FRF_BB_TX_IPFIL0_PORT_EN_WIDTH 1 1487 - 1488 - /* TX_IPFIL_TBL: Transmit IP source address filter table */ 1489 - #define FR_BB_TX_IPFIL_TBL 0x00000b00 1490 - #define FR_BB_TX_IPFIL_TBL_STEP 16 1491 - #define FR_BB_TX_IPFIL_TBL_ROWS 16 1492 - #define FRF_BB_TX_IPFIL_MASK_1_LBN 96 1493 - #define FRF_BB_TX_IPFIL_MASK_1_WIDTH 32 1494 - #define FRF_BB_TX_IP_SRC_ADR_1_LBN 64 1495 - #define FRF_BB_TX_IP_SRC_ADR_1_WIDTH 32 1496 - #define FRF_BB_TX_IPFIL_MASK_0_LBN 32 1497 - #define FRF_BB_TX_IPFIL_MASK_0_WIDTH 32 1498 - #define FRF_BB_TX_IP_SRC_ADR_0_LBN 0 1499 - #define FRF_BB_TX_IP_SRC_ADR_0_WIDTH 32 1500 - 1501 - /* MD_TXD_REG: PHY management transmit data register */ 1502 - #define FR_AB_MD_TXD 0x00000c00 1503 - #define FRF_AB_MD_TXD_LBN 0 1504 - #define FRF_AB_MD_TXD_WIDTH 16 1505 - 1506 - /* MD_RXD_REG: PHY management receive data register */ 1507 - #define FR_AB_MD_RXD 0x00000c10 1508 - #define FRF_AB_MD_RXD_LBN 0 1509 - #define FRF_AB_MD_RXD_WIDTH 16 1510 - 1511 - /* MD_CS_REG: PHY management configuration & status register */ 1512 - #define FR_AB_MD_CS 0x00000c20 1513 - #define FRF_AB_MD_RD_EN_CMD_LBN 15 1514 - #define FRF_AB_MD_RD_EN_CMD_WIDTH 1 1515 - #define FRF_AB_MD_WR_EN_CMD_LBN 14 1516 - #define FRF_AB_MD_WR_EN_CMD_WIDTH 1 1517 - #define FRF_AB_MD_ADDR_CMD_LBN 13 1518 - #define FRF_AB_MD_ADDR_CMD_WIDTH 1 1519 - #define FRF_AB_MD_PT_LBN 7 1520 - #define FRF_AB_MD_PT_WIDTH 3 1521 - #define FRF_AB_MD_PL_LBN 6 1522 - #define FRF_AB_MD_PL_WIDTH 1 1523 - #define FRF_AB_MD_INT_CLR_LBN 5 1524 - #define FRF_AB_MD_INT_CLR_WIDTH 1 1525 - #define FRF_AB_MD_GC_LBN 4 1526 - #define FRF_AB_MD_GC_WIDTH 1 1527 - #define FRF_AB_MD_PRSP_LBN 3 1528 - #define FRF_AB_MD_PRSP_WIDTH 1 1529 - #define FRF_AB_MD_RIC_LBN 2 1530 - #define FRF_AB_MD_RIC_WIDTH 1 1531 - #define FRF_AB_MD_RDC_LBN 1 1532 - #define FRF_AB_MD_RDC_WIDTH 1 1533 - #define FRF_AB_MD_WRC_LBN 0 1534 - #define FRF_AB_MD_WRC_WIDTH 1 1535 - 1536 - /* MD_PHY_ADR_REG: PHY management PHY address register */ 1537 - #define FR_AB_MD_PHY_ADR 0x00000c30 1538 - #define FRF_AB_MD_PHY_ADR_LBN 0 1539 - #define FRF_AB_MD_PHY_ADR_WIDTH 16 1540 - 1541 - /* MD_ID_REG: PHY management ID register */ 1542 - #define FR_AB_MD_ID 0x00000c40 1543 - #define FRF_AB_MD_PRT_ADR_LBN 11 1544 - #define FRF_AB_MD_PRT_ADR_WIDTH 5 1545 - #define FRF_AB_MD_DEV_ADR_LBN 6 1546 - #define FRF_AB_MD_DEV_ADR_WIDTH 5 1547 - 1548 - /* MD_STAT_REG: PHY management status & mask register */ 1549 - #define FR_AB_MD_STAT 0x00000c50 1550 - #define FRF_AB_MD_PINT_LBN 4 1551 - #define FRF_AB_MD_PINT_WIDTH 1 1552 - #define FRF_AB_MD_DONE_LBN 3 1553 - #define FRF_AB_MD_DONE_WIDTH 1 1554 - #define FRF_AB_MD_BSERR_LBN 2 1555 - #define FRF_AB_MD_BSERR_WIDTH 1 1556 - #define FRF_AB_MD_LNFL_LBN 1 1557 - #define FRF_AB_MD_LNFL_WIDTH 1 1558 - #define FRF_AB_MD_BSY_LBN 0 1559 - #define FRF_AB_MD_BSY_WIDTH 1 1560 - 1561 - /* MAC_STAT_DMA_REG: Port MAC statistical counter DMA register */ 1562 - #define FR_AB_MAC_STAT_DMA 0x00000c60 1563 - #define FRF_AB_MAC_STAT_DMA_CMD_LBN 48 1564 - #define FRF_AB_MAC_STAT_DMA_CMD_WIDTH 1 1565 - #define FRF_AB_MAC_STAT_DMA_ADR_LBN 0 1566 - #define FRF_AB_MAC_STAT_DMA_ADR_WIDTH 48 1567 - 1568 - /* MAC_CTRL_REG: Port MAC control register */ 1569 - #define FR_AB_MAC_CTRL 0x00000c80 1570 - #define FRF_AB_MAC_XOFF_VAL_LBN 16 1571 - #define FRF_AB_MAC_XOFF_VAL_WIDTH 16 1572 - #define FRF_BB_TXFIFO_DRAIN_EN_LBN 7 1573 - #define FRF_BB_TXFIFO_DRAIN_EN_WIDTH 1 1574 - #define FRF_AB_MAC_XG_DISTXCRC_LBN 5 1575 - #define FRF_AB_MAC_XG_DISTXCRC_WIDTH 1 1576 - #define FRF_AB_MAC_BCAD_ACPT_LBN 4 1577 - #define FRF_AB_MAC_BCAD_ACPT_WIDTH 1 1578 - #define FRF_AB_MAC_UC_PROM_LBN 3 1579 - #define FRF_AB_MAC_UC_PROM_WIDTH 1 1580 - #define FRF_AB_MAC_LINK_STATUS_LBN 2 1581 - #define FRF_AB_MAC_LINK_STATUS_WIDTH 1 1582 - #define FRF_AB_MAC_SPEED_LBN 0 1583 - #define FRF_AB_MAC_SPEED_WIDTH 2 1584 - #define FFE_AB_MAC_SPEED_10G 3 1585 - #define FFE_AB_MAC_SPEED_1G 2 1586 - #define FFE_AB_MAC_SPEED_100M 1 1587 - #define FFE_AB_MAC_SPEED_10M 0 1588 - 1589 - /* GEN_MODE_REG: General Purpose mode register (external interrupt mask) */ 1590 - #define FR_BB_GEN_MODE 0x00000c90 1591 - #define FRF_BB_XFP_PHY_INT_POL_SEL_LBN 3 1592 - #define FRF_BB_XFP_PHY_INT_POL_SEL_WIDTH 1 1593 - #define FRF_BB_XG_PHY_INT_POL_SEL_LBN 2 1594 - #define FRF_BB_XG_PHY_INT_POL_SEL_WIDTH 1 1595 - #define FRF_BB_XFP_PHY_INT_MASK_LBN 1 1596 - #define FRF_BB_XFP_PHY_INT_MASK_WIDTH 1 1597 - #define FRF_BB_XG_PHY_INT_MASK_LBN 0 1598 - #define FRF_BB_XG_PHY_INT_MASK_WIDTH 1 1599 - 1600 - /* MAC_MC_HASH_REG0: Multicast address hash table */ 1601 - #define FR_AB_MAC_MC_HASH_REG0 0x00000ca0 1602 - #define FRF_AB_MAC_MCAST_HASH0_LBN 0 1603 - #define FRF_AB_MAC_MCAST_HASH0_WIDTH 128 1604 - 1605 - /* MAC_MC_HASH_REG1: Multicast address hash table */ 1606 - #define FR_AB_MAC_MC_HASH_REG1 0x00000cb0 1607 - #define FRF_AB_MAC_MCAST_HASH1_LBN 0 1608 - #define FRF_AB_MAC_MCAST_HASH1_WIDTH 128 1609 - 1610 - /* GM_CFG1_REG: GMAC configuration register 1 */ 1611 - #define FR_AB_GM_CFG1 0x00000e00 1612 - #define FRF_AB_GM_SW_RST_LBN 31 1613 - #define FRF_AB_GM_SW_RST_WIDTH 1 1614 - #define FRF_AB_GM_SIM_RST_LBN 30 1615 - #define FRF_AB_GM_SIM_RST_WIDTH 1 1616 - #define FRF_AB_GM_RST_RX_MAC_CTL_LBN 19 1617 - #define FRF_AB_GM_RST_RX_MAC_CTL_WIDTH 1 1618 - #define FRF_AB_GM_RST_TX_MAC_CTL_LBN 18 1619 - #define FRF_AB_GM_RST_TX_MAC_CTL_WIDTH 1 1620 - #define FRF_AB_GM_RST_RX_FUNC_LBN 17 1621 - #define FRF_AB_GM_RST_RX_FUNC_WIDTH 1 1622 - #define FRF_AB_GM_RST_TX_FUNC_LBN 16 1623 - #define FRF_AB_GM_RST_TX_FUNC_WIDTH 1 1624 - #define FRF_AB_GM_LOOP_LBN 8 1625 - #define FRF_AB_GM_LOOP_WIDTH 1 1626 - #define FRF_AB_GM_RX_FC_EN_LBN 5 1627 - #define FRF_AB_GM_RX_FC_EN_WIDTH 1 1628 - #define FRF_AB_GM_TX_FC_EN_LBN 4 1629 - #define FRF_AB_GM_TX_FC_EN_WIDTH 1 1630 - #define FRF_AB_GM_SYNC_RXEN_LBN 3 1631 - #define FRF_AB_GM_SYNC_RXEN_WIDTH 1 1632 - #define FRF_AB_GM_RX_EN_LBN 2 1633 - #define FRF_AB_GM_RX_EN_WIDTH 1 1634 - #define FRF_AB_GM_SYNC_TXEN_LBN 1 1635 - #define FRF_AB_GM_SYNC_TXEN_WIDTH 1 1636 - #define FRF_AB_GM_TX_EN_LBN 0 1637 - #define FRF_AB_GM_TX_EN_WIDTH 1 1638 - 1639 - /* GM_CFG2_REG: GMAC configuration register 2 */ 1640 - #define FR_AB_GM_CFG2 0x00000e10 1641 - #define FRF_AB_GM_PAMBL_LEN_LBN 12 1642 - #define FRF_AB_GM_PAMBL_LEN_WIDTH 4 1643 - #define FRF_AB_GM_IF_MODE_LBN 8 1644 - #define FRF_AB_GM_IF_MODE_WIDTH 2 1645 - #define FFE_AB_IF_MODE_BYTE_MODE 2 1646 - #define FFE_AB_IF_MODE_NIBBLE_MODE 1 1647 - #define FRF_AB_GM_HUGE_FRM_EN_LBN 5 1648 - #define FRF_AB_GM_HUGE_FRM_EN_WIDTH 1 1649 - #define FRF_AB_GM_LEN_CHK_LBN 4 1650 - #define FRF_AB_GM_LEN_CHK_WIDTH 1 1651 - #define FRF_AB_GM_PAD_CRC_EN_LBN 2 1652 - #define FRF_AB_GM_PAD_CRC_EN_WIDTH 1 1653 - #define FRF_AB_GM_CRC_EN_LBN 1 1654 - #define FRF_AB_GM_CRC_EN_WIDTH 1 1655 - #define FRF_AB_GM_FD_LBN 0 1656 - #define FRF_AB_GM_FD_WIDTH 1 1657 - 1658 - /* GM_IPG_REG: GMAC IPG register */ 1659 - #define FR_AB_GM_IPG 0x00000e20 1660 - #define FRF_AB_GM_NONB2B_IPG1_LBN 24 1661 - #define FRF_AB_GM_NONB2B_IPG1_WIDTH 7 1662 - #define FRF_AB_GM_NONB2B_IPG2_LBN 16 1663 - #define FRF_AB_GM_NONB2B_IPG2_WIDTH 7 1664 - #define FRF_AB_GM_MIN_IPG_ENF_LBN 8 1665 - #define FRF_AB_GM_MIN_IPG_ENF_WIDTH 8 1666 - #define FRF_AB_GM_B2B_IPG_LBN 0 1667 - #define FRF_AB_GM_B2B_IPG_WIDTH 7 1668 - 1669 - /* GM_HD_REG: GMAC half duplex register */ 1670 - #define FR_AB_GM_HD 0x00000e30 1671 - #define FRF_AB_GM_ALT_BOFF_VAL_LBN 20 1672 - #define FRF_AB_GM_ALT_BOFF_VAL_WIDTH 4 1673 - #define FRF_AB_GM_ALT_BOFF_EN_LBN 19 1674 - #define FRF_AB_GM_ALT_BOFF_EN_WIDTH 1 1675 - #define FRF_AB_GM_BP_NO_BOFF_LBN 18 1676 - #define FRF_AB_GM_BP_NO_BOFF_WIDTH 1 1677 - #define FRF_AB_GM_DIS_BOFF_LBN 17 1678 - #define FRF_AB_GM_DIS_BOFF_WIDTH 1 1679 - #define FRF_AB_GM_EXDEF_TX_EN_LBN 16 1680 - #define FRF_AB_GM_EXDEF_TX_EN_WIDTH 1 1681 - #define FRF_AB_GM_RTRY_LIMIT_LBN 12 1682 - #define FRF_AB_GM_RTRY_LIMIT_WIDTH 4 1683 - #define FRF_AB_GM_COL_WIN_LBN 0 1684 - #define FRF_AB_GM_COL_WIN_WIDTH 10 1685 - 1686 - /* GM_MAX_FLEN_REG: GMAC maximum frame length register */ 1687 - #define FR_AB_GM_MAX_FLEN 0x00000e40 1688 - #define FRF_AB_GM_MAX_FLEN_LBN 0 1689 - #define FRF_AB_GM_MAX_FLEN_WIDTH 16 1690 - 1691 - /* GM_TEST_REG: GMAC test register */ 1692 - #define FR_AB_GM_TEST 0x00000e70 1693 - #define FRF_AB_GM_MAX_BOFF_LBN 3 1694 - #define FRF_AB_GM_MAX_BOFF_WIDTH 1 1695 - #define FRF_AB_GM_REG_TX_FLOW_EN_LBN 2 1696 - #define FRF_AB_GM_REG_TX_FLOW_EN_WIDTH 1 1697 - #define FRF_AB_GM_TEST_PAUSE_LBN 1 1698 - #define FRF_AB_GM_TEST_PAUSE_WIDTH 1 1699 - #define FRF_AB_GM_SHORT_SLOT_LBN 0 1700 - #define FRF_AB_GM_SHORT_SLOT_WIDTH 1 1701 - 1702 - /* GM_ADR1_REG: GMAC station address register 1 */ 1703 - #define FR_AB_GM_ADR1 0x00000f00 1704 - #define FRF_AB_GM_ADR_B0_LBN 24 1705 - #define FRF_AB_GM_ADR_B0_WIDTH 8 1706 - #define FRF_AB_GM_ADR_B1_LBN 16 1707 - #define FRF_AB_GM_ADR_B1_WIDTH 8 1708 - #define FRF_AB_GM_ADR_B2_LBN 8 1709 - #define FRF_AB_GM_ADR_B2_WIDTH 8 1710 - #define FRF_AB_GM_ADR_B3_LBN 0 1711 - #define FRF_AB_GM_ADR_B3_WIDTH 8 1712 - 1713 - /* GM_ADR2_REG: GMAC station address register 2 */ 1714 - #define FR_AB_GM_ADR2 0x00000f10 1715 - #define FRF_AB_GM_ADR_B4_LBN 24 1716 - #define FRF_AB_GM_ADR_B4_WIDTH 8 1717 - #define FRF_AB_GM_ADR_B5_LBN 16 1718 - #define FRF_AB_GM_ADR_B5_WIDTH 8 1719 - 1720 - /* GMF_CFG0_REG: GMAC FIFO configuration register 0 */ 1721 - #define FR_AB_GMF_CFG0 0x00000f20 1722 - #define FRF_AB_GMF_FTFENRPLY_LBN 20 1723 - #define FRF_AB_GMF_FTFENRPLY_WIDTH 1 1724 - #define FRF_AB_GMF_STFENRPLY_LBN 19 1725 - #define FRF_AB_GMF_STFENRPLY_WIDTH 1 1726 - #define FRF_AB_GMF_FRFENRPLY_LBN 18 1727 - #define FRF_AB_GMF_FRFENRPLY_WIDTH 1 1728 - #define FRF_AB_GMF_SRFENRPLY_LBN 17 1729 - #define FRF_AB_GMF_SRFENRPLY_WIDTH 1 1730 - #define FRF_AB_GMF_WTMENRPLY_LBN 16 1731 - #define FRF_AB_GMF_WTMENRPLY_WIDTH 1 1732 - #define FRF_AB_GMF_FTFENREQ_LBN 12 1733 - #define FRF_AB_GMF_FTFENREQ_WIDTH 1 1734 - #define FRF_AB_GMF_STFENREQ_LBN 11 1735 - #define FRF_AB_GMF_STFENREQ_WIDTH 1 1736 - #define FRF_AB_GMF_FRFENREQ_LBN 10 1737 - #define FRF_AB_GMF_FRFENREQ_WIDTH 1 1738 - #define FRF_AB_GMF_SRFENREQ_LBN 9 1739 - #define FRF_AB_GMF_SRFENREQ_WIDTH 1 1740 - #define FRF_AB_GMF_WTMENREQ_LBN 8 1741 - #define FRF_AB_GMF_WTMENREQ_WIDTH 1 1742 - #define FRF_AB_GMF_HSTRSTFT_LBN 4 1743 - #define FRF_AB_GMF_HSTRSTFT_WIDTH 1 1744 - #define FRF_AB_GMF_HSTRSTST_LBN 3 1745 - #define FRF_AB_GMF_HSTRSTST_WIDTH 1 1746 - #define FRF_AB_GMF_HSTRSTFR_LBN 2 1747 - #define FRF_AB_GMF_HSTRSTFR_WIDTH 1 1748 - #define FRF_AB_GMF_HSTRSTSR_LBN 1 1749 - #define FRF_AB_GMF_HSTRSTSR_WIDTH 1 1750 - #define FRF_AB_GMF_HSTRSTWT_LBN 0 1751 - #define FRF_AB_GMF_HSTRSTWT_WIDTH 1 1752 - 1753 - /* GMF_CFG1_REG: GMAC FIFO configuration register 1 */ 1754 - #define FR_AB_GMF_CFG1 0x00000f30 1755 - #define FRF_AB_GMF_CFGFRTH_LBN 16 1756 - #define FRF_AB_GMF_CFGFRTH_WIDTH 5 1757 - #define FRF_AB_GMF_CFGXOFFRTX_LBN 0 1758 - #define FRF_AB_GMF_CFGXOFFRTX_WIDTH 16 1759 - 1760 - /* GMF_CFG2_REG: GMAC FIFO configuration register 2 */ 1761 - #define FR_AB_GMF_CFG2 0x00000f40 1762 - #define FRF_AB_GMF_CFGHWM_LBN 16 1763 - #define FRF_AB_GMF_CFGHWM_WIDTH 6 1764 - #define FRF_AB_GMF_CFGLWM_LBN 0 1765 - #define FRF_AB_GMF_CFGLWM_WIDTH 6 1766 - 1767 - /* GMF_CFG3_REG: GMAC FIFO configuration register 3 */ 1768 - #define FR_AB_GMF_CFG3 0x00000f50 1769 - #define FRF_AB_GMF_CFGHWMFT_LBN 16 1770 - #define FRF_AB_GMF_CFGHWMFT_WIDTH 6 1771 - #define FRF_AB_GMF_CFGFTTH_LBN 0 1772 - #define FRF_AB_GMF_CFGFTTH_WIDTH 6 1773 - 1774 - /* GMF_CFG4_REG: GMAC FIFO configuration register 4 */ 1775 - #define FR_AB_GMF_CFG4 0x00000f60 1776 - #define FRF_AB_GMF_HSTFLTRFRM_LBN 0 1777 - #define FRF_AB_GMF_HSTFLTRFRM_WIDTH 18 1778 - 1779 - /* GMF_CFG5_REG: GMAC FIFO configuration register 5 */ 1780 - #define FR_AB_GMF_CFG5 0x00000f70 1781 - #define FRF_AB_GMF_CFGHDPLX_LBN 22 1782 - #define FRF_AB_GMF_CFGHDPLX_WIDTH 1 1783 - #define FRF_AB_GMF_SRFULL_LBN 21 1784 - #define FRF_AB_GMF_SRFULL_WIDTH 1 1785 - #define FRF_AB_GMF_HSTSRFULLCLR_LBN 20 1786 - #define FRF_AB_GMF_HSTSRFULLCLR_WIDTH 1 1787 - #define FRF_AB_GMF_CFGBYTMODE_LBN 19 1788 - #define FRF_AB_GMF_CFGBYTMODE_WIDTH 1 1789 - #define FRF_AB_GMF_HSTDRPLT64_LBN 18 1790 - #define FRF_AB_GMF_HSTDRPLT64_WIDTH 1 1791 - #define FRF_AB_GMF_HSTFLTRFRMDC_LBN 0 1792 - #define FRF_AB_GMF_HSTFLTRFRMDC_WIDTH 18 1793 - 1794 - /* TX_SRC_MAC_TBL: Transmit IP source address filter table */ 1795 - #define FR_BB_TX_SRC_MAC_TBL 0x00001000 1796 - #define FR_BB_TX_SRC_MAC_TBL_STEP 16 1797 - #define FR_BB_TX_SRC_MAC_TBL_ROWS 16 1798 - #define FRF_BB_TX_SRC_MAC_ADR_1_LBN 64 1799 - #define FRF_BB_TX_SRC_MAC_ADR_1_WIDTH 48 1800 - #define FRF_BB_TX_SRC_MAC_ADR_0_LBN 0 1801 - #define FRF_BB_TX_SRC_MAC_ADR_0_WIDTH 48 1802 - 1803 - /* TX_SRC_MAC_CTL_REG: Transmit MAC source address filter control */ 1804 - #define FR_BB_TX_SRC_MAC_CTL 0x00001100 1805 - #define FRF_BB_TX_SRC_DROP_CTR_LBN 16 1806 - #define FRF_BB_TX_SRC_DROP_CTR_WIDTH 16 1807 - #define FRF_BB_TX_SRC_FLTR_EN_LBN 15 1808 - #define FRF_BB_TX_SRC_FLTR_EN_WIDTH 1 1809 - #define FRF_BB_TX_DROP_CTR_CLR_LBN 12 1810 - #define FRF_BB_TX_DROP_CTR_CLR_WIDTH 1 1811 - #define FRF_BB_TX_MAC_QID_SEL_LBN 0 1812 - #define FRF_BB_TX_MAC_QID_SEL_WIDTH 3 1813 - 1814 - /* XM_ADR_LO_REG: XGMAC address register low */ 1815 - #define FR_AB_XM_ADR_LO 0x00001200 1816 - #define FRF_AB_XM_ADR_LO_LBN 0 1817 - #define FRF_AB_XM_ADR_LO_WIDTH 32 1818 - 1819 - /* XM_ADR_HI_REG: XGMAC address register high */ 1820 - #define FR_AB_XM_ADR_HI 0x00001210 1821 - #define FRF_AB_XM_ADR_HI_LBN 0 1822 - #define FRF_AB_XM_ADR_HI_WIDTH 16 1823 - 1824 - /* XM_GLB_CFG_REG: XGMAC global configuration */ 1825 - #define FR_AB_XM_GLB_CFG 0x00001220 1826 - #define FRF_AB_XM_RMTFLT_GEN_LBN 17 1827 - #define FRF_AB_XM_RMTFLT_GEN_WIDTH 1 1828 - #define FRF_AB_XM_DEBUG_MODE_LBN 16 1829 - #define FRF_AB_XM_DEBUG_MODE_WIDTH 1 1830 - #define FRF_AB_XM_RX_STAT_EN_LBN 11 1831 - #define FRF_AB_XM_RX_STAT_EN_WIDTH 1 1832 - #define FRF_AB_XM_TX_STAT_EN_LBN 10 1833 - #define FRF_AB_XM_TX_STAT_EN_WIDTH 1 1834 - #define FRF_AB_XM_RX_JUMBO_MODE_LBN 6 1835 - #define FRF_AB_XM_RX_JUMBO_MODE_WIDTH 1 1836 - #define FRF_AB_XM_WAN_MODE_LBN 5 1837 - #define FRF_AB_XM_WAN_MODE_WIDTH 1 1838 - #define FRF_AB_XM_INTCLR_MODE_LBN 3 1839 - #define FRF_AB_XM_INTCLR_MODE_WIDTH 1 1840 - #define FRF_AB_XM_CORE_RST_LBN 0 1841 - #define FRF_AB_XM_CORE_RST_WIDTH 1 1842 - 1843 - /* XM_TX_CFG_REG: XGMAC transmit configuration */ 1844 - #define FR_AB_XM_TX_CFG 0x00001230 1845 - #define FRF_AB_XM_TX_PROG_LBN 24 1846 - #define FRF_AB_XM_TX_PROG_WIDTH 1 1847 - #define FRF_AB_XM_IPG_LBN 16 1848 - #define FRF_AB_XM_IPG_WIDTH 4 1849 - #define FRF_AB_XM_FCNTL_LBN 10 1850 - #define FRF_AB_XM_FCNTL_WIDTH 1 1851 - #define FRF_AB_XM_TXCRC_LBN 8 1852 - #define FRF_AB_XM_TXCRC_WIDTH 1 1853 - #define FRF_AB_XM_EDRC_LBN 6 1854 - #define FRF_AB_XM_EDRC_WIDTH 1 1855 - #define FRF_AB_XM_AUTO_PAD_LBN 5 1856 - #define FRF_AB_XM_AUTO_PAD_WIDTH 1 1857 - #define FRF_AB_XM_TX_PRMBL_LBN 2 1858 - #define FRF_AB_XM_TX_PRMBL_WIDTH 1 1859 - #define FRF_AB_XM_TXEN_LBN 1 1860 - #define FRF_AB_XM_TXEN_WIDTH 1 1861 - #define FRF_AB_XM_TX_RST_LBN 0 1862 - #define FRF_AB_XM_TX_RST_WIDTH 1 1863 - 1864 - /* XM_RX_CFG_REG: XGMAC receive configuration */ 1865 - #define FR_AB_XM_RX_CFG 0x00001240 1866 - #define FRF_AB_XM_PASS_LENERR_LBN 26 1867 - #define FRF_AB_XM_PASS_LENERR_WIDTH 1 1868 - #define FRF_AB_XM_PASS_CRC_ERR_LBN 25 1869 - #define FRF_AB_XM_PASS_CRC_ERR_WIDTH 1 1870 - #define FRF_AB_XM_PASS_PRMBLE_ERR_LBN 24 1871 - #define FRF_AB_XM_PASS_PRMBLE_ERR_WIDTH 1 1872 - #define FRF_AB_XM_REJ_BCAST_LBN 20 1873 - #define FRF_AB_XM_REJ_BCAST_WIDTH 1 1874 - #define FRF_AB_XM_ACPT_ALL_MCAST_LBN 11 1875 - #define FRF_AB_XM_ACPT_ALL_MCAST_WIDTH 1 1876 - #define FRF_AB_XM_ACPT_ALL_UCAST_LBN 9 1877 - #define FRF_AB_XM_ACPT_ALL_UCAST_WIDTH 1 1878 - #define FRF_AB_XM_AUTO_DEPAD_LBN 8 1879 - #define FRF_AB_XM_AUTO_DEPAD_WIDTH 1 1880 - #define FRF_AB_XM_RXCRC_LBN 3 1881 - #define FRF_AB_XM_RXCRC_WIDTH 1 1882 - #define FRF_AB_XM_RX_PRMBL_LBN 2 1883 - #define FRF_AB_XM_RX_PRMBL_WIDTH 1 1884 - #define FRF_AB_XM_RXEN_LBN 1 1885 - #define FRF_AB_XM_RXEN_WIDTH 1 1886 - #define FRF_AB_XM_RX_RST_LBN 0 1887 - #define FRF_AB_XM_RX_RST_WIDTH 1 1888 - 1889 - /* XM_MGT_INT_MASK: documentation to be written for sum_XM_MGT_INT_MASK */ 1890 - #define FR_AB_XM_MGT_INT_MASK 0x00001250 1891 - #define FRF_AB_XM_MSK_STA_INTR_LBN 16 1892 - #define FRF_AB_XM_MSK_STA_INTR_WIDTH 1 1893 - #define FRF_AB_XM_MSK_STAT_CNTR_HF_LBN 9 1894 - #define FRF_AB_XM_MSK_STAT_CNTR_HF_WIDTH 1 1895 - #define FRF_AB_XM_MSK_STAT_CNTR_OF_LBN 8 1896 - #define FRF_AB_XM_MSK_STAT_CNTR_OF_WIDTH 1 1897 - #define FRF_AB_XM_MSK_PRMBLE_ERR_LBN 2 1898 - #define FRF_AB_XM_MSK_PRMBLE_ERR_WIDTH 1 1899 - #define FRF_AB_XM_MSK_RMTFLT_LBN 1 1900 - #define FRF_AB_XM_MSK_RMTFLT_WIDTH 1 1901 - #define FRF_AB_XM_MSK_LCLFLT_LBN 0 1902 - #define FRF_AB_XM_MSK_LCLFLT_WIDTH 1 1903 - 1904 - /* XM_FC_REG: XGMAC flow control register */ 1905 - #define FR_AB_XM_FC 0x00001270 1906 - #define FRF_AB_XM_PAUSE_TIME_LBN 16 1907 - #define FRF_AB_XM_PAUSE_TIME_WIDTH 16 1908 - #define FRF_AB_XM_RX_MAC_STAT_LBN 11 1909 - #define FRF_AB_XM_RX_MAC_STAT_WIDTH 1 1910 - #define FRF_AB_XM_TX_MAC_STAT_LBN 10 1911 - #define FRF_AB_XM_TX_MAC_STAT_WIDTH 1 1912 - #define FRF_AB_XM_MCNTL_PASS_LBN 8 1913 - #define FRF_AB_XM_MCNTL_PASS_WIDTH 2 1914 - #define FRF_AB_XM_REJ_CNTL_UCAST_LBN 6 1915 - #define FRF_AB_XM_REJ_CNTL_UCAST_WIDTH 1 1916 - #define FRF_AB_XM_REJ_CNTL_MCAST_LBN 5 1917 - #define FRF_AB_XM_REJ_CNTL_MCAST_WIDTH 1 1918 - #define FRF_AB_XM_ZPAUSE_LBN 2 1919 - #define FRF_AB_XM_ZPAUSE_WIDTH 1 1920 - #define FRF_AB_XM_XMIT_PAUSE_LBN 1 1921 - #define FRF_AB_XM_XMIT_PAUSE_WIDTH 1 1922 - #define FRF_AB_XM_DIS_FCNTL_LBN 0 1923 - #define FRF_AB_XM_DIS_FCNTL_WIDTH 1 1924 - 1925 - /* XM_PAUSE_TIME_REG: XGMAC pause time register */ 1926 - #define FR_AB_XM_PAUSE_TIME 0x00001290 1927 - #define FRF_AB_XM_TX_PAUSE_CNT_LBN 16 1928 - #define FRF_AB_XM_TX_PAUSE_CNT_WIDTH 16 1929 - #define FRF_AB_XM_RX_PAUSE_CNT_LBN 0 1930 - #define FRF_AB_XM_RX_PAUSE_CNT_WIDTH 16 1931 - 1932 - /* XM_TX_PARAM_REG: XGMAC transmit parameter register */ 1933 - #define FR_AB_XM_TX_PARAM 0x000012d0 1934 - #define FRF_AB_XM_TX_JUMBO_MODE_LBN 31 1935 - #define FRF_AB_XM_TX_JUMBO_MODE_WIDTH 1 1936 - #define FRF_AB_XM_MAX_TX_FRM_SIZE_HI_LBN 19 1937 - #define FRF_AB_XM_MAX_TX_FRM_SIZE_HI_WIDTH 11 1938 - #define FRF_AB_XM_MAX_TX_FRM_SIZE_LO_LBN 16 1939 - #define FRF_AB_XM_MAX_TX_FRM_SIZE_LO_WIDTH 3 1940 - #define FRF_AB_XM_PAD_CHAR_LBN 0 1941 - #define FRF_AB_XM_PAD_CHAR_WIDTH 8 1942 - 1943 - /* XM_RX_PARAM_REG: XGMAC receive parameter register */ 1944 - #define FR_AB_XM_RX_PARAM 0x000012e0 1945 - #define FRF_AB_XM_MAX_RX_FRM_SIZE_HI_LBN 3 1946 - #define FRF_AB_XM_MAX_RX_FRM_SIZE_HI_WIDTH 11 1947 - #define FRF_AB_XM_MAX_RX_FRM_SIZE_LO_LBN 0 1948 - #define FRF_AB_XM_MAX_RX_FRM_SIZE_LO_WIDTH 3 1949 - 1950 - /* XM_MGT_INT_MSK_REG: XGMAC management interrupt mask register */ 1951 - #define FR_AB_XM_MGT_INT_MSK 0x000012f0 1952 - #define FRF_AB_XM_STAT_CNTR_OF_LBN 9 1953 - #define FRF_AB_XM_STAT_CNTR_OF_WIDTH 1 1954 - #define FRF_AB_XM_STAT_CNTR_HF_LBN 8 1955 - #define FRF_AB_XM_STAT_CNTR_HF_WIDTH 1 1956 - #define FRF_AB_XM_PRMBLE_ERR_LBN 2 1957 - #define FRF_AB_XM_PRMBLE_ERR_WIDTH 1 1958 - #define FRF_AB_XM_RMTFLT_LBN 1 1959 - #define FRF_AB_XM_RMTFLT_WIDTH 1 1960 - #define FRF_AB_XM_LCLFLT_LBN 0 1961 - #define FRF_AB_XM_LCLFLT_WIDTH 1 1962 - 1963 - /* XX_PWR_RST_REG: XGXS/XAUI powerdown/reset register */ 1964 - #define FR_AB_XX_PWR_RST 0x00001300 1965 - #define FRF_AB_XX_PWRDND_SIG_LBN 31 1966 - #define FRF_AB_XX_PWRDND_SIG_WIDTH 1 1967 - #define FRF_AB_XX_PWRDNC_SIG_LBN 30 1968 - #define FRF_AB_XX_PWRDNC_SIG_WIDTH 1 1969 - #define FRF_AB_XX_PWRDNB_SIG_LBN 29 1970 - #define FRF_AB_XX_PWRDNB_SIG_WIDTH 1 1971 - #define FRF_AB_XX_PWRDNA_SIG_LBN 28 1972 - #define FRF_AB_XX_PWRDNA_SIG_WIDTH 1 1973 - #define FRF_AB_XX_SIM_MODE_LBN 27 1974 - #define FRF_AB_XX_SIM_MODE_WIDTH 1 1975 - #define FRF_AB_XX_RSTPLLCD_SIG_LBN 25 1976 - #define FRF_AB_XX_RSTPLLCD_SIG_WIDTH 1 1977 - #define FRF_AB_XX_RSTPLLAB_SIG_LBN 24 1978 - #define FRF_AB_XX_RSTPLLAB_SIG_WIDTH 1 1979 - #define FRF_AB_XX_RESETD_SIG_LBN 23 1980 - #define FRF_AB_XX_RESETD_SIG_WIDTH 1 1981 - #define FRF_AB_XX_RESETC_SIG_LBN 22 1982 - #define FRF_AB_XX_RESETC_SIG_WIDTH 1 1983 - #define FRF_AB_XX_RESETB_SIG_LBN 21 1984 - #define FRF_AB_XX_RESETB_SIG_WIDTH 1 1985 - #define FRF_AB_XX_RESETA_SIG_LBN 20 1986 - #define FRF_AB_XX_RESETA_SIG_WIDTH 1 1987 - #define FRF_AB_XX_RSTXGXSRX_SIG_LBN 18 1988 - #define FRF_AB_XX_RSTXGXSRX_SIG_WIDTH 1 1989 - #define FRF_AB_XX_RSTXGXSTX_SIG_LBN 17 1990 - #define FRF_AB_XX_RSTXGXSTX_SIG_WIDTH 1 1991 - #define FRF_AB_XX_SD_RST_ACT_LBN 16 1992 - #define FRF_AB_XX_SD_RST_ACT_WIDTH 1 1993 - #define FRF_AB_XX_PWRDND_EN_LBN 15 1994 - #define FRF_AB_XX_PWRDND_EN_WIDTH 1 1995 - #define FRF_AB_XX_PWRDNC_EN_LBN 14 1996 - #define FRF_AB_XX_PWRDNC_EN_WIDTH 1 1997 - #define FRF_AB_XX_PWRDNB_EN_LBN 13 1998 - #define FRF_AB_XX_PWRDNB_EN_WIDTH 1 1999 - #define FRF_AB_XX_PWRDNA_EN_LBN 12 2000 - #define FRF_AB_XX_PWRDNA_EN_WIDTH 1 2001 - #define FRF_AB_XX_RSTPLLCD_EN_LBN 9 2002 - #define FRF_AB_XX_RSTPLLCD_EN_WIDTH 1 2003 - #define FRF_AB_XX_RSTPLLAB_EN_LBN 8 2004 - #define FRF_AB_XX_RSTPLLAB_EN_WIDTH 1 2005 - #define FRF_AB_XX_RESETD_EN_LBN 7 2006 - #define FRF_AB_XX_RESETD_EN_WIDTH 1 2007 - #define FRF_AB_XX_RESETC_EN_LBN 6 2008 - #define FRF_AB_XX_RESETC_EN_WIDTH 1 2009 - #define FRF_AB_XX_RESETB_EN_LBN 5 2010 - #define FRF_AB_XX_RESETB_EN_WIDTH 1 2011 - #define FRF_AB_XX_RESETA_EN_LBN 4 2012 - #define FRF_AB_XX_RESETA_EN_WIDTH 1 2013 - #define FRF_AB_XX_RSTXGXSRX_EN_LBN 2 2014 - #define FRF_AB_XX_RSTXGXSRX_EN_WIDTH 1 2015 - #define FRF_AB_XX_RSTXGXSTX_EN_LBN 1 2016 - #define FRF_AB_XX_RSTXGXSTX_EN_WIDTH 1 2017 - #define FRF_AB_XX_RST_XX_EN_LBN 0 2018 - #define FRF_AB_XX_RST_XX_EN_WIDTH 1 2019 - 2020 - /* XX_SD_CTL_REG: XGXS/XAUI powerdown/reset control register */ 2021 - #define FR_AB_XX_SD_CTL 0x00001310 2022 - #define FRF_AB_XX_TERMADJ1_LBN 17 2023 - #define FRF_AB_XX_TERMADJ1_WIDTH 1 2024 - #define FRF_AB_XX_TERMADJ0_LBN 16 2025 - #define FRF_AB_XX_TERMADJ0_WIDTH 1 2026 - #define FRF_AB_XX_HIDRVD_LBN 15 2027 - #define FRF_AB_XX_HIDRVD_WIDTH 1 2028 - #define FRF_AB_XX_LODRVD_LBN 14 2029 - #define FRF_AB_XX_LODRVD_WIDTH 1 2030 - #define FRF_AB_XX_HIDRVC_LBN 13 2031 - #define FRF_AB_XX_HIDRVC_WIDTH 1 2032 - #define FRF_AB_XX_LODRVC_LBN 12 2033 - #define FRF_AB_XX_LODRVC_WIDTH 1 2034 - #define FRF_AB_XX_HIDRVB_LBN 11 2035 - #define FRF_AB_XX_HIDRVB_WIDTH 1 2036 - #define FRF_AB_XX_LODRVB_LBN 10 2037 - #define FRF_AB_XX_LODRVB_WIDTH 1 2038 - #define FRF_AB_XX_HIDRVA_LBN 9 2039 - #define FRF_AB_XX_HIDRVA_WIDTH 1 2040 - #define FRF_AB_XX_LODRVA_LBN 8 2041 - #define FRF_AB_XX_LODRVA_WIDTH 1 2042 - #define FRF_AB_XX_LPBKD_LBN 3 2043 - #define FRF_AB_XX_LPBKD_WIDTH 1 2044 - #define FRF_AB_XX_LPBKC_LBN 2 2045 - #define FRF_AB_XX_LPBKC_WIDTH 1 2046 - #define FRF_AB_XX_LPBKB_LBN 1 2047 - #define FRF_AB_XX_LPBKB_WIDTH 1 2048 - #define FRF_AB_XX_LPBKA_LBN 0 2049 - #define FRF_AB_XX_LPBKA_WIDTH 1 2050 - 2051 - /* XX_TXDRV_CTL_REG: XAUI SerDes transmit drive control register */ 2052 - #define FR_AB_XX_TXDRV_CTL 0x00001320 2053 - #define FRF_AB_XX_DEQD_LBN 28 2054 - #define FRF_AB_XX_DEQD_WIDTH 4 2055 - #define FRF_AB_XX_DEQC_LBN 24 2056 - #define FRF_AB_XX_DEQC_WIDTH 4 2057 - #define FRF_AB_XX_DEQB_LBN 20 2058 - #define FRF_AB_XX_DEQB_WIDTH 4 2059 - #define FRF_AB_XX_DEQA_LBN 16 2060 - #define FRF_AB_XX_DEQA_WIDTH 4 2061 - #define FRF_AB_XX_DTXD_LBN 12 2062 - #define FRF_AB_XX_DTXD_WIDTH 4 2063 - #define FRF_AB_XX_DTXC_LBN 8 2064 - #define FRF_AB_XX_DTXC_WIDTH 4 2065 - #define FRF_AB_XX_DTXB_LBN 4 2066 - #define FRF_AB_XX_DTXB_WIDTH 4 2067 - #define FRF_AB_XX_DTXA_LBN 0 2068 - #define FRF_AB_XX_DTXA_WIDTH 4 2069 - 2070 - /* XX_PRBS_CTL_REG: documentation to be written for sum_XX_PRBS_CTL_REG */ 2071 - #define FR_AB_XX_PRBS_CTL 0x00001330 2072 - #define FRF_AB_XX_CH3_RX_PRBS_SEL_LBN 30 2073 - #define FRF_AB_XX_CH3_RX_PRBS_SEL_WIDTH 2 2074 - #define FRF_AB_XX_CH3_RX_PRBS_INV_LBN 29 2075 - #define FRF_AB_XX_CH3_RX_PRBS_INV_WIDTH 1 2076 - #define FRF_AB_XX_CH3_RX_PRBS_CHKEN_LBN 28 2077 - #define FRF_AB_XX_CH3_RX_PRBS_CHKEN_WIDTH 1 2078 - #define FRF_AB_XX_CH2_RX_PRBS_SEL_LBN 26 2079 - #define FRF_AB_XX_CH2_RX_PRBS_SEL_WIDTH 2 2080 - #define FRF_AB_XX_CH2_RX_PRBS_INV_LBN 25 2081 - #define FRF_AB_XX_CH2_RX_PRBS_INV_WIDTH 1 2082 - #define FRF_AB_XX_CH2_RX_PRBS_CHKEN_LBN 24 2083 - #define FRF_AB_XX_CH2_RX_PRBS_CHKEN_WIDTH 1 2084 - #define FRF_AB_XX_CH1_RX_PRBS_SEL_LBN 22 2085 - #define FRF_AB_XX_CH1_RX_PRBS_SEL_WIDTH 2 2086 - #define FRF_AB_XX_CH1_RX_PRBS_INV_LBN 21 2087 - #define FRF_AB_XX_CH1_RX_PRBS_INV_WIDTH 1 2088 - #define FRF_AB_XX_CH1_RX_PRBS_CHKEN_LBN 20 2089 - #define FRF_AB_XX_CH1_RX_PRBS_CHKEN_WIDTH 1 2090 - #define FRF_AB_XX_CH0_RX_PRBS_SEL_LBN 18 2091 - #define FRF_AB_XX_CH0_RX_PRBS_SEL_WIDTH 2 2092 - #define FRF_AB_XX_CH0_RX_PRBS_INV_LBN 17 2093 - #define FRF_AB_XX_CH0_RX_PRBS_INV_WIDTH 1 2094 - #define FRF_AB_XX_CH0_RX_PRBS_CHKEN_LBN 16 2095 - #define FRF_AB_XX_CH0_RX_PRBS_CHKEN_WIDTH 1 2096 - #define FRF_AB_XX_CH3_TX_PRBS_SEL_LBN 14 2097 - #define FRF_AB_XX_CH3_TX_PRBS_SEL_WIDTH 2 2098 - #define FRF_AB_XX_CH3_TX_PRBS_INV_LBN 13 2099 - #define FRF_AB_XX_CH3_TX_PRBS_INV_WIDTH 1 2100 - #define FRF_AB_XX_CH3_TX_PRBS_CHKEN_LBN 12 2101 - #define FRF_AB_XX_CH3_TX_PRBS_CHKEN_WIDTH 1 2102 - #define FRF_AB_XX_CH2_TX_PRBS_SEL_LBN 10 2103 - #define FRF_AB_XX_CH2_TX_PRBS_SEL_WIDTH 2 2104 - #define FRF_AB_XX_CH2_TX_PRBS_INV_LBN 9 2105 - #define FRF_AB_XX_CH2_TX_PRBS_INV_WIDTH 1 2106 - #define FRF_AB_XX_CH2_TX_PRBS_CHKEN_LBN 8 2107 - #define FRF_AB_XX_CH2_TX_PRBS_CHKEN_WIDTH 1 2108 - #define FRF_AB_XX_CH1_TX_PRBS_SEL_LBN 6 2109 - #define FRF_AB_XX_CH1_TX_PRBS_SEL_WIDTH 2 2110 - #define FRF_AB_XX_CH1_TX_PRBS_INV_LBN 5 2111 - #define FRF_AB_XX_CH1_TX_PRBS_INV_WIDTH 1 2112 - #define FRF_AB_XX_CH1_TX_PRBS_CHKEN_LBN 4 2113 - #define FRF_AB_XX_CH1_TX_PRBS_CHKEN_WIDTH 1 2114 - #define FRF_AB_XX_CH0_TX_PRBS_SEL_LBN 2 2115 - #define FRF_AB_XX_CH0_TX_PRBS_SEL_WIDTH 2 2116 - #define FRF_AB_XX_CH0_TX_PRBS_INV_LBN 1 2117 - #define FRF_AB_XX_CH0_TX_PRBS_INV_WIDTH 1 2118 - #define FRF_AB_XX_CH0_TX_PRBS_CHKEN_LBN 0 2119 - #define FRF_AB_XX_CH0_TX_PRBS_CHKEN_WIDTH 1 2120 - 2121 - /* XX_PRBS_CHK_REG: documentation to be written for sum_XX_PRBS_CHK_REG */ 2122 - #define FR_AB_XX_PRBS_CHK 0x00001340 2123 - #define FRF_AB_XX_REV_LB_EN_LBN 16 2124 - #define FRF_AB_XX_REV_LB_EN_WIDTH 1 2125 - #define FRF_AB_XX_CH3_DEG_DET_LBN 15 2126 - #define FRF_AB_XX_CH3_DEG_DET_WIDTH 1 2127 - #define FRF_AB_XX_CH3_LFSR_LOCK_IND_LBN 14 2128 - #define FRF_AB_XX_CH3_LFSR_LOCK_IND_WIDTH 1 2129 - #define FRF_AB_XX_CH3_PRBS_FRUN_LBN 13 2130 - #define FRF_AB_XX_CH3_PRBS_FRUN_WIDTH 1 2131 - #define FRF_AB_XX_CH3_ERR_CHK_LBN 12 2132 - #define FRF_AB_XX_CH3_ERR_CHK_WIDTH 1 2133 - #define FRF_AB_XX_CH2_DEG_DET_LBN 11 2134 - #define FRF_AB_XX_CH2_DEG_DET_WIDTH 1 2135 - #define FRF_AB_XX_CH2_LFSR_LOCK_IND_LBN 10 2136 - #define FRF_AB_XX_CH2_LFSR_LOCK_IND_WIDTH 1 2137 - #define FRF_AB_XX_CH2_PRBS_FRUN_LBN 9 2138 - #define FRF_AB_XX_CH2_PRBS_FRUN_WIDTH 1 2139 - #define FRF_AB_XX_CH2_ERR_CHK_LBN 8 2140 - #define FRF_AB_XX_CH2_ERR_CHK_WIDTH 1 2141 - #define FRF_AB_XX_CH1_DEG_DET_LBN 7 2142 - #define FRF_AB_XX_CH1_DEG_DET_WIDTH 1 2143 - #define FRF_AB_XX_CH1_LFSR_LOCK_IND_LBN 6 2144 - #define FRF_AB_XX_CH1_LFSR_LOCK_IND_WIDTH 1 2145 - #define FRF_AB_XX_CH1_PRBS_FRUN_LBN 5 2146 - #define FRF_AB_XX_CH1_PRBS_FRUN_WIDTH 1 2147 - #define FRF_AB_XX_CH1_ERR_CHK_LBN 4 2148 - #define FRF_AB_XX_CH1_ERR_CHK_WIDTH 1 2149 - #define FRF_AB_XX_CH0_DEG_DET_LBN 3 2150 - #define FRF_AB_XX_CH0_DEG_DET_WIDTH 1 2151 - #define FRF_AB_XX_CH0_LFSR_LOCK_IND_LBN 2 2152 - #define FRF_AB_XX_CH0_LFSR_LOCK_IND_WIDTH 1 2153 - #define FRF_AB_XX_CH0_PRBS_FRUN_LBN 1 2154 - #define FRF_AB_XX_CH0_PRBS_FRUN_WIDTH 1 2155 - #define FRF_AB_XX_CH0_ERR_CHK_LBN 0 2156 - #define FRF_AB_XX_CH0_ERR_CHK_WIDTH 1 2157 - 2158 - /* XX_PRBS_ERR_REG: documentation to be written for sum_XX_PRBS_ERR_REG */ 2159 - #define FR_AB_XX_PRBS_ERR 0x00001350 2160 - #define FRF_AB_XX_CH3_PRBS_ERR_CNT_LBN 24 2161 - #define FRF_AB_XX_CH3_PRBS_ERR_CNT_WIDTH 8 2162 - #define FRF_AB_XX_CH2_PRBS_ERR_CNT_LBN 16 2163 - #define FRF_AB_XX_CH2_PRBS_ERR_CNT_WIDTH 8 2164 - #define FRF_AB_XX_CH1_PRBS_ERR_CNT_LBN 8 2165 - #define FRF_AB_XX_CH1_PRBS_ERR_CNT_WIDTH 8 2166 - #define FRF_AB_XX_CH0_PRBS_ERR_CNT_LBN 0 2167 - #define FRF_AB_XX_CH0_PRBS_ERR_CNT_WIDTH 8 2168 - 2169 - /* XX_CORE_STAT_REG: XAUI XGXS core status register */ 2170 - #define FR_AB_XX_CORE_STAT 0x00001360 2171 - #define FRF_AB_XX_FORCE_SIG3_LBN 31 2172 - #define FRF_AB_XX_FORCE_SIG3_WIDTH 1 2173 - #define FRF_AB_XX_FORCE_SIG3_VAL_LBN 30 2174 - #define FRF_AB_XX_FORCE_SIG3_VAL_WIDTH 1 2175 - #define FRF_AB_XX_FORCE_SIG2_LBN 29 2176 - #define FRF_AB_XX_FORCE_SIG2_WIDTH 1 2177 - #define FRF_AB_XX_FORCE_SIG2_VAL_LBN 28 2178 - #define FRF_AB_XX_FORCE_SIG2_VAL_WIDTH 1 2179 - #define FRF_AB_XX_FORCE_SIG1_LBN 27 2180 - #define FRF_AB_XX_FORCE_SIG1_WIDTH 1 2181 - #define FRF_AB_XX_FORCE_SIG1_VAL_LBN 26 2182 - #define FRF_AB_XX_FORCE_SIG1_VAL_WIDTH 1 2183 - #define FRF_AB_XX_FORCE_SIG0_LBN 25 2184 - #define FRF_AB_XX_FORCE_SIG0_WIDTH 1 2185 - #define FRF_AB_XX_FORCE_SIG0_VAL_LBN 24 2186 - #define FRF_AB_XX_FORCE_SIG0_VAL_WIDTH 1 2187 - #define FRF_AB_XX_XGXS_LB_EN_LBN 23 2188 - #define FRF_AB_XX_XGXS_LB_EN_WIDTH 1 2189 - #define FRF_AB_XX_XGMII_LB_EN_LBN 22 2190 - #define FRF_AB_XX_XGMII_LB_EN_WIDTH 1 2191 - #define FRF_AB_XX_MATCH_FAULT_LBN 21 2192 - #define FRF_AB_XX_MATCH_FAULT_WIDTH 1 2193 - #define FRF_AB_XX_ALIGN_DONE_LBN 20 2194 - #define FRF_AB_XX_ALIGN_DONE_WIDTH 1 2195 - #define FRF_AB_XX_SYNC_STAT3_LBN 19 2196 - #define FRF_AB_XX_SYNC_STAT3_WIDTH 1 2197 - #define FRF_AB_XX_SYNC_STAT2_LBN 18 2198 - #define FRF_AB_XX_SYNC_STAT2_WIDTH 1 2199 - #define FRF_AB_XX_SYNC_STAT1_LBN 17 2200 - #define FRF_AB_XX_SYNC_STAT1_WIDTH 1 2201 - #define FRF_AB_XX_SYNC_STAT0_LBN 16 2202 - #define FRF_AB_XX_SYNC_STAT0_WIDTH 1 2203 - #define FRF_AB_XX_COMMA_DET_CH3_LBN 15 2204 - #define FRF_AB_XX_COMMA_DET_CH3_WIDTH 1 2205 - #define FRF_AB_XX_COMMA_DET_CH2_LBN 14 2206 - #define FRF_AB_XX_COMMA_DET_CH2_WIDTH 1 2207 - #define FRF_AB_XX_COMMA_DET_CH1_LBN 13 2208 - #define FRF_AB_XX_COMMA_DET_CH1_WIDTH 1 2209 - #define FRF_AB_XX_COMMA_DET_CH0_LBN 12 2210 - #define FRF_AB_XX_COMMA_DET_CH0_WIDTH 1 2211 - #define FRF_AB_XX_CGRP_ALIGN_CH3_LBN 11 2212 - #define FRF_AB_XX_CGRP_ALIGN_CH3_WIDTH 1 2213 - #define FRF_AB_XX_CGRP_ALIGN_CH2_LBN 10 2214 - #define FRF_AB_XX_CGRP_ALIGN_CH2_WIDTH 1 2215 - #define FRF_AB_XX_CGRP_ALIGN_CH1_LBN 9 2216 - #define FRF_AB_XX_CGRP_ALIGN_CH1_WIDTH 1 2217 - #define FRF_AB_XX_CGRP_ALIGN_CH0_LBN 8 2218 - #define FRF_AB_XX_CGRP_ALIGN_CH0_WIDTH 1 2219 - #define FRF_AB_XX_CHAR_ERR_CH3_LBN 7 2220 - #define FRF_AB_XX_CHAR_ERR_CH3_WIDTH 1 2221 - #define FRF_AB_XX_CHAR_ERR_CH2_LBN 6 2222 - #define FRF_AB_XX_CHAR_ERR_CH2_WIDTH 1 2223 - #define FRF_AB_XX_CHAR_ERR_CH1_LBN 5 2224 - #define FRF_AB_XX_CHAR_ERR_CH1_WIDTH 1 2225 - #define FRF_AB_XX_CHAR_ERR_CH0_LBN 4 2226 - #define FRF_AB_XX_CHAR_ERR_CH0_WIDTH 1 2227 - #define FRF_AB_XX_DISPERR_CH3_LBN 3 2228 - #define FRF_AB_XX_DISPERR_CH3_WIDTH 1 2229 - #define FRF_AB_XX_DISPERR_CH2_LBN 2 2230 - #define FRF_AB_XX_DISPERR_CH2_WIDTH 1 2231 - #define FRF_AB_XX_DISPERR_CH1_LBN 1 2232 - #define FRF_AB_XX_DISPERR_CH1_WIDTH 1 2233 - #define FRF_AB_XX_DISPERR_CH0_LBN 0 2234 - #define FRF_AB_XX_DISPERR_CH0_WIDTH 1 2235 - 2236 - /* RX_DESC_PTR_TBL_KER: Receive descriptor pointer table */ 2237 - #define FR_AA_RX_DESC_PTR_TBL_KER 0x00011800 2238 - #define FR_AA_RX_DESC_PTR_TBL_KER_STEP 16 2239 - #define FR_AA_RX_DESC_PTR_TBL_KER_ROWS 4 2240 - /* RX_DESC_PTR_TBL: Receive descriptor pointer table */ 2241 - #define FR_BZ_RX_DESC_PTR_TBL 0x00f40000 2242 - #define FR_BZ_RX_DESC_PTR_TBL_STEP 16 2243 - #define FR_BB_RX_DESC_PTR_TBL_ROWS 4096 2244 - #define FR_CZ_RX_DESC_PTR_TBL_ROWS 1024 2245 - #define FRF_CZ_RX_HDR_SPLIT_LBN 90 2246 - #define FRF_CZ_RX_HDR_SPLIT_WIDTH 1 2247 - #define FRF_AA_RX_RESET_LBN 89 2248 - #define FRF_AA_RX_RESET_WIDTH 1 2249 - #define FRF_AZ_RX_ISCSI_DDIG_EN_LBN 88 2250 - #define FRF_AZ_RX_ISCSI_DDIG_EN_WIDTH 1 2251 - #define FRF_AZ_RX_ISCSI_HDIG_EN_LBN 87 2252 - #define FRF_AZ_RX_ISCSI_HDIG_EN_WIDTH 1 2253 - #define FRF_AZ_RX_DESC_PREF_ACT_LBN 86 2254 - #define FRF_AZ_RX_DESC_PREF_ACT_WIDTH 1 2255 - #define FRF_AZ_RX_DC_HW_RPTR_LBN 80 2256 - #define FRF_AZ_RX_DC_HW_RPTR_WIDTH 6 2257 - #define FRF_AZ_RX_DESCQ_HW_RPTR_LBN 68 2258 - #define FRF_AZ_RX_DESCQ_HW_RPTR_WIDTH 12 2259 - #define FRF_AZ_RX_DESCQ_SW_WPTR_LBN 56 2260 - #define FRF_AZ_RX_DESCQ_SW_WPTR_WIDTH 12 2261 - #define FRF_AZ_RX_DESCQ_BUF_BASE_ID_LBN 36 2262 - #define FRF_AZ_RX_DESCQ_BUF_BASE_ID_WIDTH 20 2263 - #define FRF_AZ_RX_DESCQ_EVQ_ID_LBN 24 2264 - #define FRF_AZ_RX_DESCQ_EVQ_ID_WIDTH 12 2265 - #define FRF_AZ_RX_DESCQ_OWNER_ID_LBN 10 2266 - #define FRF_AZ_RX_DESCQ_OWNER_ID_WIDTH 14 2267 - #define FRF_AZ_RX_DESCQ_LABEL_LBN 5 2268 - #define FRF_AZ_RX_DESCQ_LABEL_WIDTH 5 2269 - #define FRF_AZ_RX_DESCQ_SIZE_LBN 3 2270 - #define FRF_AZ_RX_DESCQ_SIZE_WIDTH 2 2271 - #define FFE_AZ_RX_DESCQ_SIZE_4K 3 2272 - #define FFE_AZ_RX_DESCQ_SIZE_2K 2 2273 - #define FFE_AZ_RX_DESCQ_SIZE_1K 1 2274 - #define FFE_AZ_RX_DESCQ_SIZE_512 0 2275 - #define FRF_AZ_RX_DESCQ_TYPE_LBN 2 2276 - #define FRF_AZ_RX_DESCQ_TYPE_WIDTH 1 2277 - #define FRF_AZ_RX_DESCQ_JUMBO_LBN 1 2278 - #define FRF_AZ_RX_DESCQ_JUMBO_WIDTH 1 2279 - #define FRF_AZ_RX_DESCQ_EN_LBN 0 2280 - #define FRF_AZ_RX_DESCQ_EN_WIDTH 1 2281 - 2282 - /* TX_DESC_PTR_TBL_KER: Transmit descriptor pointer */ 2283 - #define FR_AA_TX_DESC_PTR_TBL_KER 0x00011900 2284 - #define FR_AA_TX_DESC_PTR_TBL_KER_STEP 16 2285 - #define FR_AA_TX_DESC_PTR_TBL_KER_ROWS 8 2286 - /* TX_DESC_PTR_TBL: Transmit descriptor pointer */ 2287 - #define FR_BZ_TX_DESC_PTR_TBL 0x00f50000 2288 - #define FR_BZ_TX_DESC_PTR_TBL_STEP 16 2289 - #define FR_BB_TX_DESC_PTR_TBL_ROWS 4096 2290 - #define FR_CZ_TX_DESC_PTR_TBL_ROWS 1024 2291 - #define FRF_CZ_TX_DPT_Q_MASK_WIDTH_LBN 94 2292 - #define FRF_CZ_TX_DPT_Q_MASK_WIDTH_WIDTH 2 2293 - #define FRF_CZ_TX_DPT_ETH_FILT_EN_LBN 93 2294 - #define FRF_CZ_TX_DPT_ETH_FILT_EN_WIDTH 1 2295 - #define FRF_CZ_TX_DPT_IP_FILT_EN_LBN 92 2296 - #define FRF_CZ_TX_DPT_IP_FILT_EN_WIDTH 1 2297 - #define FRF_BZ_TX_NON_IP_DROP_DIS_LBN 91 2298 - #define FRF_BZ_TX_NON_IP_DROP_DIS_WIDTH 1 2299 - #define FRF_BZ_TX_IP_CHKSM_DIS_LBN 90 2300 - #define FRF_BZ_TX_IP_CHKSM_DIS_WIDTH 1 2301 - #define FRF_BZ_TX_TCP_CHKSM_DIS_LBN 89 2302 - #define FRF_BZ_TX_TCP_CHKSM_DIS_WIDTH 1 2303 - #define FRF_AZ_TX_DESCQ_EN_LBN 88 2304 - #define FRF_AZ_TX_DESCQ_EN_WIDTH 1 2305 - #define FRF_AZ_TX_ISCSI_DDIG_EN_LBN 87 2306 - #define FRF_AZ_TX_ISCSI_DDIG_EN_WIDTH 1 2307 - #define FRF_AZ_TX_ISCSI_HDIG_EN_LBN 86 2308 - #define FRF_AZ_TX_ISCSI_HDIG_EN_WIDTH 1 2309 - #define FRF_AZ_TX_DC_HW_RPTR_LBN 80 2310 - #define FRF_AZ_TX_DC_HW_RPTR_WIDTH 6 2311 - #define FRF_AZ_TX_DESCQ_HW_RPTR_LBN 68 2312 - #define FRF_AZ_TX_DESCQ_HW_RPTR_WIDTH 12 2313 - #define FRF_AZ_TX_DESCQ_SW_WPTR_LBN 56 2314 - #define FRF_AZ_TX_DESCQ_SW_WPTR_WIDTH 12 2315 - #define FRF_AZ_TX_DESCQ_BUF_BASE_ID_LBN 36 2316 - #define FRF_AZ_TX_DESCQ_BUF_BASE_ID_WIDTH 20 2317 - #define FRF_AZ_TX_DESCQ_EVQ_ID_LBN 24 2318 - #define FRF_AZ_TX_DESCQ_EVQ_ID_WIDTH 12 2319 - #define FRF_AZ_TX_DESCQ_OWNER_ID_LBN 10 2320 - #define FRF_AZ_TX_DESCQ_OWNER_ID_WIDTH 14 2321 - #define FRF_AZ_TX_DESCQ_LABEL_LBN 5 2322 - #define FRF_AZ_TX_DESCQ_LABEL_WIDTH 5 2323 - #define FRF_AZ_TX_DESCQ_SIZE_LBN 3 2324 - #define FRF_AZ_TX_DESCQ_SIZE_WIDTH 2 2325 - #define FFE_AZ_TX_DESCQ_SIZE_4K 3 2326 - #define FFE_AZ_TX_DESCQ_SIZE_2K 2 2327 - #define FFE_AZ_TX_DESCQ_SIZE_1K 1 2328 - #define FFE_AZ_TX_DESCQ_SIZE_512 0 2329 - #define FRF_AZ_TX_DESCQ_TYPE_LBN 1 2330 - #define FRF_AZ_TX_DESCQ_TYPE_WIDTH 2 2331 - #define FRF_AZ_TX_DESCQ_FLUSH_LBN 0 2332 - #define FRF_AZ_TX_DESCQ_FLUSH_WIDTH 1 2333 - 2334 - /* EVQ_PTR_TBL_KER: Event queue pointer table */ 2335 - #define FR_AA_EVQ_PTR_TBL_KER 0x00011a00 2336 - #define FR_AA_EVQ_PTR_TBL_KER_STEP 16 2337 - #define FR_AA_EVQ_PTR_TBL_KER_ROWS 4 2338 - /* EVQ_PTR_TBL: Event queue pointer table */ 2339 - #define FR_BZ_EVQ_PTR_TBL 0x00f60000 2340 - #define FR_BZ_EVQ_PTR_TBL_STEP 16 2341 - #define FR_CZ_EVQ_PTR_TBL_ROWS 1024 2342 - #define FR_BB_EVQ_PTR_TBL_ROWS 4096 2343 - #define FRF_BZ_EVQ_RPTR_IGN_LBN 40 2344 - #define FRF_BZ_EVQ_RPTR_IGN_WIDTH 1 2345 - #define FRF_AB_EVQ_WKUP_OR_INT_EN_LBN 39 2346 - #define FRF_AB_EVQ_WKUP_OR_INT_EN_WIDTH 1 2347 - #define FRF_CZ_EVQ_DOS_PROTECT_EN_LBN 39 2348 - #define FRF_CZ_EVQ_DOS_PROTECT_EN_WIDTH 1 2349 - #define FRF_AZ_EVQ_NXT_WPTR_LBN 24 2350 - #define FRF_AZ_EVQ_NXT_WPTR_WIDTH 15 2351 - #define FRF_AZ_EVQ_EN_LBN 23 2352 - #define FRF_AZ_EVQ_EN_WIDTH 1 2353 - #define FRF_AZ_EVQ_SIZE_LBN 20 2354 - #define FRF_AZ_EVQ_SIZE_WIDTH 3 2355 - #define FFE_AZ_EVQ_SIZE_32K 6 2356 - #define FFE_AZ_EVQ_SIZE_16K 5 2357 - #define FFE_AZ_EVQ_SIZE_8K 4 2358 - #define FFE_AZ_EVQ_SIZE_4K 3 2359 - #define FFE_AZ_EVQ_SIZE_2K 2 2360 - #define FFE_AZ_EVQ_SIZE_1K 1 2361 - #define FFE_AZ_EVQ_SIZE_512 0 2362 - #define FRF_AZ_EVQ_BUF_BASE_ID_LBN 0 2363 - #define FRF_AZ_EVQ_BUF_BASE_ID_WIDTH 20 2364 - 2365 - /* BUF_HALF_TBL_KER: Buffer table in half buffer table mode direct access by driver */ 2366 - #define FR_AA_BUF_HALF_TBL_KER 0x00018000 2367 - #define FR_AA_BUF_HALF_TBL_KER_STEP 8 2368 - #define FR_AA_BUF_HALF_TBL_KER_ROWS 4096 2369 - /* BUF_HALF_TBL: Buffer table in half buffer table mode direct access by driver */ 2370 - #define FR_BZ_BUF_HALF_TBL 0x00800000 2371 - #define FR_BZ_BUF_HALF_TBL_STEP 8 2372 - #define FR_CZ_BUF_HALF_TBL_ROWS 147456 2373 - #define FR_BB_BUF_HALF_TBL_ROWS 524288 2374 - #define FRF_AZ_BUF_ADR_HBUF_ODD_LBN 44 2375 - #define FRF_AZ_BUF_ADR_HBUF_ODD_WIDTH 20 2376 - #define FRF_AZ_BUF_OWNER_ID_HBUF_ODD_LBN 32 2377 - #define FRF_AZ_BUF_OWNER_ID_HBUF_ODD_WIDTH 12 2378 - #define FRF_AZ_BUF_ADR_HBUF_EVEN_LBN 12 2379 - #define FRF_AZ_BUF_ADR_HBUF_EVEN_WIDTH 20 2380 - #define FRF_AZ_BUF_OWNER_ID_HBUF_EVEN_LBN 0 2381 - #define FRF_AZ_BUF_OWNER_ID_HBUF_EVEN_WIDTH 12 2382 - 2383 - /* BUF_FULL_TBL_KER: Buffer table in full buffer table mode direct access by driver */ 2384 - #define FR_AA_BUF_FULL_TBL_KER 0x00018000 2385 - #define FR_AA_BUF_FULL_TBL_KER_STEP 8 2386 - #define FR_AA_BUF_FULL_TBL_KER_ROWS 4096 2387 - /* BUF_FULL_TBL: Buffer table in full buffer table mode direct access by driver */ 2388 - #define FR_BZ_BUF_FULL_TBL 0x00800000 2389 - #define FR_BZ_BUF_FULL_TBL_STEP 8 2390 - #define FR_CZ_BUF_FULL_TBL_ROWS 147456 2391 - #define FR_BB_BUF_FULL_TBL_ROWS 917504 2392 - #define FRF_AZ_BUF_FULL_UNUSED_LBN 51 2393 - #define FRF_AZ_BUF_FULL_UNUSED_WIDTH 13 2394 - #define FRF_AZ_IP_DAT_BUF_SIZE_LBN 50 2395 - #define FRF_AZ_IP_DAT_BUF_SIZE_WIDTH 1 2396 - #define FRF_AZ_BUF_ADR_REGION_LBN 48 2397 - #define FRF_AZ_BUF_ADR_REGION_WIDTH 2 2398 - #define FFE_AZ_BUF_ADR_REGN3 3 2399 - #define FFE_AZ_BUF_ADR_REGN2 2 2400 - #define FFE_AZ_BUF_ADR_REGN1 1 2401 - #define FFE_AZ_BUF_ADR_REGN0 0 2402 - #define FRF_AZ_BUF_ADR_FBUF_LBN 14 2403 - #define FRF_AZ_BUF_ADR_FBUF_WIDTH 34 2404 - #define FRF_AZ_BUF_OWNER_ID_FBUF_LBN 0 2405 - #define FRF_AZ_BUF_OWNER_ID_FBUF_WIDTH 14 2406 - 2407 - /* RX_FILTER_TBL0: TCP/IPv4 Receive filter table */ 2408 - #define FR_BZ_RX_FILTER_TBL0 0x00f00000 2409 - #define FR_BZ_RX_FILTER_TBL0_STEP 32 2410 - #define FR_BZ_RX_FILTER_TBL0_ROWS 8192 2411 - /* RX_FILTER_TBL1: TCP/IPv4 Receive filter table */ 2412 - #define FR_BB_RX_FILTER_TBL1 0x00f00010 2413 - #define FR_BB_RX_FILTER_TBL1_STEP 32 2414 - #define FR_BB_RX_FILTER_TBL1_ROWS 8192 2415 - #define FRF_BZ_RSS_EN_LBN 110 2416 - #define FRF_BZ_RSS_EN_WIDTH 1 2417 - #define FRF_BZ_SCATTER_EN_LBN 109 2418 - #define FRF_BZ_SCATTER_EN_WIDTH 1 2419 - #define FRF_BZ_TCP_UDP_LBN 108 2420 - #define FRF_BZ_TCP_UDP_WIDTH 1 2421 - #define FRF_BZ_RXQ_ID_LBN 96 2422 - #define FRF_BZ_RXQ_ID_WIDTH 12 2423 - #define FRF_BZ_DEST_IP_LBN 64 2424 - #define FRF_BZ_DEST_IP_WIDTH 32 2425 - #define FRF_BZ_DEST_PORT_TCP_LBN 48 2426 - #define FRF_BZ_DEST_PORT_TCP_WIDTH 16 2427 - #define FRF_BZ_SRC_IP_LBN 16 2428 - #define FRF_BZ_SRC_IP_WIDTH 32 2429 - #define FRF_BZ_SRC_TCP_DEST_UDP_LBN 0 2430 - #define FRF_BZ_SRC_TCP_DEST_UDP_WIDTH 16 2431 - 2432 - /* RX_MAC_FILTER_TBL0: Receive Ethernet filter table */ 2433 - #define FR_CZ_RX_MAC_FILTER_TBL0 0x00f00010 2434 - #define FR_CZ_RX_MAC_FILTER_TBL0_STEP 32 2435 - #define FR_CZ_RX_MAC_FILTER_TBL0_ROWS 512 2436 - #define FRF_CZ_RMFT_RSS_EN_LBN 75 2437 - #define FRF_CZ_RMFT_RSS_EN_WIDTH 1 2438 - #define FRF_CZ_RMFT_SCATTER_EN_LBN 74 2439 - #define FRF_CZ_RMFT_SCATTER_EN_WIDTH 1 2440 - #define FRF_CZ_RMFT_IP_OVERRIDE_LBN 73 2441 - #define FRF_CZ_RMFT_IP_OVERRIDE_WIDTH 1 2442 - #define FRF_CZ_RMFT_RXQ_ID_LBN 61 2443 - #define FRF_CZ_RMFT_RXQ_ID_WIDTH 12 2444 - #define FRF_CZ_RMFT_WILDCARD_MATCH_LBN 60 2445 - #define FRF_CZ_RMFT_WILDCARD_MATCH_WIDTH 1 2446 - #define FRF_CZ_RMFT_DEST_MAC_LBN 12 2447 - #define FRF_CZ_RMFT_DEST_MAC_WIDTH 48 2448 - #define FRF_CZ_RMFT_VLAN_ID_LBN 0 2449 - #define FRF_CZ_RMFT_VLAN_ID_WIDTH 12 2450 - 2451 - /* TIMER_TBL: Timer table */ 2452 - #define FR_BZ_TIMER_TBL 0x00f70000 2453 - #define FR_BZ_TIMER_TBL_STEP 16 2454 - #define FR_CZ_TIMER_TBL_ROWS 1024 2455 - #define FR_BB_TIMER_TBL_ROWS 4096 2456 - #define FRF_CZ_TIMER_Q_EN_LBN 33 2457 - #define FRF_CZ_TIMER_Q_EN_WIDTH 1 2458 - #define FRF_CZ_INT_ARMD_LBN 32 2459 - #define FRF_CZ_INT_ARMD_WIDTH 1 2460 - #define FRF_CZ_INT_PEND_LBN 31 2461 - #define FRF_CZ_INT_PEND_WIDTH 1 2462 - #define FRF_CZ_HOST_NOTIFY_MODE_LBN 30 2463 - #define FRF_CZ_HOST_NOTIFY_MODE_WIDTH 1 2464 - #define FRF_CZ_RELOAD_TIMER_VAL_LBN 16 2465 - #define FRF_CZ_RELOAD_TIMER_VAL_WIDTH 14 2466 - #define FRF_CZ_TIMER_MODE_LBN 14 2467 - #define FRF_CZ_TIMER_MODE_WIDTH 2 2468 - #define FFE_CZ_TIMER_MODE_INT_HLDOFF 3 2469 - #define FFE_CZ_TIMER_MODE_TRIG_START 2 2470 - #define FFE_CZ_TIMER_MODE_IMMED_START 1 2471 - #define FFE_CZ_TIMER_MODE_DIS 0 2472 - #define FRF_BB_TIMER_MODE_LBN 12 2473 - #define FRF_BB_TIMER_MODE_WIDTH 2 2474 - #define FFE_BB_TIMER_MODE_INT_HLDOFF 2 2475 - #define FFE_BB_TIMER_MODE_TRIG_START 2 2476 - #define FFE_BB_TIMER_MODE_IMMED_START 1 2477 - #define FFE_BB_TIMER_MODE_DIS 0 2478 - #define FRF_CZ_TIMER_VAL_LBN 0 2479 - #define FRF_CZ_TIMER_VAL_WIDTH 14 2480 - #define FRF_BB_TIMER_VAL_LBN 0 2481 - #define FRF_BB_TIMER_VAL_WIDTH 12 2482 - 2483 - /* TX_PACE_TBL: Transmit pacing table */ 2484 - #define FR_BZ_TX_PACE_TBL 0x00f80000 2485 - #define FR_BZ_TX_PACE_TBL_STEP 16 2486 - #define FR_CZ_TX_PACE_TBL_ROWS 1024 2487 - #define FR_BB_TX_PACE_TBL_ROWS 4096 2488 - #define FRF_BZ_TX_PACE_LBN 0 2489 - #define FRF_BZ_TX_PACE_WIDTH 5 2490 - 2491 - /* RX_INDIRECTION_TBL: RX Indirection Table */ 2492 - #define FR_BZ_RX_INDIRECTION_TBL 0x00fb0000 2493 - #define FR_BZ_RX_INDIRECTION_TBL_STEP 16 2494 - #define FR_BZ_RX_INDIRECTION_TBL_ROWS 128 2495 - #define FRF_BZ_IT_QUEUE_LBN 0 2496 - #define FRF_BZ_IT_QUEUE_WIDTH 6 2497 - 2498 - /* TX_FILTER_TBL0: TCP/IPv4 Transmit filter table */ 2499 - #define FR_CZ_TX_FILTER_TBL0 0x00fc0000 2500 - #define FR_CZ_TX_FILTER_TBL0_STEP 16 2501 - #define FR_CZ_TX_FILTER_TBL0_ROWS 8192 2502 - #define FRF_CZ_TIFT_TCP_UDP_LBN 108 2503 - #define FRF_CZ_TIFT_TCP_UDP_WIDTH 1 2504 - #define FRF_CZ_TIFT_TXQ_ID_LBN 96 2505 - #define FRF_CZ_TIFT_TXQ_ID_WIDTH 12 2506 - #define FRF_CZ_TIFT_DEST_IP_LBN 64 2507 - #define FRF_CZ_TIFT_DEST_IP_WIDTH 32 2508 - #define FRF_CZ_TIFT_DEST_PORT_TCP_LBN 48 2509 - #define FRF_CZ_TIFT_DEST_PORT_TCP_WIDTH 16 2510 - #define FRF_CZ_TIFT_SRC_IP_LBN 16 2511 - #define FRF_CZ_TIFT_SRC_IP_WIDTH 32 2512 - #define FRF_CZ_TIFT_SRC_TCP_DEST_UDP_LBN 0 2513 - #define FRF_CZ_TIFT_SRC_TCP_DEST_UDP_WIDTH 16 2514 - 2515 - /* TX_MAC_FILTER_TBL0: Transmit Ethernet filter table */ 2516 - #define FR_CZ_TX_MAC_FILTER_TBL0 0x00fe0000 2517 - #define FR_CZ_TX_MAC_FILTER_TBL0_STEP 16 2518 - #define FR_CZ_TX_MAC_FILTER_TBL0_ROWS 512 2519 - #define FRF_CZ_TMFT_TXQ_ID_LBN 61 2520 - #define FRF_CZ_TMFT_TXQ_ID_WIDTH 12 2521 - #define FRF_CZ_TMFT_WILDCARD_MATCH_LBN 60 2522 - #define FRF_CZ_TMFT_WILDCARD_MATCH_WIDTH 1 2523 - #define FRF_CZ_TMFT_SRC_MAC_LBN 12 2524 - #define FRF_CZ_TMFT_SRC_MAC_WIDTH 48 2525 - #define FRF_CZ_TMFT_VLAN_ID_LBN 0 2526 - #define FRF_CZ_TMFT_VLAN_ID_WIDTH 12 2527 - 2528 - /* MC_TREG_SMEM: MC Shared Memory */ 2529 - #define FR_CZ_MC_TREG_SMEM 0x00ff0000 2530 - #define FR_CZ_MC_TREG_SMEM_STEP 4 2531 - #define FR_CZ_MC_TREG_SMEM_ROWS 512 2532 - #define FRF_CZ_MC_TREG_SMEM_ROW_LBN 0 2533 - #define FRF_CZ_MC_TREG_SMEM_ROW_WIDTH 32 2534 - 2535 - /* MSIX_VECTOR_TABLE: MSIX Vector Table */ 2536 - #define FR_BB_MSIX_VECTOR_TABLE 0x00ff0000 2537 - #define FR_BZ_MSIX_VECTOR_TABLE_STEP 16 2538 - #define FR_BB_MSIX_VECTOR_TABLE_ROWS 64 2539 - /* MSIX_VECTOR_TABLE: MSIX Vector Table */ 2540 - #define FR_CZ_MSIX_VECTOR_TABLE 0x00000000 2541 - /* FR_BZ_MSIX_VECTOR_TABLE_STEP 16 */ 2542 - #define FR_CZ_MSIX_VECTOR_TABLE_ROWS 1024 2543 - #define FRF_BZ_MSIX_VECTOR_RESERVED_LBN 97 2544 - #define FRF_BZ_MSIX_VECTOR_RESERVED_WIDTH 31 2545 - #define FRF_BZ_MSIX_VECTOR_MASK_LBN 96 2546 - #define FRF_BZ_MSIX_VECTOR_MASK_WIDTH 1 2547 - #define FRF_BZ_MSIX_MESSAGE_DATA_LBN 64 2548 - #define FRF_BZ_MSIX_MESSAGE_DATA_WIDTH 32 2549 - #define FRF_BZ_MSIX_MESSAGE_ADDRESS_HI_LBN 32 2550 - #define FRF_BZ_MSIX_MESSAGE_ADDRESS_HI_WIDTH 32 2551 - #define FRF_BZ_MSIX_MESSAGE_ADDRESS_LO_LBN 0 2552 - #define FRF_BZ_MSIX_MESSAGE_ADDRESS_LO_WIDTH 32 2553 - 2554 - /* MSIX_PBA_TABLE: MSIX Pending Bit Array */ 2555 - #define FR_BB_MSIX_PBA_TABLE 0x00ff2000 2556 - #define FR_BZ_MSIX_PBA_TABLE_STEP 4 2557 - #define FR_BB_MSIX_PBA_TABLE_ROWS 2 2558 - /* MSIX_PBA_TABLE: MSIX Pending Bit Array */ 2559 - #define FR_CZ_MSIX_PBA_TABLE 0x00008000 2560 - /* FR_BZ_MSIX_PBA_TABLE_STEP 4 */ 2561 - #define FR_CZ_MSIX_PBA_TABLE_ROWS 32 2562 - #define FRF_BZ_MSIX_PBA_PEND_DWORD_LBN 0 2563 - #define FRF_BZ_MSIX_PBA_PEND_DWORD_WIDTH 32 2564 - 2565 - /* SRM_DBG_REG: SRAM debug access */ 2566 - #define FR_BZ_SRM_DBG 0x03000000 2567 - #define FR_BZ_SRM_DBG_STEP 8 2568 - #define FR_CZ_SRM_DBG_ROWS 262144 2569 - #define FR_BB_SRM_DBG_ROWS 2097152 2570 - #define FRF_BZ_SRM_DBG_LBN 0 2571 - #define FRF_BZ_SRM_DBG_WIDTH 64 2572 - 2573 - /* TB_MSIX_PBA_TABLE: MSIX Pending Bit Array */ 2574 - #define FR_CZ_TB_MSIX_PBA_TABLE 0x00008000 2575 - #define FR_CZ_TB_MSIX_PBA_TABLE_STEP 4 2576 - #define FR_CZ_TB_MSIX_PBA_TABLE_ROWS 1024 2577 - #define FRF_CZ_TB_MSIX_PBA_PEND_DWORD_LBN 0 2578 - #define FRF_CZ_TB_MSIX_PBA_PEND_DWORD_WIDTH 32 2579 - 2580 - /* DRIVER_EV */ 2581 - #define FSF_AZ_DRIVER_EV_SUBCODE_LBN 56 2582 - #define FSF_AZ_DRIVER_EV_SUBCODE_WIDTH 4 2583 - #define FSE_BZ_TX_DSC_ERROR_EV 15 2584 - #define FSE_BZ_RX_DSC_ERROR_EV 14 2585 - #define FSE_AA_RX_RECOVER_EV 11 2586 - #define FSE_AZ_TIMER_EV 10 2587 - #define FSE_AZ_TX_PKT_NON_TCP_UDP 9 2588 - #define FSE_AZ_WAKE_UP_EV 6 2589 - #define FSE_AZ_SRM_UPD_DONE_EV 5 2590 - #define FSE_AB_EVQ_NOT_EN_EV 3 2591 - #define FSE_AZ_EVQ_INIT_DONE_EV 2 2592 - #define FSE_AZ_RX_DESCQ_FLS_DONE_EV 1 2593 - #define FSE_AZ_TX_DESCQ_FLS_DONE_EV 0 2594 - #define FSF_AZ_DRIVER_EV_SUBDATA_LBN 0 2595 - #define FSF_AZ_DRIVER_EV_SUBDATA_WIDTH 14 2596 - 2597 - /* EVENT_ENTRY */ 2598 - #define FSF_AZ_EV_CODE_LBN 60 2599 - #define FSF_AZ_EV_CODE_WIDTH 4 2600 - #define FSE_CZ_EV_CODE_MCDI_EV 12 2601 - #define FSE_CZ_EV_CODE_USER_EV 8 2602 - #define FSE_AZ_EV_CODE_DRV_GEN_EV 7 2603 - #define FSE_AZ_EV_CODE_GLOBAL_EV 6 2604 - #define FSE_AZ_EV_CODE_DRIVER_EV 5 2605 - #define FSE_AZ_EV_CODE_TX_EV 2 2606 - #define FSE_AZ_EV_CODE_RX_EV 0 2607 - #define FSF_AZ_EV_DATA_LBN 0 2608 - #define FSF_AZ_EV_DATA_WIDTH 60 2609 - 2610 - /* GLOBAL_EV */ 2611 - #define FSF_BB_GLB_EV_RX_RECOVERY_LBN 12 2612 - #define FSF_BB_GLB_EV_RX_RECOVERY_WIDTH 1 2613 - #define FSF_AA_GLB_EV_RX_RECOVERY_LBN 11 2614 - #define FSF_AA_GLB_EV_RX_RECOVERY_WIDTH 1 2615 - #define FSF_BB_GLB_EV_XG_MGT_INTR_LBN 11 2616 - #define FSF_BB_GLB_EV_XG_MGT_INTR_WIDTH 1 2617 - #define FSF_AB_GLB_EV_XFP_PHY0_INTR_LBN 10 2618 - #define FSF_AB_GLB_EV_XFP_PHY0_INTR_WIDTH 1 2619 - #define FSF_AB_GLB_EV_XG_PHY0_INTR_LBN 9 2620 - #define FSF_AB_GLB_EV_XG_PHY0_INTR_WIDTH 1 2621 - #define FSF_AB_GLB_EV_G_PHY0_INTR_LBN 7 2622 - #define FSF_AB_GLB_EV_G_PHY0_INTR_WIDTH 1 2623 - 2624 - /* LEGACY_INT_VEC */ 2625 - #define FSF_AZ_NET_IVEC_FATAL_INT_LBN 64 2626 - #define FSF_AZ_NET_IVEC_FATAL_INT_WIDTH 1 2627 - #define FSF_AZ_NET_IVEC_INT_Q_LBN 40 2628 - #define FSF_AZ_NET_IVEC_INT_Q_WIDTH 4 2629 - #define FSF_AZ_NET_IVEC_INT_FLAG_LBN 32 2630 - #define FSF_AZ_NET_IVEC_INT_FLAG_WIDTH 1 2631 - #define FSF_AZ_NET_IVEC_EVQ_FIFO_HF_LBN 1 2632 - #define FSF_AZ_NET_IVEC_EVQ_FIFO_HF_WIDTH 1 2633 - #define FSF_AZ_NET_IVEC_EVQ_FIFO_AF_LBN 0 2634 - #define FSF_AZ_NET_IVEC_EVQ_FIFO_AF_WIDTH 1 2635 - 2636 - /* MC_XGMAC_FLTR_RULE_DEF */ 2637 - #define FSF_CZ_MC_XFRC_MODE_LBN 416 2638 - #define FSF_CZ_MC_XFRC_MODE_WIDTH 1 2639 - #define FSE_CZ_MC_XFRC_MODE_LAYERED 1 2640 - #define FSE_CZ_MC_XFRC_MODE_SIMPLE 0 2641 - #define FSF_CZ_MC_XFRC_HASH_LBN 384 2642 - #define FSF_CZ_MC_XFRC_HASH_WIDTH 32 2643 - #define FSF_CZ_MC_XFRC_LAYER4_BYTE_MASK_LBN 256 2644 - #define FSF_CZ_MC_XFRC_LAYER4_BYTE_MASK_WIDTH 128 2645 - #define FSF_CZ_MC_XFRC_LAYER3_BYTE_MASK_LBN 128 2646 - #define FSF_CZ_MC_XFRC_LAYER3_BYTE_MASK_WIDTH 128 2647 - #define FSF_CZ_MC_XFRC_LAYER2_OR_SIMPLE_BYTE_MASK_LBN 0 2648 - #define FSF_CZ_MC_XFRC_LAYER2_OR_SIMPLE_BYTE_MASK_WIDTH 128 2649 - 2650 - /* RX_EV */ 2651 - #define FSF_CZ_RX_EV_PKT_NOT_PARSED_LBN 58 2652 - #define FSF_CZ_RX_EV_PKT_NOT_PARSED_WIDTH 1 2653 - #define FSF_CZ_RX_EV_IPV6_PKT_LBN 57 2654 - #define FSF_CZ_RX_EV_IPV6_PKT_WIDTH 1 2655 - #define FSF_AZ_RX_EV_PKT_OK_LBN 56 2656 - #define FSF_AZ_RX_EV_PKT_OK_WIDTH 1 2657 - #define FSF_AZ_RX_EV_PAUSE_FRM_ERR_LBN 55 2658 - #define FSF_AZ_RX_EV_PAUSE_FRM_ERR_WIDTH 1 2659 - #define FSF_AZ_RX_EV_BUF_OWNER_ID_ERR_LBN 54 2660 - #define FSF_AZ_RX_EV_BUF_OWNER_ID_ERR_WIDTH 1 2661 - #define FSF_AZ_RX_EV_IP_FRAG_ERR_LBN 53 2662 - #define FSF_AZ_RX_EV_IP_FRAG_ERR_WIDTH 1 2663 - #define FSF_AZ_RX_EV_IP_HDR_CHKSUM_ERR_LBN 52 2664 - #define FSF_AZ_RX_EV_IP_HDR_CHKSUM_ERR_WIDTH 1 2665 - #define FSF_AZ_RX_EV_TCP_UDP_CHKSUM_ERR_LBN 51 2666 - #define FSF_AZ_RX_EV_TCP_UDP_CHKSUM_ERR_WIDTH 1 2667 - #define FSF_AZ_RX_EV_ETH_CRC_ERR_LBN 50 2668 - #define FSF_AZ_RX_EV_ETH_CRC_ERR_WIDTH 1 2669 - #define FSF_AZ_RX_EV_FRM_TRUNC_LBN 49 2670 - #define FSF_AZ_RX_EV_FRM_TRUNC_WIDTH 1 2671 - #define FSF_AA_RX_EV_DRIB_NIB_LBN 49 2672 - #define FSF_AA_RX_EV_DRIB_NIB_WIDTH 1 2673 - #define FSF_AZ_RX_EV_TOBE_DISC_LBN 47 2674 - #define FSF_AZ_RX_EV_TOBE_DISC_WIDTH 1 2675 - #define FSF_AZ_RX_EV_PKT_TYPE_LBN 44 2676 - #define FSF_AZ_RX_EV_PKT_TYPE_WIDTH 3 2677 - #define FSE_AZ_RX_EV_PKT_TYPE_VLAN_JUMBO 5 2678 - #define FSE_AZ_RX_EV_PKT_TYPE_VLAN_LLC 4 2679 - #define FSE_AZ_RX_EV_PKT_TYPE_VLAN 3 2680 - #define FSE_AZ_RX_EV_PKT_TYPE_JUMBO 2 2681 - #define FSE_AZ_RX_EV_PKT_TYPE_LLC 1 2682 - #define FSE_AZ_RX_EV_PKT_TYPE_ETH 0 2683 - #define FSF_AZ_RX_EV_HDR_TYPE_LBN 42 2684 - #define FSF_AZ_RX_EV_HDR_TYPE_WIDTH 2 2685 - #define FSE_AZ_RX_EV_HDR_TYPE_OTHER 3 2686 - #define FSE_AB_RX_EV_HDR_TYPE_IPV4_OTHER 2 2687 - #define FSE_CZ_RX_EV_HDR_TYPE_IPV4V6_OTHER 2 2688 - #define FSE_AB_RX_EV_HDR_TYPE_IPV4_UDP 1 2689 - #define FSE_CZ_RX_EV_HDR_TYPE_IPV4V6_UDP 1 2690 - #define FSE_AB_RX_EV_HDR_TYPE_IPV4_TCP 0 2691 - #define FSE_CZ_RX_EV_HDR_TYPE_IPV4V6_TCP 0 2692 - #define FSF_AZ_RX_EV_DESC_Q_EMPTY_LBN 41 2693 - #define FSF_AZ_RX_EV_DESC_Q_EMPTY_WIDTH 1 2694 - #define FSF_AZ_RX_EV_MCAST_HASH_MATCH_LBN 40 2695 - #define FSF_AZ_RX_EV_MCAST_HASH_MATCH_WIDTH 1 2696 - #define FSF_AZ_RX_EV_MCAST_PKT_LBN 39 2697 - #define FSF_AZ_RX_EV_MCAST_PKT_WIDTH 1 2698 - #define FSF_AA_RX_EV_RECOVERY_FLAG_LBN 37 2699 - #define FSF_AA_RX_EV_RECOVERY_FLAG_WIDTH 1 2700 - #define FSF_AZ_RX_EV_Q_LABEL_LBN 32 2701 - #define FSF_AZ_RX_EV_Q_LABEL_WIDTH 5 2702 - #define FSF_AZ_RX_EV_JUMBO_CONT_LBN 31 2703 - #define FSF_AZ_RX_EV_JUMBO_CONT_WIDTH 1 2704 - #define FSF_AZ_RX_EV_PORT_LBN 30 2705 - #define FSF_AZ_RX_EV_PORT_WIDTH 1 2706 - #define FSF_AZ_RX_EV_BYTE_CNT_LBN 16 2707 - #define FSF_AZ_RX_EV_BYTE_CNT_WIDTH 14 2708 - #define FSF_AZ_RX_EV_SOP_LBN 15 2709 - #define FSF_AZ_RX_EV_SOP_WIDTH 1 2710 - #define FSF_AZ_RX_EV_ISCSI_PKT_OK_LBN 14 2711 - #define FSF_AZ_RX_EV_ISCSI_PKT_OK_WIDTH 1 2712 - #define FSF_AZ_RX_EV_ISCSI_DDIG_ERR_LBN 13 2713 - #define FSF_AZ_RX_EV_ISCSI_DDIG_ERR_WIDTH 1 2714 - #define FSF_AZ_RX_EV_ISCSI_HDIG_ERR_LBN 12 2715 - #define FSF_AZ_RX_EV_ISCSI_HDIG_ERR_WIDTH 1 2716 - #define FSF_AZ_RX_EV_DESC_PTR_LBN 0 2717 - #define FSF_AZ_RX_EV_DESC_PTR_WIDTH 12 2718 - 2719 - /* RX_KER_DESC */ 2720 - #define FSF_AZ_RX_KER_BUF_SIZE_LBN 48 2721 - #define FSF_AZ_RX_KER_BUF_SIZE_WIDTH 14 2722 - #define FSF_AZ_RX_KER_BUF_REGION_LBN 46 2723 - #define FSF_AZ_RX_KER_BUF_REGION_WIDTH 2 2724 - #define FSF_AZ_RX_KER_BUF_ADDR_LBN 0 2725 - #define FSF_AZ_RX_KER_BUF_ADDR_WIDTH 46 2726 - 2727 - /* RX_USER_DESC */ 2728 - #define FSF_AZ_RX_USER_2BYTE_OFFSET_LBN 20 2729 - #define FSF_AZ_RX_USER_2BYTE_OFFSET_WIDTH 12 2730 - #define FSF_AZ_RX_USER_BUF_ID_LBN 0 2731 - #define FSF_AZ_RX_USER_BUF_ID_WIDTH 20 2732 - 2733 - /* TX_EV */ 2734 - #define FSF_AZ_TX_EV_PKT_ERR_LBN 38 2735 - #define FSF_AZ_TX_EV_PKT_ERR_WIDTH 1 2736 - #define FSF_AZ_TX_EV_PKT_TOO_BIG_LBN 37 2737 - #define FSF_AZ_TX_EV_PKT_TOO_BIG_WIDTH 1 2738 - #define FSF_AZ_TX_EV_Q_LABEL_LBN 32 2739 - #define FSF_AZ_TX_EV_Q_LABEL_WIDTH 5 2740 - #define FSF_AZ_TX_EV_PORT_LBN 16 2741 - #define FSF_AZ_TX_EV_PORT_WIDTH 1 2742 - #define FSF_AZ_TX_EV_WQ_FF_FULL_LBN 15 2743 - #define FSF_AZ_TX_EV_WQ_FF_FULL_WIDTH 1 2744 - #define FSF_AZ_TX_EV_BUF_OWNER_ID_ERR_LBN 14 2745 - #define FSF_AZ_TX_EV_BUF_OWNER_ID_ERR_WIDTH 1 2746 - #define FSF_AZ_TX_EV_COMP_LBN 12 2747 - #define FSF_AZ_TX_EV_COMP_WIDTH 1 2748 - #define FSF_AZ_TX_EV_DESC_PTR_LBN 0 2749 - #define FSF_AZ_TX_EV_DESC_PTR_WIDTH 12 2750 - 2751 - /* TX_KER_DESC */ 2752 - #define FSF_AZ_TX_KER_CONT_LBN 62 2753 - #define FSF_AZ_TX_KER_CONT_WIDTH 1 2754 - #define FSF_AZ_TX_KER_BYTE_COUNT_LBN 48 2755 - #define FSF_AZ_TX_KER_BYTE_COUNT_WIDTH 14 2756 - #define FSF_AZ_TX_KER_BUF_REGION_LBN 46 2757 - #define FSF_AZ_TX_KER_BUF_REGION_WIDTH 2 2758 - #define FSF_AZ_TX_KER_BUF_ADDR_LBN 0 2759 - #define FSF_AZ_TX_KER_BUF_ADDR_WIDTH 46 2760 - 2761 - /* TX_USER_DESC */ 2762 - #define FSF_AZ_TX_USER_SW_EV_EN_LBN 48 2763 - #define FSF_AZ_TX_USER_SW_EV_EN_WIDTH 1 2764 - #define FSF_AZ_TX_USER_CONT_LBN 46 2765 - #define FSF_AZ_TX_USER_CONT_WIDTH 1 2766 - #define FSF_AZ_TX_USER_BYTE_CNT_LBN 33 2767 - #define FSF_AZ_TX_USER_BYTE_CNT_WIDTH 13 2768 - #define FSF_AZ_TX_USER_BUF_ID_LBN 13 2769 - #define FSF_AZ_TX_USER_BUF_ID_WIDTH 20 2770 - #define FSF_AZ_TX_USER_BYTE_OFS_LBN 0 2771 - #define FSF_AZ_TX_USER_BYTE_OFS_WIDTH 13 2772 - 2773 - /* USER_EV */ 2774 - #define FSF_CZ_USER_QID_LBN 32 2775 - #define FSF_CZ_USER_QID_WIDTH 10 2776 - #define FSF_CZ_USER_EV_REG_VALUE_LBN 0 2777 - #define FSF_CZ_USER_EV_REG_VALUE_WIDTH 32 2778 - 2779 - /************************************************************************** 2780 - * 2781 - * Falcon B0 PCIe core indirect registers 2782 - * 2783 - ************************************************************************** 2784 - */ 2785 - 2786 - #define FPCR_BB_PCIE_DEVICE_CTRL_STAT 0x68 2787 - 2788 - #define FPCR_BB_PCIE_LINK_CTRL_STAT 0x70 2789 - 2790 - #define FPCR_BB_ACK_RPL_TIMER 0x700 2791 - #define FPCRF_BB_ACK_TL_LBN 0 2792 - #define FPCRF_BB_ACK_TL_WIDTH 16 2793 - #define FPCRF_BB_RPL_TL_LBN 16 2794 - #define FPCRF_BB_RPL_TL_WIDTH 16 2795 - 2796 - #define FPCR_BB_ACK_FREQ 0x70C 2797 - #define FPCRF_BB_ACK_FREQ_LBN 0 2798 - #define FPCRF_BB_ACK_FREQ_WIDTH 7 2799 - 2800 - /************************************************************************** 2801 - * 2802 - * Pseudo-registers and fields 2803 - * 2804 - ************************************************************************** 2805 - */ 2806 - 2807 - /* Interrupt acknowledge work-around register (A0/A1 only) */ 2808 - #define FR_AA_WORK_AROUND_BROKEN_PCI_READS 0x0070 2809 - 2810 - /* EE_SPI_HCMD_REG: SPI host command register */ 2811 - /* Values for the EE_SPI_HCMD_SF_SEL register field */ 2812 - #define FFE_AB_SPI_DEVICE_EEPROM 0 2813 - #define FFE_AB_SPI_DEVICE_FLASH 1 2814 - 2815 - /* NIC_STAT_REG: NIC status register */ 2816 - #define FRF_AB_STRAP_10G_LBN 2 2817 - #define FRF_AB_STRAP_10G_WIDTH 1 2818 - #define FRF_AA_STRAP_PCIE_LBN 0 2819 - #define FRF_AA_STRAP_PCIE_WIDTH 1 2820 - 2821 - /* FATAL_INTR_REG_KER: Fatal interrupt register for Kernel */ 2822 - #define FRF_AZ_FATAL_INTR_LBN 0 2823 - #define FRF_AZ_FATAL_INTR_WIDTH 12 2824 - 2825 - /* SRM_CFG_REG: SRAM configuration register */ 2826 - /* We treat the number of SRAM banks and bank size as a single field */ 2827 - #define FRF_AZ_SRM_NB_SZ_LBN FRF_AZ_SRM_BANK_SIZE_LBN 2828 - #define FRF_AZ_SRM_NB_SZ_WIDTH \ 2829 - (FRF_AZ_SRM_BANK_SIZE_WIDTH + FRF_AZ_SRM_NUM_BANK_WIDTH) 2830 - #define FFE_AB_SRM_NB1_SZ2M 0 2831 - #define FFE_AB_SRM_NB1_SZ4M 1 2832 - #define FFE_AB_SRM_NB1_SZ8M 2 2833 - #define FFE_AB_SRM_NB_SZ_DEF 3 2834 - #define FFE_AB_SRM_NB2_SZ4M 4 2835 - #define FFE_AB_SRM_NB2_SZ8M 5 2836 - #define FFE_AB_SRM_NB2_SZ16M 6 2837 - #define FFE_AB_SRM_NB_SZ_RES 7 2838 - 2839 - /* RX_DESC_UPD_REGP0: Receive descriptor update register. */ 2840 - /* We write just the last dword of these registers */ 2841 - #define FR_AZ_RX_DESC_UPD_DWORD_P0 \ 2842 - (BUILD_BUG_ON_ZERO(FR_AA_RX_DESC_UPD_KER != FR_BZ_RX_DESC_UPD_P0) + \ 2843 - FR_BZ_RX_DESC_UPD_P0 + 3 * 4) 2844 - #define FRF_AZ_RX_DESC_WPTR_DWORD_LBN (FRF_AZ_RX_DESC_WPTR_LBN - 3 * 32) 2845 - #define FRF_AZ_RX_DESC_WPTR_DWORD_WIDTH FRF_AZ_RX_DESC_WPTR_WIDTH 2846 - 2847 - /* TX_DESC_UPD_REGP0: Transmit descriptor update register. */ 2848 - #define FR_AZ_TX_DESC_UPD_DWORD_P0 \ 2849 - (BUILD_BUG_ON_ZERO(FR_AA_TX_DESC_UPD_KER != FR_BZ_TX_DESC_UPD_P0) + \ 2850 - FR_BZ_TX_DESC_UPD_P0 + 3 * 4) 2851 - #define FRF_AZ_TX_DESC_WPTR_DWORD_LBN (FRF_AZ_TX_DESC_WPTR_LBN - 3 * 32) 2852 - #define FRF_AZ_TX_DESC_WPTR_DWORD_WIDTH FRF_AZ_TX_DESC_WPTR_WIDTH 2853 - 2854 - /* GMF_CFG4_REG: GMAC FIFO configuration register 4 */ 2855 - #define FRF_AB_GMF_HSTFLTRFRM_PAUSE_LBN 12 2856 - #define FRF_AB_GMF_HSTFLTRFRM_PAUSE_WIDTH 1 2857 - 2858 - /* GMF_CFG5_REG: GMAC FIFO configuration register 5 */ 2859 - #define FRF_AB_GMF_HSTFLTRFRMDC_PAUSE_LBN 12 2860 - #define FRF_AB_GMF_HSTFLTRFRMDC_PAUSE_WIDTH 1 2861 - 2862 - /* XM_TX_PARAM_REG: XGMAC transmit parameter register */ 2863 - #define FRF_AB_XM_MAX_TX_FRM_SIZE_LBN FRF_AB_XM_MAX_TX_FRM_SIZE_LO_LBN 2864 - #define FRF_AB_XM_MAX_TX_FRM_SIZE_WIDTH (FRF_AB_XM_MAX_TX_FRM_SIZE_HI_WIDTH + \ 2865 - FRF_AB_XM_MAX_TX_FRM_SIZE_LO_WIDTH) 2866 - 2867 - /* XM_RX_PARAM_REG: XGMAC receive parameter register */ 2868 - #define FRF_AB_XM_MAX_RX_FRM_SIZE_LBN FRF_AB_XM_MAX_RX_FRM_SIZE_LO_LBN 2869 - #define FRF_AB_XM_MAX_RX_FRM_SIZE_WIDTH (FRF_AB_XM_MAX_RX_FRM_SIZE_HI_WIDTH + \ 2870 - FRF_AB_XM_MAX_RX_FRM_SIZE_LO_WIDTH) 2871 - 2872 - /* XX_TXDRV_CTL_REG: XAUI SerDes transmit drive control register */ 2873 - /* Default values */ 2874 - #define FFE_AB_XX_TXDRV_DEQ_DEF 0xe /* deq=.6 */ 2875 - #define FFE_AB_XX_TXDRV_DTX_DEF 0x5 /* 1.25 */ 2876 - #define FFE_AB_XX_SD_CTL_DRV_DEF 0 /* 20mA */ 2877 - 2878 - /* XX_CORE_STAT_REG: XAUI XGXS core status register */ 2879 - /* XGXS all-lanes status fields */ 2880 - #define FRF_AB_XX_SYNC_STAT_LBN FRF_AB_XX_SYNC_STAT0_LBN 2881 - #define FRF_AB_XX_SYNC_STAT_WIDTH 4 2882 - #define FRF_AB_XX_COMMA_DET_LBN FRF_AB_XX_COMMA_DET_CH0_LBN 2883 - #define FRF_AB_XX_COMMA_DET_WIDTH 4 2884 - #define FRF_AB_XX_CHAR_ERR_LBN FRF_AB_XX_CHAR_ERR_CH0_LBN 2885 - #define FRF_AB_XX_CHAR_ERR_WIDTH 4 2886 - #define FRF_AB_XX_DISPERR_LBN FRF_AB_XX_DISPERR_CH0_LBN 2887 - #define FRF_AB_XX_DISPERR_WIDTH 4 2888 - #define FFE_AB_XX_STAT_ALL_LANES 0xf 2889 - #define FRF_AB_XX_FORCE_SIG_LBN FRF_AB_XX_FORCE_SIG0_VAL_LBN 2890 - #define FRF_AB_XX_FORCE_SIG_WIDTH 8 2891 - #define FFE_AB_XX_FORCE_SIG_ALL_LANES 0xff 2892 - 2893 - /* RX_MAC_FILTER_TBL0 */ 2894 - /* RMFT_DEST_MAC is wider than 32 bits */ 2895 - #define FRF_CZ_RMFT_DEST_MAC_LO_LBN FRF_CZ_RMFT_DEST_MAC_LBN 2896 - #define FRF_CZ_RMFT_DEST_MAC_LO_WIDTH 32 2897 - #define FRF_CZ_RMFT_DEST_MAC_HI_LBN (FRF_CZ_RMFT_DEST_MAC_LBN + 32) 2898 - #define FRF_CZ_RMFT_DEST_MAC_HI_WIDTH (FRF_CZ_RMFT_DEST_MAC_WIDTH - 32) 2899 - 2900 - /* TX_MAC_FILTER_TBL0 */ 2901 - /* TMFT_SRC_MAC is wider than 32 bits */ 2902 - #define FRF_CZ_TMFT_SRC_MAC_LO_LBN FRF_CZ_TMFT_SRC_MAC_LBN 2903 - #define FRF_CZ_TMFT_SRC_MAC_LO_WIDTH 32 2904 - #define FRF_CZ_TMFT_SRC_MAC_HI_LBN (FRF_CZ_TMFT_SRC_MAC_LBN + 32) 2905 - #define FRF_CZ_TMFT_SRC_MAC_HI_WIDTH (FRF_CZ_TMFT_SRC_MAC_WIDTH - 32) 2906 - 2907 - /* TX_PACE_TBL */ 2908 - /* Values >20 are documented as reserved, but will result in a queue going 2909 - * into the fast bin with a pace value of zero. */ 2910 - #define FFE_BZ_TX_PACE_OFF 0 2911 - #define FFE_BZ_TX_PACE_RESERVED 21 2912 - 2913 - /* DRIVER_EV */ 2914 - /* Sub-fields of an RX flush completion event */ 2915 - #define FSF_AZ_DRIVER_EV_RX_FLUSH_FAIL_LBN 12 2916 - #define FSF_AZ_DRIVER_EV_RX_FLUSH_FAIL_WIDTH 1 2917 - #define FSF_AZ_DRIVER_EV_RX_DESCQ_ID_LBN 0 2918 - #define FSF_AZ_DRIVER_EV_RX_DESCQ_ID_WIDTH 12 2919 - 2920 - /* EVENT_ENTRY */ 2921 - /* Magic number field for event test */ 2922 - #define FSF_AZ_DRV_GEN_EV_MAGIC_LBN 0 2923 - #define FSF_AZ_DRV_GEN_EV_MAGIC_WIDTH 32 2924 - 2925 - /* RX packet prefix */ 2926 - #define FS_BZ_RX_PREFIX_HASH_OFST 12 2927 - #define FS_BZ_RX_PREFIX_SIZE 16 2928 - 2929 - #endif /* EFX_FARCH_REGS_H */
-7
drivers/net/ethernet/sfc/filter.h
··· 30 30 * 31 31 * Only some combinations are supported, depending on NIC type: 32 32 * 33 - * - Falcon supports RX filters matching by {TCP,UDP}/IPv4 4-tuple or 34 - * local 2-tuple (only implemented for Falcon B0) 35 - * 36 - * - Siena supports RX and TX filters matching by {TCP,UDP}/IPv4 4-tuple 37 - * or local 2-tuple, or local MAC with or without outer VID, and RX 38 - * default filters 39 - * 40 33 * - Huntington supports filter matching controlled by firmware, potentially 41 34 * using {TCP,UDP}/IPv{4,6} 4-tuple or local 2-tuple, local MAC or I/G bit, 42 35 * with or without outer and inner VID
+9 -75
drivers/net/ethernet/sfc/io.h
··· 17 17 * 18 18 ************************************************************************** 19 19 * 20 - * Notes on locking strategy for the Falcon architecture: 20 + * The EF10 architecture exposes very few registers to the host and 21 + * most of them are only 32 bits wide. The only exceptions are the MC 22 + * doorbell register pair, which has its own latching, and 23 + * TX_DESC_UPD. 21 24 * 22 - * Many CSRs are very wide and cannot be read or written atomically. 23 - * Writes from the host are buffered by the Bus Interface Unit (BIU) 24 - * up to 128 bits. Whenever the host writes part of such a register, 25 - * the BIU collects the written value and does not write to the 26 - * underlying register until all 4 dwords have been written. A 27 - * similar buffering scheme applies to host access to the NIC's 64-bit 28 - * SRAM. 25 + * The TX_DESC_UPD DMA descriptor pointer is 128-bits but is a special 26 + * case in the BIU to avoid the need for locking in the host: 29 27 * 30 - * Writes to different CSRs and 64-bit SRAM words must be serialised, 31 - * since interleaved access can result in lost writes. We use 32 - * efx_nic::biu_lock for this. 33 - * 34 - * We also serialise reads from 128-bit CSRs and SRAM with the same 35 - * spinlock. This may not be necessary, but it doesn't really matter 36 - * as there are no such reads on the fast path. 37 - * 38 - * The DMA descriptor pointers (RX_DESC_UPD and TX_DESC_UPD) are 39 - * 128-bit but are special-cased in the BIU to avoid the need for 40 - * locking in the host: 41 - * 42 - * - They are write-only. 43 - * - The semantics of writing to these registers are such that 28 + * - It is write-only. 29 + * - The semantics of writing to this register is such that 44 30 * replacing the low 96 bits with zero does not affect functionality. 45 - * - If the host writes to the last dword address of such a register 31 + * - If the host writes to the last dword address of the register 46 32 * (i.e. the high 32 bits) the underlying register will always be 47 33 * written. If the collector and the current write together do not 48 34 * provide values for all 128 bits of the register, the low 96 bits 49 35 * will be written as zero. 50 - * - If the host writes to the address of any other part of such a 51 - * register while the collector already holds values for some other 52 - * register, the write is discarded and the collector maintains its 53 - * current state. 54 - * 55 - * The EF10 architecture exposes very few registers to the host and 56 - * most of them are only 32 bits wide. The only exceptions are the MC 57 - * doorbell register pair, which has its own latching, and 58 - * TX_DESC_UPD, which works in a similar way to the Falcon 59 - * architecture. 60 36 */ 61 37 62 38 #if BITS_PER_LONG == 64 ··· 101 125 spin_unlock_irqrestore(&efx->biu_lock, flags); 102 126 } 103 127 104 - /* Write 64-bit SRAM through the supplied mapping, locking as appropriate. */ 105 - static inline void efx_sram_writeq(struct efx_nic *efx, void __iomem *membase, 106 - const efx_qword_t *value, unsigned int index) 107 - { 108 - unsigned int addr = index * sizeof(*value); 109 - unsigned long flags __attribute__ ((unused)); 110 - 111 - netif_vdbg(efx, hw, efx->net_dev, 112 - "writing SRAM address %x with " EFX_QWORD_FMT "\n", 113 - addr, EFX_QWORD_VAL(*value)); 114 - 115 - spin_lock_irqsave(&efx->biu_lock, flags); 116 - #ifdef EFX_USE_QWORD_IO 117 - __raw_writeq((__force u64)value->u64[0], membase + addr); 118 - #else 119 - __raw_writel((__force u32)value->u32[0], membase + addr); 120 - __raw_writel((__force u32)value->u32[1], membase + addr + 4); 121 - #endif 122 - spin_unlock_irqrestore(&efx->biu_lock, flags); 123 - } 124 - 125 128 /* Write a 32-bit CSR or the last dword of a special 128-bit CSR */ 126 129 static inline void efx_writed(struct efx_nic *efx, const efx_dword_t *value, 127 130 unsigned int reg) ··· 129 174 netif_vdbg(efx, hw, efx->net_dev, 130 175 "read from register %x, got " EFX_OWORD_FMT "\n", reg, 131 176 EFX_OWORD_VAL(*value)); 132 - } 133 - 134 - /* Read 64-bit SRAM through the supplied mapping, locking as appropriate. */ 135 - static inline void efx_sram_readq(struct efx_nic *efx, void __iomem *membase, 136 - efx_qword_t *value, unsigned int index) 137 - { 138 - unsigned int addr = index * sizeof(*value); 139 - unsigned long flags __attribute__ ((unused)); 140 - 141 - spin_lock_irqsave(&efx->biu_lock, flags); 142 - #ifdef EFX_USE_QWORD_IO 143 - value->u64[0] = (__force __le64)__raw_readq(membase + addr); 144 - #else 145 - value->u32[0] = (__force __le32)__raw_readl(membase + addr); 146 - value->u32[1] = (__force __le32)__raw_readl(membase + addr + 4); 147 - #endif 148 - spin_unlock_irqrestore(&efx->biu_lock, flags); 149 - 150 - netif_vdbg(efx, hw, efx->net_dev, 151 - "read from SRAM address %x, got "EFX_QWORD_FMT"\n", 152 - addr, EFX_QWORD_VAL(*value)); 153 177 } 154 178 155 179 /* Read a 32-bit CSR or SRAM */
-7
drivers/net/ethernet/sfc/mcdi.c
··· 10 10 #include "net_driver.h" 11 11 #include "nic.h" 12 12 #include "io.h" 13 - #include "farch_regs.h" 14 13 #include "mcdi_pcol.h" 15 14 16 15 /************************************************************************** ··· 1352 1353 case MCDI_EVENT_CODE_MAC_STATS_DMA: 1353 1354 /* MAC stats are gather lazily. We can ignore this. */ 1354 1355 break; 1355 - case MCDI_EVENT_CODE_FLR: 1356 - if (efx->type->sriov_flr) 1357 - efx->type->sriov_flr(efx, 1358 - MCDI_EVENT_FIELD(*event, FLR_VF)); 1359 - break; 1360 - case MCDI_EVENT_CODE_PTP_RX: 1361 1356 case MCDI_EVENT_CODE_PTP_FAULT: 1362 1357 case MCDI_EVENT_CODE_PTP_PPS: 1363 1358 efx_ptp_event(efx, event);
+12 -12
drivers/net/ethernet/sfc/mcdi_functions.c
··· 62 62 63 63 int efx_mcdi_ev_probe(struct efx_channel *channel) 64 64 { 65 - return efx_nic_alloc_buffer(channel->efx, &channel->eventq.buf, 65 + return efx_nic_alloc_buffer(channel->efx, &channel->eventq, 66 66 (channel->eventq_mask + 1) * 67 67 sizeof(efx_qword_t), 68 68 GFP_KERNEL); ··· 74 74 MC_CMD_INIT_EVQ_V2_IN_LEN(EFX_MAX_EVQ_SIZE * 8 / 75 75 EFX_BUF_SIZE)); 76 76 MCDI_DECLARE_BUF(outbuf, MC_CMD_INIT_EVQ_V2_OUT_LEN); 77 - size_t entries = channel->eventq.buf.len / EFX_BUF_SIZE; 77 + size_t entries = channel->eventq.len / EFX_BUF_SIZE; 78 78 struct efx_nic *efx = channel->efx; 79 79 size_t inlen, outlen; 80 80 dma_addr_t dma_addr; 81 81 int rc, i; 82 82 83 83 /* Fill event queue with all ones (i.e. empty events) */ 84 - memset(channel->eventq.buf.addr, 0xff, channel->eventq.buf.len); 84 + memset(channel->eventq.addr, 0xff, channel->eventq.len); 85 85 86 86 MCDI_SET_DWORD(inbuf, INIT_EVQ_IN_SIZE, channel->eventq_mask + 1); 87 87 MCDI_SET_DWORD(inbuf, INIT_EVQ_IN_INSTANCE, channel->channel); ··· 112 112 INIT_EVQ_IN_FLAG_CUT_THRU, v1_cut_thru); 113 113 } 114 114 115 - dma_addr = channel->eventq.buf.dma_addr; 115 + dma_addr = channel->eventq.dma_addr; 116 116 for (i = 0; i < entries; ++i) { 117 117 MCDI_SET_ARRAY_QWORD(inbuf, INIT_EVQ_IN_DMA_ADDR, i, dma_addr); 118 118 dma_addr += EFX_BUF_SIZE; ··· 134 134 135 135 void efx_mcdi_ev_remove(struct efx_channel *channel) 136 136 { 137 - efx_nic_free_buffer(channel->efx, &channel->eventq.buf); 137 + efx_nic_free_buffer(channel->efx, &channel->eventq); 138 138 } 139 139 140 140 void efx_mcdi_ev_fini(struct efx_channel *channel) ··· 166 166 EFX_BUF_SIZE)); 167 167 bool csum_offload = tx_queue->type & EFX_TXQ_TYPE_OUTER_CSUM; 168 168 bool inner_csum = tx_queue->type & EFX_TXQ_TYPE_INNER_CSUM; 169 - size_t entries = tx_queue->txd.buf.len / EFX_BUF_SIZE; 169 + size_t entries = tx_queue->txd.len / EFX_BUF_SIZE; 170 170 struct efx_channel *channel = tx_queue->channel; 171 171 struct efx_nic *efx = tx_queue->efx; 172 172 dma_addr_t dma_addr; ··· 182 182 MCDI_SET_DWORD(inbuf, INIT_TXQ_IN_OWNER_ID, 0); 183 183 MCDI_SET_DWORD(inbuf, INIT_TXQ_IN_PORT_ID, efx->vport_id); 184 184 185 - dma_addr = tx_queue->txd.buf.dma_addr; 185 + dma_addr = tx_queue->txd.dma_addr; 186 186 187 187 netif_dbg(efx, hw, efx->net_dev, "pushing TXQ %d. %zu entries (%llx)\n", 188 188 tx_queue->queue, entries, (u64)dma_addr); ··· 240 240 241 241 void efx_mcdi_tx_remove(struct efx_tx_queue *tx_queue) 242 242 { 243 - efx_nic_free_buffer(tx_queue->efx, &tx_queue->txd.buf); 243 + efx_nic_free_buffer(tx_queue->efx, &tx_queue->txd); 244 244 } 245 245 246 246 void efx_mcdi_tx_fini(struct efx_tx_queue *tx_queue) ··· 269 269 270 270 int efx_mcdi_rx_probe(struct efx_rx_queue *rx_queue) 271 271 { 272 - return efx_nic_alloc_buffer(rx_queue->efx, &rx_queue->rxd.buf, 272 + return efx_nic_alloc_buffer(rx_queue->efx, &rx_queue->rxd, 273 273 (rx_queue->ptr_mask + 1) * 274 274 sizeof(efx_qword_t), 275 275 GFP_KERNEL); ··· 278 278 void efx_mcdi_rx_init(struct efx_rx_queue *rx_queue) 279 279 { 280 280 struct efx_channel *channel = efx_rx_queue_channel(rx_queue); 281 - size_t entries = rx_queue->rxd.buf.len / EFX_BUF_SIZE; 281 + size_t entries = rx_queue->rxd.len / EFX_BUF_SIZE; 282 282 MCDI_DECLARE_BUF(inbuf, MC_CMD_INIT_RXQ_V4_IN_LEN); 283 283 struct efx_nic *efx = rx_queue->efx; 284 284 unsigned int buffer_size; ··· 306 306 MCDI_SET_DWORD(inbuf, INIT_RXQ_IN_PORT_ID, efx->vport_id); 307 307 MCDI_SET_DWORD(inbuf, INIT_RXQ_V4_IN_BUFFER_SIZE_BYTES, buffer_size); 308 308 309 - dma_addr = rx_queue->rxd.buf.dma_addr; 309 + dma_addr = rx_queue->rxd.dma_addr; 310 310 311 311 netif_dbg(efx, hw, efx->net_dev, "pushing RXQ %d. %zu entries (%llx)\n", 312 312 efx_rx_queue_index(rx_queue), entries, (u64)dma_addr); ··· 325 325 326 326 void efx_mcdi_rx_remove(struct efx_rx_queue *rx_queue) 327 327 { 328 - efx_nic_free_buffer(rx_queue->efx, &rx_queue->rxd.buf); 328 + efx_nic_free_buffer(rx_queue->efx, &rx_queue->rxd); 329 329 } 330 330 331 331 void efx_mcdi_rx_fini(struct efx_rx_queue *rx_queue)
-5
drivers/net/ethernet/sfc/mcdi_port_common.c
··· 1106 1106 1107 1107 MCDI_SET_DWORD(cmdbytes, SET_MAC_IN_MTU, efx_calc_mac_mtu(efx)); 1108 1108 MCDI_SET_DWORD(cmdbytes, SET_MAC_IN_DRAIN, 0); 1109 - 1110 - /* Set simple MAC filter for Siena */ 1111 - MCDI_POPULATE_DWORD_1(cmdbytes, SET_MAC_IN_REJECT, 1112 - SET_MAC_IN_REJECT_UNCST, efx->unicast_filter); 1113 - 1114 1109 MCDI_POPULATE_DWORD_1(cmdbytes, SET_MAC_IN_FLAGS, 1115 1110 SET_MAC_IN_FLAG_INCLUDE_FCS, 1116 1111 !!(efx->net_dev->features & NETIF_F_RXFCS));
+6 -57
drivers/net/ethernet/sfc/net_driver.h
··· 67 67 #define EFX_MAX_CORE_TX_QUEUES (EFX_MAX_TX_TC * EFX_MAX_CHANNELS) 68 68 #define EFX_TXQ_TYPE_OUTER_CSUM 1 /* Outer checksum offload */ 69 69 #define EFX_TXQ_TYPE_INNER_CSUM 2 /* Inner checksum offload */ 70 - #define EFX_TXQ_TYPE_HIGHPRI 4 /* High-priority (for TC) */ 71 - #define EFX_TXQ_TYPES 8 72 - /* HIGHPRI is Siena-only, and INNER_CSUM is EF10, so no need for both */ 70 + #define EFX_TXQ_TYPES 4 73 71 #define EFX_MAX_TXQ_PER_CHANNEL 4 74 72 #define EFX_MAX_TX_QUEUES (EFX_MAX_TXQ_PER_CHANNEL * EFX_MAX_CHANNELS) 75 73 ··· 120 122 void *addr; 121 123 dma_addr_t dma_addr; 122 124 unsigned int len; 123 - }; 124 - 125 - /** 126 - * struct efx_special_buffer - DMA buffer entered into buffer table 127 - * @buf: Standard &struct efx_buffer 128 - * @index: Buffer index within controller;s buffer table 129 - * @entries: Number of buffer table entries 130 - * 131 - * The NIC has a buffer table that maps buffers of size %EFX_BUF_SIZE. 132 - * Event and descriptor rings are addressed via one or more buffer 133 - * table entries (and so can be physically non-contiguous, although we 134 - * currently do not take advantage of that). On Falcon and Siena we 135 - * have to take care of allocating and initialising the entries 136 - * ourselves. On later hardware this is managed by the firmware and 137 - * @index and @entries are left as 0. 138 - */ 139 - struct efx_special_buffer { 140 - struct efx_buffer buf; 141 - unsigned int index; 142 - unsigned int entries; 143 125 }; 144 126 145 127 /** ··· 215 237 * Normally this will equal @write_count, but as option descriptors 216 238 * don't produce completion events, they won't update this. 217 239 * Filled in iff @efx->type->option_descriptors; only used for PIO. 218 - * Thus, this is written and used on EF10, and neither on farch. 240 + * Thus, this is only written and used on EF10. 219 241 * @old_read_count: The value of read_count when last checked. 220 242 * This is here for performance reasons. The xmit path will 221 243 * only get the up-to-date value of read_count if this ··· 248 270 struct netdev_queue *core_txq; 249 271 struct efx_tx_buffer *buffer; 250 272 struct efx_buffer *cb_page; 251 - struct efx_special_buffer txd; 273 + struct efx_buffer txd; 252 274 unsigned int ptr_mask; 253 275 void __iomem *piobuf; 254 276 unsigned int piobuf_offset; ··· 377 399 struct efx_nic *efx; 378 400 int core_index; 379 401 struct efx_rx_buffer *buffer; 380 - struct efx_special_buffer rxd; 402 + struct efx_buffer rxd; 381 403 unsigned int ptr_mask; 382 404 bool refill_enabled; 383 405 bool flush_pending; ··· 493 515 #ifdef CONFIG_NET_RX_BUSY_POLL 494 516 unsigned long busy_poll_state; 495 517 #endif 496 - struct efx_special_buffer eventq; 518 + struct efx_buffer eventq; 497 519 unsigned int eventq_mask; 498 520 unsigned int eventq_read_ptr; 499 521 int event_test_cpu; ··· 732 754 u16 offset; 733 755 }; 734 756 735 - /* Number of bits used in a multicast filter hash address */ 736 - #define EFX_MCAST_HASH_BITS 8 737 - 738 - /* Number of (single-bit) entries in a multicast filter hash */ 739 - #define EFX_MCAST_HASH_ENTRIES (1 << EFX_MCAST_HASH_BITS) 740 - 741 - /* An Efx multicast filter hash */ 742 - union efx_multicast_hash { 743 - u8 byte[EFX_MCAST_HASH_ENTRIES / 8]; 744 - efx_oword_t oword[EFX_MCAST_HASH_ENTRIES / sizeof(efx_oword_t) / 8]; 745 - }; 746 - 747 757 struct vfdi_status; 748 758 749 759 /* The reserved RSS context value */ ··· 861 895 * @tx_dc_base: Base qword address in SRAM of TX queue descriptor caches 862 896 * @rx_dc_base: Base qword address in SRAM of RX queue descriptor caches 863 897 * @sram_lim_qw: Qword address limit of SRAM 864 - * @next_buffer_table: First available buffer table id 865 898 * @n_channels: Number of channels in use 866 899 * @n_rx_channels: Number of channels used for RX (= number of RX queues) 867 900 * @n_tx_channels: Number of channels used for TX ··· 922 957 * see &enum ethtool_fec_config_bits. 923 958 * @link_state: Current state of the link 924 959 * @n_link_state_changes: Number of times the link has changed state 925 - * @unicast_filter: Flag for Falcon-arch simple unicast filter. 926 - * Protected by @mac_lock. 927 - * @multicast_hash: Multicast hash table for Falcon-arch. 928 - * Protected by @mac_lock. 929 960 * @wanted_fc: Wanted flow control flags 930 961 * @fc_disable: When non-zero flow control is disabled. Typically used to 931 962 * ensure that network back pressure doesn't delay dma queue flushes. ··· 1025 1064 unsigned tx_dc_base; 1026 1065 unsigned rx_dc_base; 1027 1066 unsigned sram_lim_qw; 1028 - unsigned next_buffer_table; 1029 1067 1030 1068 unsigned int max_channels; 1031 1069 unsigned int max_vis; ··· 1099 1139 struct efx_link_state link_state; 1100 1140 unsigned int n_link_state_changes; 1101 1141 1102 - bool unicast_filter; 1103 - union efx_multicast_hash multicast_hash; 1104 1142 u8 wanted_fc; 1105 1143 unsigned fc_disable; 1106 1144 ··· 1221 1263 * @remove_port: Free resources allocated by probe_port() 1222 1264 * @handle_global_event: Handle a "global" event (may be %NULL) 1223 1265 * @fini_dmaq: Flush and finalise DMA queues (RX and TX queues) 1224 - * @prepare_flush: Prepare the hardware for flushing the DMA queues 1225 - * (for Falcon architecture) 1226 - * @finish_flush: Clean up after flushing the DMA queues (for Falcon 1227 - * architecture) 1228 1266 * @prepare_flr: Prepare for an FLR 1229 1267 * @finish_flr: Clean up after an FLR 1230 1268 * @describe_stats: Describe statistics for ethtool ··· 1242 1288 * @set_wol: Push WoL configuration to the NIC 1243 1289 * @resume_wol: Synchronise WoL state between driver and MC (e.g. after resume) 1244 1290 * @get_fec_stats: Get standard FEC statistics. 1245 - * @test_chip: Test registers. May use efx_farch_test_registers(), and is 1246 - * expected to reset the NIC. 1291 + * @test_chip: Test registers. This is expected to reset the NIC. 1247 1292 * @test_nvram: Test validity of NVRAM contents 1248 1293 * @mcdi_request: Send an MCDI request with the given header and SDU. 1249 1294 * The SDU length may be any value from 0 up to the protocol- ··· 1367 1414 void (*remove_port)(struct efx_nic *efx); 1368 1415 bool (*handle_global_event)(struct efx_channel *channel, efx_qword_t *); 1369 1416 int (*fini_dmaq)(struct efx_nic *efx); 1370 - void (*prepare_flush)(struct efx_nic *efx); 1371 - void (*finish_flush)(struct efx_nic *efx); 1372 1417 void (*prepare_flr)(struct efx_nic *efx); 1373 1418 void (*finish_flr)(struct efx_nic *efx); 1374 1419 size_t (*describe_stats)(struct efx_nic *efx, u8 *names); ··· 1482 1531 int (*sriov_init)(struct efx_nic *efx); 1483 1532 void (*sriov_fini)(struct efx_nic *efx); 1484 1533 bool (*sriov_wanted)(struct efx_nic *efx); 1485 - void (*sriov_reset)(struct efx_nic *efx); 1486 - void (*sriov_flr)(struct efx_nic *efx, unsigned vf_i); 1487 1534 int (*sriov_set_vf_mac)(struct efx_nic *efx, int vf_i, const u8 *mac); 1488 1535 int (*sriov_set_vf_vlan)(struct efx_nic *efx, int vf_i, u16 vlan, 1489 1536 u8 qos);
-158
drivers/net/ethernet/sfc/nic.c
··· 17 17 #include "efx.h" 18 18 #include "nic.h" 19 19 #include "ef10_regs.h" 20 - #include "farch_regs.h" 21 20 #include "io.h" 22 21 #include "workarounds.h" 23 22 #include "mcdi_pcol.h" ··· 171 172 172 173 /* Register dump */ 173 174 174 - #define REGISTER_REVISION_FA 1 175 - #define REGISTER_REVISION_FB 2 176 - #define REGISTER_REVISION_FC 3 177 - #define REGISTER_REVISION_FZ 3 /* last Falcon arch revision */ 178 175 #define REGISTER_REVISION_ED 4 179 176 #define REGISTER_REVISION_EZ 4 /* latest EF10 revision */ 180 177 ··· 184 189 REGISTER_REVISION_ ## arch ## min_rev, \ 185 190 REGISTER_REVISION_ ## arch ## max_rev \ 186 191 } 187 - #define REGISTER_AA(name) REGISTER(name, F, A, A) 188 - #define REGISTER_AB(name) REGISTER(name, F, A, B) 189 - #define REGISTER_AZ(name) REGISTER(name, F, A, Z) 190 - #define REGISTER_BB(name) REGISTER(name, F, B, B) 191 - #define REGISTER_BZ(name) REGISTER(name, F, B, Z) 192 - #define REGISTER_CZ(name) REGISTER(name, F, C, Z) 193 192 #define REGISTER_DZ(name) REGISTER(name, E, D, Z) 194 193 195 194 static const struct efx_nic_reg efx_nic_regs[] = { 196 - REGISTER_AZ(ADR_REGION), 197 - REGISTER_AZ(INT_EN_KER), 198 - REGISTER_BZ(INT_EN_CHAR), 199 - REGISTER_AZ(INT_ADR_KER), 200 - REGISTER_BZ(INT_ADR_CHAR), 201 - /* INT_ACK_KER is WO */ 202 - /* INT_ISR0 is RC */ 203 - REGISTER_AZ(HW_INIT), 204 - REGISTER_CZ(USR_EV_CFG), 205 - REGISTER_AB(EE_SPI_HCMD), 206 - REGISTER_AB(EE_SPI_HADR), 207 - REGISTER_AB(EE_SPI_HDATA), 208 - REGISTER_AB(EE_BASE_PAGE), 209 - REGISTER_AB(EE_VPD_CFG0), 210 - /* EE_VPD_SW_CNTL and EE_VPD_SW_DATA are not used */ 211 - /* PMBX_DBG_IADDR and PBMX_DBG_IDATA are indirect */ 212 - /* PCIE_CORE_INDIRECT is indirect */ 213 - REGISTER_AB(NIC_STAT), 214 - REGISTER_AB(GPIO_CTL), 215 - REGISTER_AB(GLB_CTL), 216 - /* FATAL_INTR_KER and FATAL_INTR_CHAR are partly RC */ 217 - REGISTER_BZ(DP_CTRL), 218 - REGISTER_AZ(MEM_STAT), 219 - REGISTER_AZ(CS_DEBUG), 220 - REGISTER_AZ(ALTERA_BUILD), 221 - REGISTER_AZ(CSR_SPARE), 222 - REGISTER_AB(PCIE_SD_CTL0123), 223 - REGISTER_AB(PCIE_SD_CTL45), 224 - REGISTER_AB(PCIE_PCS_CTL_STAT), 225 - /* DEBUG_DATA_OUT is not used */ 226 - /* DRV_EV is WO */ 227 - REGISTER_AZ(EVQ_CTL), 228 - REGISTER_AZ(EVQ_CNT1), 229 - REGISTER_AZ(EVQ_CNT2), 230 - REGISTER_AZ(BUF_TBL_CFG), 231 - REGISTER_AZ(SRM_RX_DC_CFG), 232 - REGISTER_AZ(SRM_TX_DC_CFG), 233 - REGISTER_AZ(SRM_CFG), 234 - /* BUF_TBL_UPD is WO */ 235 - REGISTER_AZ(SRM_UPD_EVQ), 236 - REGISTER_AZ(SRAM_PARITY), 237 - REGISTER_AZ(RX_CFG), 238 - REGISTER_BZ(RX_FILTER_CTL), 239 - /* RX_FLUSH_DESCQ is WO */ 240 - REGISTER_AZ(RX_DC_CFG), 241 - REGISTER_AZ(RX_DC_PF_WM), 242 - REGISTER_BZ(RX_RSS_TKEY), 243 - /* RX_NODESC_DROP is RC */ 244 - REGISTER_AA(RX_SELF_RST), 245 - /* RX_DEBUG, RX_PUSH_DROP are not used */ 246 - REGISTER_CZ(RX_RSS_IPV6_REG1), 247 - REGISTER_CZ(RX_RSS_IPV6_REG2), 248 - REGISTER_CZ(RX_RSS_IPV6_REG3), 249 - /* TX_FLUSH_DESCQ is WO */ 250 - REGISTER_AZ(TX_DC_CFG), 251 - REGISTER_AA(TX_CHKSM_CFG), 252 - REGISTER_AZ(TX_CFG), 253 - /* TX_PUSH_DROP is not used */ 254 - REGISTER_AZ(TX_RESERVED), 255 - REGISTER_BZ(TX_PACE), 256 - /* TX_PACE_DROP_QID is RC */ 257 - REGISTER_BB(TX_VLAN), 258 - REGISTER_BZ(TX_IPFIL_PORTEN), 259 - REGISTER_AB(MD_TXD), 260 - REGISTER_AB(MD_RXD), 261 - REGISTER_AB(MD_CS), 262 - REGISTER_AB(MD_PHY_ADR), 263 - REGISTER_AB(MD_ID), 264 - /* MD_STAT is RC */ 265 - REGISTER_AB(MAC_STAT_DMA), 266 - REGISTER_AB(MAC_CTRL), 267 - REGISTER_BB(GEN_MODE), 268 - REGISTER_AB(MAC_MC_HASH_REG0), 269 - REGISTER_AB(MAC_MC_HASH_REG1), 270 - REGISTER_AB(GM_CFG1), 271 - REGISTER_AB(GM_CFG2), 272 - /* GM_IPG and GM_HD are not used */ 273 - REGISTER_AB(GM_MAX_FLEN), 274 - /* GM_TEST is not used */ 275 - REGISTER_AB(GM_ADR1), 276 - REGISTER_AB(GM_ADR2), 277 - REGISTER_AB(GMF_CFG0), 278 - REGISTER_AB(GMF_CFG1), 279 - REGISTER_AB(GMF_CFG2), 280 - REGISTER_AB(GMF_CFG3), 281 - REGISTER_AB(GMF_CFG4), 282 - REGISTER_AB(GMF_CFG5), 283 - REGISTER_BB(TX_SRC_MAC_CTL), 284 - REGISTER_AB(XM_ADR_LO), 285 - REGISTER_AB(XM_ADR_HI), 286 - REGISTER_AB(XM_GLB_CFG), 287 - REGISTER_AB(XM_TX_CFG), 288 - REGISTER_AB(XM_RX_CFG), 289 - REGISTER_AB(XM_MGT_INT_MASK), 290 - REGISTER_AB(XM_FC), 291 - REGISTER_AB(XM_PAUSE_TIME), 292 - REGISTER_AB(XM_TX_PARAM), 293 - REGISTER_AB(XM_RX_PARAM), 294 - /* XM_MGT_INT_MSK (note no 'A') is RC */ 295 - REGISTER_AB(XX_PWR_RST), 296 - REGISTER_AB(XX_SD_CTL), 297 - REGISTER_AB(XX_TXDRV_CTL), 298 195 /* XX_PRBS_CTL, XX_PRBS_CHK and XX_PRBS_ERR are not used */ 299 196 /* XX_CORE_STAT is partly RC */ 300 197 REGISTER_DZ(BIU_HW_REV_ID), ··· 212 325 arch, min_rev, max_rev, \ 213 326 arch ## R_ ## min_rev ## max_rev ## _ ## name ## _STEP, \ 214 327 arch ## R_ ## min_rev ## max_rev ## _ ## name ## _ROWS) 215 - #define REGISTER_TABLE_AA(name) REGISTER_TABLE(name, F, A, A) 216 - #define REGISTER_TABLE_AZ(name) REGISTER_TABLE(name, F, A, Z) 217 - #define REGISTER_TABLE_BB(name) REGISTER_TABLE(name, F, B, B) 218 - #define REGISTER_TABLE_BZ(name) REGISTER_TABLE(name, F, B, Z) 219 - #define REGISTER_TABLE_BB_CZ(name) \ 220 - REGISTER_TABLE_DIMENSIONS(name, FR_BZ_ ## name, F, B, B, \ 221 - FR_BZ_ ## name ## _STEP, \ 222 - FR_BB_ ## name ## _ROWS), \ 223 - REGISTER_TABLE_DIMENSIONS(name, FR_BZ_ ## name, F, C, Z, \ 224 - FR_BZ_ ## name ## _STEP, \ 225 - FR_CZ_ ## name ## _ROWS) 226 - #define REGISTER_TABLE_CZ(name) REGISTER_TABLE(name, F, C, Z) 227 328 #define REGISTER_TABLE_DZ(name) REGISTER_TABLE(name, E, D, Z) 228 329 229 330 static const struct efx_nic_reg_table efx_nic_reg_tables[] = { 230 - /* DRIVER is not used */ 231 - /* EVQ_RPTR, TIMER_COMMAND, USR_EV and {RX,TX}_DESC_UPD are WO */ 232 - REGISTER_TABLE_BB(TX_IPFIL_TBL), 233 - REGISTER_TABLE_BB(TX_SRC_MAC_TBL), 234 - REGISTER_TABLE_AA(RX_DESC_PTR_TBL_KER), 235 - REGISTER_TABLE_BB_CZ(RX_DESC_PTR_TBL), 236 - REGISTER_TABLE_AA(TX_DESC_PTR_TBL_KER), 237 - REGISTER_TABLE_BB_CZ(TX_DESC_PTR_TBL), 238 - REGISTER_TABLE_AA(EVQ_PTR_TBL_KER), 239 - REGISTER_TABLE_BB_CZ(EVQ_PTR_TBL), 240 - /* We can't reasonably read all of the buffer table (up to 8MB!). 241 - * However this driver will only use a few entries. Reading 242 - * 1K entries allows for some expansion of queue count and 243 - * size before we need to change the version. */ 244 - REGISTER_TABLE_DIMENSIONS(BUF_FULL_TBL_KER, FR_AA_BUF_FULL_TBL_KER, 245 - F, A, A, 8, 1024), 246 - REGISTER_TABLE_DIMENSIONS(BUF_FULL_TBL, FR_BZ_BUF_FULL_TBL, 247 - F, B, Z, 8, 1024), 248 - REGISTER_TABLE_CZ(RX_MAC_FILTER_TBL0), 249 - REGISTER_TABLE_BB_CZ(TIMER_TBL), 250 - REGISTER_TABLE_BB_CZ(TX_PACE_TBL), 251 - REGISTER_TABLE_BZ(RX_INDIRECTION_TBL), 252 - /* TX_FILTER_TBL0 is huge and not used by this driver */ 253 - REGISTER_TABLE_CZ(TX_MAC_FILTER_TBL0), 254 - REGISTER_TABLE_CZ(MC_TREG_SMEM), 255 - /* MSIX_PBA_TABLE is not mapped */ 256 - /* SRM_DBG is not mapped (and is redundant with BUF_FLL_TBL) */ 257 - REGISTER_TABLE_BZ(RX_FILTER_TBL0), 258 331 REGISTER_TABLE_DZ(BIU_MC_SFT_STATUS), 259 332 }; 260 333 ··· 271 424 switch (table->step) { 272 425 case 4: /* 32-bit SRAM */ 273 426 efx_readd(efx, buf, table->offset + 4 * i); 274 - break; 275 - case 8: /* 64-bit SRAM */ 276 - efx_sram_readq(efx, 277 - efx->membase + table->offset, 278 - buf, i); 279 427 break; 280 428 case 16: /* 128-bit-readable register */ 281 429 efx_reado_table(efx, buf, table->offset, i);
-178
drivers/net/ethernet/sfc/nic.h
··· 11 11 #include "nic_common.h" 12 12 #include "efx.h" 13 13 14 - u32 efx_farch_fpga_ver(struct efx_nic *efx); 15 - 16 14 enum { 17 15 PHY_TYPE_NONE = 0, 18 16 PHY_TYPE_TXC43128 = 1, ··· 21 23 PHY_TYPE_SFT9001A = 8, 22 24 PHY_TYPE_QT2025C = 9, 23 25 PHY_TYPE_SFT9001B = 10, 24 - }; 25 - 26 - enum { 27 - SIENA_STAT_tx_bytes = GENERIC_STAT_COUNT, 28 - SIENA_STAT_tx_good_bytes, 29 - SIENA_STAT_tx_bad_bytes, 30 - SIENA_STAT_tx_packets, 31 - SIENA_STAT_tx_bad, 32 - SIENA_STAT_tx_pause, 33 - SIENA_STAT_tx_control, 34 - SIENA_STAT_tx_unicast, 35 - SIENA_STAT_tx_multicast, 36 - SIENA_STAT_tx_broadcast, 37 - SIENA_STAT_tx_lt64, 38 - SIENA_STAT_tx_64, 39 - SIENA_STAT_tx_65_to_127, 40 - SIENA_STAT_tx_128_to_255, 41 - SIENA_STAT_tx_256_to_511, 42 - SIENA_STAT_tx_512_to_1023, 43 - SIENA_STAT_tx_1024_to_15xx, 44 - SIENA_STAT_tx_15xx_to_jumbo, 45 - SIENA_STAT_tx_gtjumbo, 46 - SIENA_STAT_tx_collision, 47 - SIENA_STAT_tx_single_collision, 48 - SIENA_STAT_tx_multiple_collision, 49 - SIENA_STAT_tx_excessive_collision, 50 - SIENA_STAT_tx_deferred, 51 - SIENA_STAT_tx_late_collision, 52 - SIENA_STAT_tx_excessive_deferred, 53 - SIENA_STAT_tx_non_tcpudp, 54 - SIENA_STAT_tx_mac_src_error, 55 - SIENA_STAT_tx_ip_src_error, 56 - SIENA_STAT_rx_bytes, 57 - SIENA_STAT_rx_good_bytes, 58 - SIENA_STAT_rx_bad_bytes, 59 - SIENA_STAT_rx_packets, 60 - SIENA_STAT_rx_good, 61 - SIENA_STAT_rx_bad, 62 - SIENA_STAT_rx_pause, 63 - SIENA_STAT_rx_control, 64 - SIENA_STAT_rx_unicast, 65 - SIENA_STAT_rx_multicast, 66 - SIENA_STAT_rx_broadcast, 67 - SIENA_STAT_rx_lt64, 68 - SIENA_STAT_rx_64, 69 - SIENA_STAT_rx_65_to_127, 70 - SIENA_STAT_rx_128_to_255, 71 - SIENA_STAT_rx_256_to_511, 72 - SIENA_STAT_rx_512_to_1023, 73 - SIENA_STAT_rx_1024_to_15xx, 74 - SIENA_STAT_rx_15xx_to_jumbo, 75 - SIENA_STAT_rx_gtjumbo, 76 - SIENA_STAT_rx_bad_gtjumbo, 77 - SIENA_STAT_rx_overflow, 78 - SIENA_STAT_rx_false_carrier, 79 - SIENA_STAT_rx_symbol_error, 80 - SIENA_STAT_rx_align_error, 81 - SIENA_STAT_rx_length_error, 82 - SIENA_STAT_rx_internal_error, 83 - SIENA_STAT_rx_nodesc_drop_cnt, 84 - SIENA_STAT_COUNT 85 - }; 86 - 87 - /** 88 - * struct siena_nic_data - Siena NIC state 89 - * @efx: Pointer back to main interface structure 90 - * @wol_filter_id: Wake-on-LAN packet filter id 91 - * @stats: Hardware statistics 92 - * @vf: Array of &struct siena_vf objects 93 - * @vf_buftbl_base: The zeroth buffer table index used to back VF queues. 94 - * @vfdi_status: Common VFDI status page to be dmad to VF address space. 95 - * @local_addr_list: List of local addresses. Protected by %local_lock. 96 - * @local_page_list: List of DMA addressable pages used to broadcast 97 - * %local_addr_list. Protected by %local_lock. 98 - * @local_lock: Mutex protecting %local_addr_list and %local_page_list. 99 - * @peer_work: Work item to broadcast peer addresses to VMs. 100 - */ 101 - struct siena_nic_data { 102 - struct efx_nic *efx; 103 - int wol_filter_id; 104 - u64 stats[SIENA_STAT_COUNT]; 105 - #ifdef CONFIG_SFC_SRIOV 106 - struct siena_vf *vf; 107 - struct efx_channel *vfdi_channel; 108 - unsigned vf_buftbl_base; 109 - struct efx_buffer vfdi_status; 110 - struct list_head local_addr_list; 111 - struct list_head local_page_list; 112 - struct mutex local_lock; 113 - struct work_struct peer_work; 114 - #endif 115 26 }; 116 27 117 28 enum { ··· 210 303 211 304 extern const struct efx_nic_type efx_hunt_a0_nic_type; 212 305 extern const struct efx_nic_type efx_hunt_a0_vf_nic_type; 213 - 214 - int falcon_probe_board(struct efx_nic *efx, u16 revision_info); 215 - 216 - /* Falcon/Siena queue operations */ 217 - int efx_farch_tx_probe(struct efx_tx_queue *tx_queue); 218 - void efx_farch_tx_init(struct efx_tx_queue *tx_queue); 219 - void efx_farch_tx_fini(struct efx_tx_queue *tx_queue); 220 - void efx_farch_tx_remove(struct efx_tx_queue *tx_queue); 221 - void efx_farch_tx_write(struct efx_tx_queue *tx_queue); 222 - unsigned int efx_farch_tx_limit_len(struct efx_tx_queue *tx_queue, 223 - dma_addr_t dma_addr, unsigned int len); 224 - int efx_farch_rx_probe(struct efx_rx_queue *rx_queue); 225 - void efx_farch_rx_init(struct efx_rx_queue *rx_queue); 226 - void efx_farch_rx_fini(struct efx_rx_queue *rx_queue); 227 - void efx_farch_rx_remove(struct efx_rx_queue *rx_queue); 228 - void efx_farch_rx_write(struct efx_rx_queue *rx_queue); 229 - void efx_farch_rx_defer_refill(struct efx_rx_queue *rx_queue); 230 - int efx_farch_ev_probe(struct efx_channel *channel); 231 - int efx_farch_ev_init(struct efx_channel *channel); 232 - void efx_farch_ev_fini(struct efx_channel *channel); 233 - void efx_farch_ev_remove(struct efx_channel *channel); 234 - int efx_farch_ev_process(struct efx_channel *channel, int quota); 235 - void efx_farch_ev_read_ack(struct efx_channel *channel); 236 - void efx_farch_ev_test_generate(struct efx_channel *channel); 237 - 238 - /* Falcon/Siena filter operations */ 239 - int efx_farch_filter_table_probe(struct efx_nic *efx); 240 - void efx_farch_filter_table_restore(struct efx_nic *efx); 241 - void efx_farch_filter_table_remove(struct efx_nic *efx); 242 - void efx_farch_filter_update_rx_scatter(struct efx_nic *efx); 243 - s32 efx_farch_filter_insert(struct efx_nic *efx, struct efx_filter_spec *spec, 244 - bool replace); 245 - int efx_farch_filter_remove_safe(struct efx_nic *efx, 246 - enum efx_filter_priority priority, 247 - u32 filter_id); 248 - int efx_farch_filter_get_safe(struct efx_nic *efx, 249 - enum efx_filter_priority priority, u32 filter_id, 250 - struct efx_filter_spec *); 251 - int efx_farch_filter_clear_rx(struct efx_nic *efx, 252 - enum efx_filter_priority priority); 253 - u32 efx_farch_filter_count_rx_used(struct efx_nic *efx, 254 - enum efx_filter_priority priority); 255 - u32 efx_farch_filter_get_rx_id_limit(struct efx_nic *efx); 256 - s32 efx_farch_filter_get_rx_ids(struct efx_nic *efx, 257 - enum efx_filter_priority priority, u32 *buf, 258 - u32 size); 259 - #ifdef CONFIG_RFS_ACCEL 260 - bool efx_farch_filter_rfs_expire_one(struct efx_nic *efx, u32 flow_id, 261 - unsigned int index); 262 - #endif 263 - void efx_farch_filter_sync_rx_mode(struct efx_nic *efx); 264 - 265 - /* Falcon/Siena interrupts */ 266 - void efx_farch_irq_enable_master(struct efx_nic *efx); 267 - int efx_farch_irq_test_generate(struct efx_nic *efx); 268 - void efx_farch_irq_disable_master(struct efx_nic *efx); 269 - irqreturn_t efx_farch_msi_interrupt(int irq, void *dev_id); 270 - irqreturn_t efx_farch_legacy_interrupt(int irq, void *dev_id); 271 - irqreturn_t efx_farch_fatal_interrupt(struct efx_nic *efx); 272 - 273 - /* Global Resources */ 274 - void siena_prepare_flush(struct efx_nic *efx); 275 - int efx_farch_fini_dmaq(struct efx_nic *efx); 276 - void efx_farch_finish_flr(struct efx_nic *efx); 277 - void siena_finish_flush(struct efx_nic *efx); 278 - void falcon_start_nic_stats(struct efx_nic *efx); 279 - void falcon_stop_nic_stats(struct efx_nic *efx); 280 - int falcon_reset_xaui(struct efx_nic *efx); 281 - void efx_farch_dimension_resources(struct efx_nic *efx, unsigned sram_lim_qw); 282 - void efx_farch_init_common(struct efx_nic *efx); 283 - void efx_farch_rx_push_indir_table(struct efx_nic *efx); 284 - void efx_farch_rx_pull_indir_table(struct efx_nic *efx); 285 - 286 - /* Tests */ 287 - struct efx_farch_register_test { 288 - unsigned address; 289 - efx_oword_t mask; 290 - }; 291 - 292 - int efx_farch_test_registers(struct efx_nic *efx, 293 - const struct efx_farch_register_test *regs, 294 - size_t n_regs); 295 - 296 - void efx_farch_generate_event(struct efx_nic *efx, unsigned int evq, 297 - efx_qword_t *event); 298 306 299 307 #endif /* EFX_NIC_H */
+5 -8
drivers/net/ethernet/sfc/nic_common.h
··· 15 15 #include "ptp.h" 16 16 17 17 enum { 18 - /* Revisions 0-2 were Falcon A0, A1 and B0 respectively. 18 + /* Revisions 0-3 were Falcon A0, A1, B0 and Siena respectively. 19 19 * They are not supported by this driver but these revision numbers 20 20 * form part of the ethtool API for register dumping. 21 21 */ 22 - EFX_REV_SIENA_A0 = 3, 23 22 EFX_REV_HUNT_A0 = 4, 24 23 EFX_REV_EF100 = 5, 25 24 }; ··· 32 33 static inline efx_qword_t *efx_event(struct efx_channel *channel, 33 34 unsigned int index) 34 35 { 35 - return ((efx_qword_t *) (channel->eventq.buf.addr)) + 36 + return ((efx_qword_t *)(channel->eventq.addr)) + 36 37 (index & channel->eventq_mask); 37 38 } 38 39 ··· 58 59 static inline efx_qword_t * 59 60 efx_tx_desc(struct efx_tx_queue *tx_queue, unsigned int index) 60 61 { 61 - return ((efx_qword_t *) (tx_queue->txd.buf.addr)) + index; 62 + return ((efx_qword_t *)(tx_queue->txd.addr)) + index; 62 63 } 63 64 64 65 /* Report whether this TX queue would be empty for the given write_count. ··· 79 80 80 81 /* Decide whether to push a TX descriptor to the NIC vs merely writing 81 82 * the doorbell. This can reduce latency when we are adding a single 82 - * descriptor to an empty queue, but is otherwise pointless. Further, 83 - * Falcon and Siena have hardware bugs (SF bug 33851) that may be 84 - * triggered if we don't check this. 83 + * descriptor to an empty queue, but is otherwise pointless. 85 84 * We use the write_count used for the last doorbell push, to get the 86 85 * NIC's view of the tx queue. 87 86 */ ··· 96 99 static inline efx_qword_t * 97 100 efx_rx_desc(struct efx_rx_queue *rx_queue, unsigned int index) 98 101 { 99 - return ((efx_qword_t *) (rx_queue->rxd.buf.addr)) + index; 102 + return ((efx_qword_t *)(rx_queue->rxd.addr)) + index; 100 103 } 101 104 102 105 /* Alignment of PCIe DMA boundaries (4KB) */
+1 -226
drivers/net/ethernet/sfc/ptp.c
··· 43 43 #include "mcdi.h" 44 44 #include "mcdi_pcol.h" 45 45 #include "io.h" 46 - #include "farch_regs.h" 47 46 #include "tx.h" 48 47 #include "nic.h" /* indirectly includes ptp.h */ 49 48 #include "efx_channels.h" ··· 86 87 #define PTP_V1_VERSION_LENGTH 2 87 88 #define PTP_V1_VERSION_OFFSET 28 88 89 89 - #define PTP_V1_UUID_LENGTH 6 90 - #define PTP_V1_UUID_OFFSET 50 91 - 92 90 #define PTP_V1_SEQUENCE_LENGTH 2 93 91 #define PTP_V1_SEQUENCE_OFFSET 58 94 92 ··· 96 100 97 101 #define PTP_V2_VERSION_LENGTH 1 98 102 #define PTP_V2_VERSION_OFFSET 29 99 - 100 - #define PTP_V2_UUID_LENGTH 8 101 - #define PTP_V2_UUID_OFFSET 48 102 - 103 - /* Although PTP V2 UUIDs are comprised a ClockIdentity (8) and PortNumber (2), 104 - * the MC only captures the last six bytes of the clock identity. These values 105 - * reflect those, not the ones used in the standard. The standard permits 106 - * mapping of V1 UUIDs to V2 UUIDs with these same values. 107 - */ 108 - #define PTP_V2_MC_UUID_LENGTH 6 109 - #define PTP_V2_MC_UUID_OFFSET 50 110 103 111 104 #define PTP_V2_SEQUENCE_LENGTH 2 112 105 #define PTP_V2_SEQUENCE_OFFSET 58 ··· 152 167 153 168 /** 154 169 * struct efx_ptp_match - Matching structure, stored in sk_buff's cb area. 155 - * @words: UUID and (partial) sequence number 156 170 * @expiry: Time after which the packet should be delivered irrespective of 157 171 * event arrival. 158 172 * @state: The state of the packet - whether it is ready for processing or 159 173 * whether that is of no interest. 160 174 */ 161 175 struct efx_ptp_match { 162 - u32 words[DIV_ROUND_UP(PTP_V1_UUID_LENGTH, 4)]; 163 176 unsigned long expiry; 164 177 enum ptp_packet_state state; 165 178 }; ··· 219 236 /** 220 237 * struct efx_ptp_data - Precision Time Protocol (PTP) state 221 238 * @efx: The NIC context 222 - * @channel: The PTP channel (Siena only) 223 - * @rx_ts_inline: Flag for whether RX timestamps are inline (else they are 224 - * separate events) 239 + * @channel: The PTP channel (for Medford and Medford2) 225 240 * @rxq: Receive SKB queue (awaiting timestamps) 226 241 * @txq: Transmit SKB queue 227 - * @evt_list: List of MC receive events awaiting packets 228 - * @evt_free_list: List of free events 229 - * @evt_lock: Lock for manipulating evt_list and evt_free_list 230 - * @rx_evts: Instantiated events (on evt_list and evt_free_list) 231 242 * @workwq: Work queue for processing pending PTP operations 232 243 * @work: Work task 233 244 * @cleanup_work: Work task for periodic cleanup ··· 287 310 struct efx_ptp_data { 288 311 struct efx_nic *efx; 289 312 struct efx_channel *channel; 290 - bool rx_ts_inline; 291 313 struct sk_buff_head rxq; 292 314 struct sk_buff_head txq; 293 - struct list_head evt_list; 294 - struct list_head evt_free_list; 295 - spinlock_t evt_lock; 296 - struct efx_ptp_event_rx rx_evts[MAX_RECEIVE_EVENTS]; 297 315 struct workqueue_struct *workwq; 298 316 struct work_struct work; 299 317 struct delayed_work cleanup_work; ··· 435 463 stats, _MCDI_PTR(outbuf, 0), false); 436 464 437 465 return PTP_STAT_COUNT; 438 - } 439 - 440 - /* For Siena platforms NIC time is s and ns */ 441 - static void efx_ptp_ns_to_s_ns(s64 ns, u32 *nic_major, u32 *nic_minor) 442 - { 443 - struct timespec64 ts = ns_to_timespec64(ns); 444 - *nic_major = (u32)ts.tv_sec; 445 - *nic_minor = ts.tv_nsec; 446 - } 447 - 448 - static ktime_t efx_ptp_s_ns_to_ktime_correction(u32 nic_major, u32 nic_minor, 449 - s32 correction) 450 - { 451 - ktime_t kt = ktime_set(nic_major, nic_minor); 452 - if (correction >= 0) 453 - kt = ktime_add_ns(kt, (u64)correction); 454 - else 455 - kt = ktime_sub_ns(kt, (u64)-correction); 456 - return kt; 457 466 } 458 467 459 468 /* To convert from s27 format to ns we multiply then divide by a power of 2. ··· 649 696 ptp->nic_to_kernel_time = efx_ptp_s27_to_ktime_correction; 650 697 ptp->nic_time.minor_max = 1 << 27; 651 698 ptp->nic_time.sync_event_minor_shift = 19; 652 - break; 653 - case MC_CMD_PTP_OUT_GET_ATTRIBUTES_SECONDS_NANOSECONDS: 654 - ptp->ns_to_nic_time = efx_ptp_ns_to_s_ns; 655 - ptp->nic_to_kernel_time = efx_ptp_s_ns_to_ktime_correction; 656 - ptp->nic_time.minor_max = 1000000000; 657 - ptp->nic_time.sync_event_minor_shift = 22; 658 699 break; 659 700 case MC_CMD_PTP_OUT_GET_ATTRIBUTES_SECONDS_QTR_NANOSECONDS: 660 701 ptp->ns_to_nic_time = efx_ptp_ns_to_s_qns; ··· 1164 1217 return; 1165 1218 } 1166 1219 1167 - static void efx_ptp_drop_time_expired_events(struct efx_nic *efx) 1168 - { 1169 - struct efx_ptp_data *ptp = efx->ptp_data; 1170 - struct list_head *cursor; 1171 - struct list_head *next; 1172 - 1173 - if (ptp->rx_ts_inline) 1174 - return; 1175 - 1176 - /* Drop time-expired events */ 1177 - spin_lock_bh(&ptp->evt_lock); 1178 - list_for_each_safe(cursor, next, &ptp->evt_list) { 1179 - struct efx_ptp_event_rx *evt; 1180 - 1181 - evt = list_entry(cursor, struct efx_ptp_event_rx, 1182 - link); 1183 - if (time_after(jiffies, evt->expiry)) { 1184 - list_move(&evt->link, &ptp->evt_free_list); 1185 - netif_warn(efx, hw, efx->net_dev, 1186 - "PTP rx event dropped\n"); 1187 - } 1188 - } 1189 - spin_unlock_bh(&ptp->evt_lock); 1190 - } 1191 - 1192 - static enum ptp_packet_state efx_ptp_match_rx(struct efx_nic *efx, 1193 - struct sk_buff *skb) 1194 - { 1195 - struct efx_ptp_data *ptp = efx->ptp_data; 1196 - bool evts_waiting; 1197 - struct list_head *cursor; 1198 - struct list_head *next; 1199 - struct efx_ptp_match *match; 1200 - enum ptp_packet_state rc = PTP_PACKET_STATE_UNMATCHED; 1201 - 1202 - WARN_ON_ONCE(ptp->rx_ts_inline); 1203 - 1204 - spin_lock_bh(&ptp->evt_lock); 1205 - evts_waiting = !list_empty(&ptp->evt_list); 1206 - spin_unlock_bh(&ptp->evt_lock); 1207 - 1208 - if (!evts_waiting) 1209 - return PTP_PACKET_STATE_UNMATCHED; 1210 - 1211 - match = (struct efx_ptp_match *)skb->cb; 1212 - /* Look for a matching timestamp in the event queue */ 1213 - spin_lock_bh(&ptp->evt_lock); 1214 - list_for_each_safe(cursor, next, &ptp->evt_list) { 1215 - struct efx_ptp_event_rx *evt; 1216 - 1217 - evt = list_entry(cursor, struct efx_ptp_event_rx, link); 1218 - if ((evt->seq0 == match->words[0]) && 1219 - (evt->seq1 == match->words[1])) { 1220 - struct skb_shared_hwtstamps *timestamps; 1221 - 1222 - /* Match - add in hardware timestamp */ 1223 - timestamps = skb_hwtstamps(skb); 1224 - timestamps->hwtstamp = evt->hwtimestamp; 1225 - 1226 - match->state = PTP_PACKET_STATE_MATCHED; 1227 - rc = PTP_PACKET_STATE_MATCHED; 1228 - list_move(&evt->link, &ptp->evt_free_list); 1229 - break; 1230 - } 1231 - } 1232 - spin_unlock_bh(&ptp->evt_lock); 1233 - 1234 - return rc; 1235 - } 1236 - 1237 1220 /* Process any queued receive events and corresponding packets 1238 1221 * 1239 1222 * q is returned with all the packets that are ready for delivery. ··· 1178 1301 1179 1302 match = (struct efx_ptp_match *)skb->cb; 1180 1303 if (match->state == PTP_PACKET_STATE_MATCH_UNWANTED) { 1181 - __skb_queue_tail(q, skb); 1182 - } else if (efx_ptp_match_rx(efx, skb) == 1183 - PTP_PACKET_STATE_MATCHED) { 1184 1304 __skb_queue_tail(q, skb); 1185 1305 } else if (time_after(jiffies, match->expiry)) { 1186 1306 match->state = PTP_PACKET_STATE_TIMED_OUT; ··· 1455 1581 static int efx_ptp_stop(struct efx_nic *efx) 1456 1582 { 1457 1583 struct efx_ptp_data *ptp = efx->ptp_data; 1458 - struct list_head *cursor; 1459 - struct list_head *next; 1460 1584 int rc; 1461 1585 1462 1586 if (ptp == NULL) ··· 1468 1596 /* Make sure RX packets are really delivered */ 1469 1597 efx_ptp_deliver_rx_queue(&efx->ptp_data->rxq); 1470 1598 skb_queue_purge(&efx->ptp_data->txq); 1471 - 1472 - /* Drop any pending receive events */ 1473 - spin_lock_bh(&efx->ptp_data->evt_lock); 1474 - list_for_each_safe(cursor, next, &efx->ptp_data->evt_list) { 1475 - list_move(cursor, &efx->ptp_data->evt_free_list); 1476 - } 1477 - spin_unlock_bh(&efx->ptp_data->evt_lock); 1478 1599 1479 1600 return rc; 1480 1601 } ··· 1507 1642 efx_ptp_start(efx); 1508 1643 return; 1509 1644 } 1510 - 1511 - efx_ptp_drop_time_expired_events(efx); 1512 1645 1513 1646 __skb_queue_head_init(&tempq); 1514 1647 efx_ptp_process_events(efx, &tempq); ··· 1556 1693 { 1557 1694 struct efx_ptp_data *ptp; 1558 1695 int rc = 0; 1559 - unsigned int pos; 1560 1696 1561 1697 if (efx->ptp_data) { 1562 1698 efx->ptp_data->channel = channel; ··· 1569 1707 1570 1708 ptp->efx = efx; 1571 1709 ptp->channel = channel; 1572 - ptp->rx_ts_inline = efx_nic_rev(efx) >= EFX_REV_HUNT_A0; 1573 1710 1574 1711 rc = efx_nic_alloc_buffer(efx, &ptp->start, sizeof(int), GFP_KERNEL); 1575 1712 if (rc != 0) ··· 1595 1734 ptp->config.flags = 0; 1596 1735 ptp->config.tx_type = HWTSTAMP_TX_OFF; 1597 1736 ptp->config.rx_filter = HWTSTAMP_FILTER_NONE; 1598 - INIT_LIST_HEAD(&ptp->evt_list); 1599 - INIT_LIST_HEAD(&ptp->evt_free_list); 1600 - spin_lock_init(&ptp->evt_lock); 1601 - for (pos = 0; pos < MAX_RECEIVE_EVENTS; pos++) 1602 - list_add(&ptp->rx_evts[pos].link, &ptp->evt_free_list); 1603 - 1604 1737 INIT_LIST_HEAD(&ptp->rxfilters_mcast); 1605 1738 INIT_LIST_HEAD(&ptp->rxfilters_ucast); 1606 1739 ··· 1734 1879 struct efx_nic *efx = channel->efx; 1735 1880 struct efx_ptp_data *ptp = efx->ptp_data; 1736 1881 struct efx_ptp_match *match = (struct efx_ptp_match *)skb->cb; 1737 - u8 *match_data_012, *match_data_345; 1738 1882 unsigned int version; 1739 1883 u8 *data; 1740 1884 ··· 1749 1895 if (version != PTP_VERSION_V1) { 1750 1896 return false; 1751 1897 } 1752 - 1753 - /* PTP V1 uses all six bytes of the UUID to match the packet 1754 - * to the timestamp 1755 - */ 1756 - match_data_012 = data + PTP_V1_UUID_OFFSET; 1757 - match_data_345 = data + PTP_V1_UUID_OFFSET + 3; 1758 1898 } else { 1759 1899 if (!pskb_may_pull(skb, PTP_V2_MIN_LENGTH)) { 1760 1900 return false; ··· 1757 1909 version = data[PTP_V2_VERSION_OFFSET]; 1758 1910 if ((version & PTP_VERSION_V2_MASK) != PTP_VERSION_V2) { 1759 1911 return false; 1760 - } 1761 - 1762 - /* The original V2 implementation uses bytes 2-7 of 1763 - * the UUID to match the packet to the timestamp. This 1764 - * discards two of the bytes of the MAC address used 1765 - * to create the UUID (SF bug 33070). The PTP V2 1766 - * enhanced mode fixes this issue and uses bytes 0-2 1767 - * and byte 5-7 of the UUID. 1768 - */ 1769 - match_data_345 = data + PTP_V2_UUID_OFFSET + 5; 1770 - if (ptp->mode == MC_CMD_PTP_MODE_V2) { 1771 - match_data_012 = data + PTP_V2_UUID_OFFSET + 2; 1772 - } else { 1773 - match_data_012 = data + PTP_V2_UUID_OFFSET + 0; 1774 - BUG_ON(ptp->mode != MC_CMD_PTP_MODE_V2_ENHANCED); 1775 1912 } 1776 1913 } 1777 1914 ··· 1769 1936 */ 1770 1937 BUILD_BUG_ON(PTP_V1_SEQUENCE_OFFSET != PTP_V2_SEQUENCE_OFFSET); 1771 1938 BUILD_BUG_ON(PTP_V1_SEQUENCE_LENGTH != PTP_V2_SEQUENCE_LENGTH); 1772 - 1773 - /* Extract UUID/Sequence information */ 1774 - match->words[0] = (match_data_012[0] | 1775 - (match_data_012[1] << 8) | 1776 - (match_data_012[2] << 16) | 1777 - (match_data_345[0] << 24)); 1778 - match->words[1] = (match_data_345[1] | 1779 - (match_data_345[2] << 8) | 1780 - (data[PTP_V1_SEQUENCE_OFFSET + 1781 - PTP_V1_SEQUENCE_LENGTH - 1] << 1782 - 16)); 1783 1939 } else { 1784 1940 match->state = PTP_PACKET_STATE_MATCH_UNWANTED; 1785 1941 } ··· 1932 2110 queue_work(ptp->workwq, &ptp->work); 1933 2111 } 1934 2112 1935 - /* Process a completed receive event. Put it on the event queue and 1936 - * start worker thread. This is required because event and their 1937 - * correspoding packets may come in either order. 1938 - */ 1939 - static void ptp_event_rx(struct efx_nic *efx, struct efx_ptp_data *ptp) 1940 - { 1941 - struct efx_ptp_event_rx *evt = NULL; 1942 - 1943 - if (WARN_ON_ONCE(ptp->rx_ts_inline)) 1944 - return; 1945 - 1946 - if (ptp->evt_frag_idx != 3) { 1947 - ptp_event_failure(efx, 3); 1948 - return; 1949 - } 1950 - 1951 - spin_lock_bh(&ptp->evt_lock); 1952 - if (!list_empty(&ptp->evt_free_list)) { 1953 - evt = list_first_entry(&ptp->evt_free_list, 1954 - struct efx_ptp_event_rx, link); 1955 - list_del(&evt->link); 1956 - 1957 - evt->seq0 = EFX_QWORD_FIELD(ptp->evt_frags[2], MCDI_EVENT_DATA); 1958 - evt->seq1 = (EFX_QWORD_FIELD(ptp->evt_frags[2], 1959 - MCDI_EVENT_SRC) | 1960 - (EFX_QWORD_FIELD(ptp->evt_frags[1], 1961 - MCDI_EVENT_SRC) << 8) | 1962 - (EFX_QWORD_FIELD(ptp->evt_frags[0], 1963 - MCDI_EVENT_SRC) << 16)); 1964 - evt->hwtimestamp = efx->ptp_data->nic_to_kernel_time( 1965 - EFX_QWORD_FIELD(ptp->evt_frags[0], MCDI_EVENT_DATA), 1966 - EFX_QWORD_FIELD(ptp->evt_frags[1], MCDI_EVENT_DATA), 1967 - ptp->ts_corrections.ptp_rx); 1968 - evt->expiry = jiffies + msecs_to_jiffies(PKT_EVENT_LIFETIME_MS); 1969 - list_add_tail(&evt->link, &ptp->evt_list); 1970 - 1971 - queue_work(ptp->workwq, &ptp->work); 1972 - } else if (net_ratelimit()) { 1973 - /* Log a rate-limited warning message. */ 1974 - netif_err(efx, rx_err, efx->net_dev, "PTP event queue overflow\n"); 1975 - } 1976 - spin_unlock_bh(&ptp->evt_lock); 1977 - } 1978 - 1979 2113 static void ptp_event_fault(struct efx_nic *efx, struct efx_ptp_data *ptp) 1980 2114 { 1981 2115 int code = EFX_QWORD_FIELD(ptp->evt_frags[0], MCDI_EVENT_DATA); ··· 1978 2200 if (!MCDI_EVENT_FIELD(*ev, CONT)) { 1979 2201 /* Process resulting event */ 1980 2202 switch (code) { 1981 - case MCDI_EVENT_CODE_PTP_RX: 1982 - ptp_event_rx(efx, ptp); 1983 - break; 1984 2203 case MCDI_EVENT_CODE_PTP_FAULT: 1985 2204 ptp_event_fault(efx, ptp); 1986 2205 break;
+1 -6
drivers/net/ethernet/sfc/selftest.c
··· 38 38 /* 39 39 * Loopback test packet structure 40 40 * 41 - * The self-test should stress every RSS vector, and unfortunately 42 - * Falcon only performs RSS on TCP/UDP packets. 41 + * The self-test should stress every RSS vector. 43 42 */ 44 43 struct efx_loopback_payload { 45 44 char pad[2]; /* Ensures ip is 4-byte aligned */ ··· 580 581 return 0; 581 582 } 582 583 583 - /* Wait for link up. On Falcon, we would prefer to rely on efx_monitor, but 584 - * any contention on the mac lock (via e.g. efx_mac_mcast_work) causes it 585 - * to delay and retry. Therefore, it's safer to just poll directly. Wait 586 - * for link up and any faults to dissipate. */ 587 584 static int efx_wait_for_link(struct efx_nic *efx) 588 585 { 589 586 struct efx_link_state *link_state = &efx->link_state;
+1 -44
drivers/net/ethernet/sfc/tx.c
··· 517 517 unsigned index, type; 518 518 519 519 EFX_WARN_ON_PARANOID(!netif_device_present(net_dev)); 520 - 521 520 index = skb_get_queue_mapping(skb); 522 521 type = efx_tx_csum_type_skb(skb); 523 - if (index >= efx->n_tx_channels) { 524 - index -= efx->n_tx_channels; 525 - type |= EFX_TXQ_TYPE_HIGHPRI; 526 - } 527 522 528 523 /* PTP "event" packet */ 529 524 if (unlikely(efx_xmit_with_hwtstamp(skb)) && ··· 598 603 /* Must be inverse of queue lookup in efx_hard_start_xmit() */ 599 604 tx_queue->core_txq = 600 605 netdev_get_tx_queue(efx->net_dev, 601 - tx_queue->channel->channel + 602 - ((tx_queue->type & EFX_TXQ_TYPE_HIGHPRI) ? 603 - efx->n_tx_channels : 0)); 604 - } 605 - 606 - int efx_setup_tc(struct net_device *net_dev, enum tc_setup_type type, 607 - void *type_data) 608 - { 609 - struct efx_nic *efx = efx_netdev_priv(net_dev); 610 - struct tc_mqprio_qopt *mqprio = type_data; 611 - unsigned tc, num_tc; 612 - 613 - if (type != TC_SETUP_QDISC_MQPRIO) 614 - return -EOPNOTSUPP; 615 - 616 - /* Only Siena supported highpri queues */ 617 - if (efx_nic_rev(efx) > EFX_REV_SIENA_A0) 618 - return -EOPNOTSUPP; 619 - 620 - num_tc = mqprio->num_tc; 621 - 622 - if (num_tc > EFX_MAX_TX_TC) 623 - return -EINVAL; 624 - 625 - mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS; 626 - 627 - if (num_tc == net_dev->num_tc) 628 - return 0; 629 - 630 - for (tc = 0; tc < num_tc; tc++) { 631 - net_dev->tc_to_txq[tc].offset = tc * efx->n_tx_channels; 632 - net_dev->tc_to_txq[tc].count = efx->n_tx_channels; 633 - } 634 - 635 - net_dev->num_tc = num_tc; 636 - 637 - return netif_set_real_num_tx_queues(net_dev, 638 - max_t(int, num_tc, 1) * 639 - efx->n_tx_channels); 606 + tx_queue->channel->channel); 640 607 }
+1 -1
drivers/net/ethernet/sfc/tx_tso.c
··· 85 85 prefetch(ptr); 86 86 prefetch(ptr + 0x80); 87 87 88 - ptr = (char *) (((efx_qword_t *)tx_queue->txd.buf.addr) + insert_ptr); 88 + ptr = (char *)(((efx_qword_t *)tx_queue->txd.addr) + insert_ptr); 89 89 prefetch(ptr); 90 90 prefetch(ptr + 0x80); 91 91 }
-252
drivers/net/ethernet/sfc/vfdi.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-only */ 2 - /**************************************************************************** 3 - * Driver for Solarflare network controllers and boards 4 - * Copyright 2010-2012 Solarflare Communications Inc. 5 - */ 6 - #ifndef _VFDI_H 7 - #define _VFDI_H 8 - 9 - /** 10 - * DOC: Virtual Function Driver Interface 11 - * 12 - * This file contains software structures used to form a two way 13 - * communication channel between the VF driver and the PF driver, 14 - * named Virtual Function Driver Interface (VFDI). 15 - * 16 - * For the purposes of VFDI, a page is a memory region with size and 17 - * alignment of 4K. All addresses are DMA addresses to be used within 18 - * the domain of the relevant VF. 19 - * 20 - * The only hardware-defined channels for a VF driver to communicate 21 - * with the PF driver are the event mailboxes (%FR_CZ_USR_EV 22 - * registers). Writing to these registers generates an event with 23 - * EV_CODE = EV_CODE_USR_EV, USER_QID set to the index of the mailbox 24 - * and USER_EV_REG_VALUE set to the value written. The PF driver may 25 - * direct or disable delivery of these events by setting 26 - * %FR_CZ_USR_EV_CFG. 27 - * 28 - * The PF driver can send arbitrary events to arbitrary event queues. 29 - * However, for consistency, VFDI events from the PF are defined to 30 - * follow the same form and be sent to the first event queue assigned 31 - * to the VF while that queue is enabled by the VF driver. 32 - * 33 - * The general form of the variable bits of VFDI events is: 34 - * 35 - * 0 16 24 31 36 - * | DATA | TYPE | SEQ | 37 - * 38 - * SEQ is a sequence number which should be incremented by 1 (modulo 39 - * 256) for each event. The sequence numbers used in each direction 40 - * are independent. 41 - * 42 - * The VF submits requests of type &struct vfdi_req by sending the 43 - * address of the request (ADDR) in a series of 4 events: 44 - * 45 - * 0 16 24 31 46 - * | ADDR[0:15] | VFDI_EV_TYPE_REQ_WORD0 | SEQ | 47 - * | ADDR[16:31] | VFDI_EV_TYPE_REQ_WORD1 | SEQ+1 | 48 - * | ADDR[32:47] | VFDI_EV_TYPE_REQ_WORD2 | SEQ+2 | 49 - * | ADDR[48:63] | VFDI_EV_TYPE_REQ_WORD3 | SEQ+3 | 50 - * 51 - * The address must be page-aligned. After receiving such a valid 52 - * series of events, the PF driver will attempt to read the request 53 - * and write a response to the same address. In case of an invalid 54 - * sequence of events or a DMA error, there will be no response. 55 - * 56 - * The VF driver may request that the PF driver writes status 57 - * information into its domain asynchronously. After writing the 58 - * status, the PF driver will send an event of the form: 59 - * 60 - * 0 16 24 31 61 - * | reserved | VFDI_EV_TYPE_STATUS | SEQ | 62 - * 63 - * In case the VF must be reset for any reason, the PF driver will 64 - * send an event of the form: 65 - * 66 - * 0 16 24 31 67 - * | reserved | VFDI_EV_TYPE_RESET | SEQ | 68 - * 69 - * It is then the responsibility of the VF driver to request 70 - * reinitialisation of its queues. 71 - */ 72 - #define VFDI_EV_SEQ_LBN 24 73 - #define VFDI_EV_SEQ_WIDTH 8 74 - #define VFDI_EV_TYPE_LBN 16 75 - #define VFDI_EV_TYPE_WIDTH 8 76 - #define VFDI_EV_TYPE_REQ_WORD0 0 77 - #define VFDI_EV_TYPE_REQ_WORD1 1 78 - #define VFDI_EV_TYPE_REQ_WORD2 2 79 - #define VFDI_EV_TYPE_REQ_WORD3 3 80 - #define VFDI_EV_TYPE_STATUS 4 81 - #define VFDI_EV_TYPE_RESET 5 82 - #define VFDI_EV_DATA_LBN 0 83 - #define VFDI_EV_DATA_WIDTH 16 84 - 85 - struct vfdi_endpoint { 86 - u8 mac_addr[ETH_ALEN]; 87 - __be16 tci; 88 - }; 89 - 90 - /** 91 - * enum vfdi_op - VFDI operation enumeration 92 - * @VFDI_OP_RESPONSE: Indicates a response to the request. 93 - * @VFDI_OP_INIT_EVQ: Initialize SRAM entries and initialize an EVQ. 94 - * @VFDI_OP_INIT_RXQ: Initialize SRAM entries and initialize an RXQ. 95 - * @VFDI_OP_INIT_TXQ: Initialize SRAM entries and initialize a TXQ. 96 - * @VFDI_OP_FINI_ALL_QUEUES: Flush all queues, finalize all queues, then 97 - * finalize the SRAM entries. 98 - * @VFDI_OP_INSERT_FILTER: Insert a MAC filter targeting the given RXQ. 99 - * @VFDI_OP_REMOVE_ALL_FILTERS: Remove all filters. 100 - * @VFDI_OP_SET_STATUS_PAGE: Set the DMA page(s) used for status updates 101 - * from PF and write the initial status. 102 - * @VFDI_OP_CLEAR_STATUS_PAGE: Clear the DMA page(s) used for status 103 - * updates from PF. 104 - */ 105 - enum vfdi_op { 106 - VFDI_OP_RESPONSE = 0, 107 - VFDI_OP_INIT_EVQ = 1, 108 - VFDI_OP_INIT_RXQ = 2, 109 - VFDI_OP_INIT_TXQ = 3, 110 - VFDI_OP_FINI_ALL_QUEUES = 4, 111 - VFDI_OP_INSERT_FILTER = 5, 112 - VFDI_OP_REMOVE_ALL_FILTERS = 6, 113 - VFDI_OP_SET_STATUS_PAGE = 7, 114 - VFDI_OP_CLEAR_STATUS_PAGE = 8, 115 - VFDI_OP_LIMIT, 116 - }; 117 - 118 - /* Response codes for VFDI operations. Other values may be used in future. */ 119 - #define VFDI_RC_SUCCESS 0 120 - #define VFDI_RC_ENOMEM (-12) 121 - #define VFDI_RC_EINVAL (-22) 122 - #define VFDI_RC_EOPNOTSUPP (-95) 123 - #define VFDI_RC_ETIMEDOUT (-110) 124 - 125 - /** 126 - * struct vfdi_req - Request from VF driver to PF driver 127 - * @op: Operation code or response indicator, taken from &enum vfdi_op. 128 - * @rc: Response code. Set to 0 on success or a negative error code on failure. 129 - * @u.init_evq.index: Index of event queue to create. 130 - * @u.init_evq.buf_count: Number of 4k buffers backing event queue. 131 - * @u.init_evq.addr: Array of length %u.init_evq.buf_count containing DMA 132 - * address of each page backing the event queue. 133 - * @u.init_rxq.index: Index of receive queue to create. 134 - * @u.init_rxq.buf_count: Number of 4k buffers backing receive queue. 135 - * @u.init_rxq.evq: Instance of event queue to target receive events at. 136 - * @u.init_rxq.label: Label used in receive events. 137 - * @u.init_rxq.flags: Unused. 138 - * @u.init_rxq.addr: Array of length %u.init_rxq.buf_count containing DMA 139 - * address of each page backing the receive queue. 140 - * @u.init_txq.index: Index of transmit queue to create. 141 - * @u.init_txq.buf_count: Number of 4k buffers backing transmit queue. 142 - * @u.init_txq.evq: Instance of event queue to target transmit completion 143 - * events at. 144 - * @u.init_txq.label: Label used in transmit completion events. 145 - * @u.init_txq.flags: Checksum offload flags. 146 - * @u.init_txq.addr: Array of length %u.init_txq.buf_count containing DMA 147 - * address of each page backing the transmit queue. 148 - * @u.mac_filter.rxq: Insert MAC filter at VF local address/VLAN targeting 149 - * all traffic at this receive queue. 150 - * @u.mac_filter.flags: MAC filter flags. 151 - * @u.set_status_page.dma_addr: Base address for the &struct vfdi_status. 152 - * This address must be page-aligned and the PF may write up to a 153 - * whole page (allowing for extension of the structure). 154 - * @u.set_status_page.peer_page_count: Number of additional pages the VF 155 - * has provided into which peer addresses may be DMAd. 156 - * @u.set_status_page.peer_page_addr: Array of DMA addresses of pages. 157 - * If the number of peers exceeds 256, then the VF must provide 158 - * additional pages in this array. The PF will then DMA up to 159 - * 512 vfdi_endpoint structures into each page. These addresses 160 - * must be page-aligned. 161 - */ 162 - struct vfdi_req { 163 - u32 op; 164 - u32 reserved1; 165 - s32 rc; 166 - u32 reserved2; 167 - union { 168 - struct { 169 - u32 index; 170 - u32 buf_count; 171 - u64 addr[]; 172 - } init_evq; 173 - struct { 174 - u32 index; 175 - u32 buf_count; 176 - u32 evq; 177 - u32 label; 178 - u32 flags; 179 - #define VFDI_RXQ_FLAG_SCATTER_EN 1 180 - u32 reserved; 181 - u64 addr[]; 182 - } init_rxq; 183 - struct { 184 - u32 index; 185 - u32 buf_count; 186 - u32 evq; 187 - u32 label; 188 - u32 flags; 189 - #define VFDI_TXQ_FLAG_IP_CSUM_DIS 1 190 - #define VFDI_TXQ_FLAG_TCPUDP_CSUM_DIS 2 191 - u32 reserved; 192 - u64 addr[]; 193 - } init_txq; 194 - struct { 195 - u32 rxq; 196 - u32 flags; 197 - #define VFDI_MAC_FILTER_FLAG_RSS 1 198 - #define VFDI_MAC_FILTER_FLAG_SCATTER 2 199 - } mac_filter; 200 - struct { 201 - u64 dma_addr; 202 - u64 peer_page_count; 203 - u64 peer_page_addr[]; 204 - } set_status_page; 205 - } u; 206 - }; 207 - 208 - /** 209 - * struct vfdi_status - Status provided by PF driver to VF driver 210 - * @generation_start: A generation count DMA'd to VF *before* the 211 - * rest of the structure. 212 - * @generation_end: A generation count DMA'd to VF *after* the 213 - * rest of the structure. 214 - * @version: Version of this structure; currently set to 1. Later 215 - * versions must either be layout-compatible or only be sent to VFs 216 - * that specifically request them. 217 - * @length: Total length of this structure including embedded tables 218 - * @vi_scale: log2 the number of VIs available on this VF. This quantity 219 - * is used by the hardware for register decoding. 220 - * @max_tx_channels: The maximum number of transmit queues the VF can use. 221 - * @rss_rxq_count: The number of receive queues present in the shared RSS 222 - * indirection table. 223 - * @peer_count: Total number of peers in the complete peer list. If larger 224 - * than ARRAY_SIZE(%peers), then the VF must provide sufficient 225 - * additional pages each of which is filled with vfdi_endpoint structures. 226 - * @local: The MAC address and outer VLAN tag of *this* VF 227 - * @peers: Table of peer addresses. The @tci fields in these structures 228 - * are currently unused and must be ignored. Additional peers are 229 - * written into any additional pages provided by the VF. 230 - * @timer_quantum_ns: Timer quantum (nominal period between timer ticks) 231 - * for interrupt moderation timers, in nanoseconds. This member is only 232 - * present if @length is sufficiently large. 233 - */ 234 - struct vfdi_status { 235 - u32 generation_start; 236 - u32 generation_end; 237 - u32 version; 238 - u32 length; 239 - u8 vi_scale; 240 - u8 max_tx_channels; 241 - u8 rss_rxq_count; 242 - u8 reserved1; 243 - u16 peer_count; 244 - u16 reserved2; 245 - struct vfdi_endpoint local; 246 - struct vfdi_endpoint peers[256]; 247 - 248 - /* Members below here extend version 1 of this structure */ 249 - u32 timer_quantum_ns; 250 - }; 251 - 252 - #endif
-7
drivers/net/ethernet/sfc/workarounds.h
··· 12 12 * Bug numbers are from Solarflare's Bugzilla. 13 13 */ 14 14 15 - #define EFX_WORKAROUND_SIENA(efx) (efx_nic_rev(efx) == EFX_REV_SIENA_A0) 16 15 #define EFX_WORKAROUND_EF10(efx) (efx_nic_rev(efx) >= EFX_REV_HUNT_A0) 17 - #define EFX_WORKAROUND_10G(efx) 1 18 - 19 - /* Bit-bashed I2C reads cause performance drop */ 20 - #define EFX_WORKAROUND_7884 EFX_WORKAROUND_10G 21 - /* Legacy interrupt storm when interrupt fifo fills */ 22 - #define EFX_WORKAROUND_17213 EFX_WORKAROUND_SIENA 23 16 24 17 /* Lockup when writing event block registers at gen2/gen3 */ 25 18 #define EFX_EF10_WORKAROUND_35388(efx) \