1 /****************************************************************************** 2 3 Copyright (c) 2001-2009, Intel Corporation 4 All rights reserved. 5 6 Redistribution and use in source and binary forms, with or without 7 modification, are permitted provided that the following conditions are met: 8 9 1. Redistributions of source code must retain the above copyright notice, 10 this list of conditions and the following disclaimer. 11 12 2. Redistributions in binary form must reproduce the above copyright 13 notice, this list of conditions and the following disclaimer in the 14 documentation and/or other materials provided with the distribution. 15 16 3. Neither the name of the Intel Corporation nor the names of its 17 contributors may be used to endorse or promote products derived from 18 this software without specific prior written permission. 19 20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 24 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 POSSIBILITY OF SUCH DAMAGE. 31 32 ******************************************************************************/ 33 /*$FreeBSD$*/ 34 35 #ifndef _E1000_82575_H_ 36 #define _E1000_82575_H_ 37 38 #define ID_LED_DEFAULT_82575_SERDES ((ID_LED_DEF1_DEF2 << 12) | \ 39 (ID_LED_DEF1_DEF2 << 8) | \ 40 (ID_LED_DEF1_DEF2 << 4) | \ 41 (ID_LED_OFF1_ON2)) 42 /* 43 * Receive Address Register Count 44 * Number of high/low register pairs in the RAR. The RAR (Receive Address 45 * Registers) holds the directed and multicast addresses that we monitor. 46 * These entries are also used for MAC-based filtering. 47 */ 48 /* 49 * For 82576, there are an additional set of RARs that begin at an offset 50 * separate from the first set of RARs. 51 */ 52 #define E1000_RAR_ENTRIES_82575 16 53 #define E1000_RAR_ENTRIES_82576 24 54 55 #ifdef E1000_BIT_FIELDS 56 struct e1000_adv_data_desc { 57 u64 buffer_addr; /* Address of the descriptor's data buffer */ 58 union { 59 u32 data; 60 struct { 61 u32 datalen :16; /* Data buffer length */ 62 u32 rsvd :4; 63 u32 dtyp :4; /* Descriptor type */ 64 u32 dcmd :8; /* Descriptor command */ 65 } config; 66 } lower; 67 union { 68 u32 data; 69 struct { 70 u32 status :4; /* Descriptor status */ 71 u32 idx :4; 72 u32 popts :6; /* Packet Options */ 73 u32 paylen :18; /* Payload length */ 74 } options; 75 } upper; 76 }; 77 78 #define E1000_TXD_DTYP_ADV_C 0x2 /* Advanced Context Descriptor */ 79 #define E1000_TXD_DTYP_ADV_D 0x3 /* Advanced Data Descriptor */ 80 #define E1000_ADV_TXD_CMD_DEXT 0x20 /* Descriptor extension (0 = legacy) */ 81 #define E1000_ADV_TUCMD_IPV4 0x2 /* IP Packet Type: 1=IPv4 */ 82 #define E1000_ADV_TUCMD_IPV6 0x0 /* IP Packet Type: 0=IPv6 */ 83 #define E1000_ADV_TUCMD_L4T_UDP 0x0 /* L4 Packet TYPE of UDP */ 84 #define E1000_ADV_TUCMD_L4T_TCP 0x4 /* L4 Packet TYPE of TCP */ 85 #define E1000_ADV_TUCMD_MKRREQ 0x10 /* Indicates markers are required */ 86 #define E1000_ADV_DCMD_EOP 0x1 /* End of Packet */ 87 #define E1000_ADV_DCMD_IFCS 0x2 /* Insert FCS (Ethernet CRC) */ 88 #define E1000_ADV_DCMD_RS 0x8 /* Report Status */ 89 #define E1000_ADV_DCMD_VLE 0x40 /* Add VLAN tag */ 90 #define E1000_ADV_DCMD_TSE 0x80 /* TCP Seg enable */ 91 /* Extended Device Control */ 92 #define E1000_CTRL_EXT_NSICR 0x00000001 /* Disable Intr Clear all on read */ 93 94 struct e1000_adv_context_desc { 95 union { 96 u32 ip_config; 97 struct { 98 u32 iplen :9; 99 u32 maclen :7; 100 u32 vlan_tag :16; 101 } fields; 102 } ip_setup; 103 u32 seq_num; 104 union { 105 u64 l4_config; 106 struct { 107 u32 mkrloc :9; 108 u32 tucmd :11; 109 u32 dtyp :4; 110 u32 adv :8; 111 u32 rsvd :4; 112 u32 idx :4; 113 u32 l4len :8; 114 u32 mss :16; 115 } fields; 116 } l4_setup; 117 }; 118 #endif 119 120 /* SRRCTL bit definitions */ 121 #define E1000_SRRCTL_BSIZEPKT_SHIFT 10 /* Shift _right_ */ 122 #define E1000_SRRCTL_BSIZEHDRSIZE_MASK 0x00000F00 123 #define E1000_SRRCTL_BSIZEHDRSIZE_SHIFT 2 /* Shift _left_ */ 124 #define E1000_SRRCTL_DESCTYPE_LEGACY 0x00000000 125 #define E1000_SRRCTL_DESCTYPE_ADV_ONEBUF 0x02000000 126 #define E1000_SRRCTL_DESCTYPE_HDR_SPLIT 0x04000000 127 #define E1000_SRRCTL_DESCTYPE_HDR_SPLIT_ALWAYS 0x0A000000 128 #define E1000_SRRCTL_DESCTYPE_HDR_REPLICATION 0x06000000 129 #define E1000_SRRCTL_DESCTYPE_HDR_REPLICATION_LARGE_PKT 0x08000000 130 #define E1000_SRRCTL_DESCTYPE_MASK 0x0E000000 131 #define E1000_SRRCTL_DROP_EN 0x80000000 132 133 #define E1000_SRRCTL_BSIZEPKT_MASK 0x0000007F 134 #define E1000_SRRCTL_BSIZEHDR_MASK 0x00003F00 135 136 #define E1000_TX_HEAD_WB_ENABLE 0x1 137 #define E1000_TX_SEQNUM_WB_ENABLE 0x2 138 139 #define E1000_MRQC_ENABLE_RSS_4Q 0x00000002 140 #define E1000_MRQC_ENABLE_VMDQ 0x00000003 141 #define E1000_MRQC_ENABLE_VMDQ_RSS_2Q 0x00000005 142 #define E1000_MRQC_RSS_FIELD_IPV4_UDP 0x00400000 143 #define E1000_MRQC_RSS_FIELD_IPV6_UDP 0x00800000 144 #define E1000_MRQC_RSS_FIELD_IPV6_UDP_EX 0x01000000 145 146 #define E1000_VMRCTL_MIRROR_PORT_SHIFT 8 147 #define E1000_VMRCTL_MIRROR_DSTPORT_MASK (7 << E1000_VMRCTL_MIRROR_PORT_SHIFT) 148 #define E1000_VMRCTL_POOL_MIRROR_ENABLE (1 << 0) 149 #define E1000_VMRCTL_UPLINK_MIRROR_ENABLE (1 << 1) 150 #define E1000_VMRCTL_DOWNLINK_MIRROR_ENABLE (1 << 2) 151 152 #define E1000_EICR_TX_QUEUE ( \ 153 E1000_EICR_TX_QUEUE0 | \ 154 E1000_EICR_TX_QUEUE1 | \ 155 E1000_EICR_TX_QUEUE2 | \ 156 E1000_EICR_TX_QUEUE3) 157 158 #define E1000_EICR_RX_QUEUE ( \ 159 E1000_EICR_RX_QUEUE0 | \ 160 E1000_EICR_RX_QUEUE1 | \ 161 E1000_EICR_RX_QUEUE2 | \ 162 E1000_EICR_RX_QUEUE3) 163 164 #define E1000_EIMS_RX_QUEUE E1000_EICR_RX_QUEUE 165 #define E1000_EIMS_TX_QUEUE E1000_EICR_TX_QUEUE 166 167 #define EIMS_ENABLE_MASK ( \ 168 E1000_EIMS_RX_QUEUE | \ 169 E1000_EIMS_TX_QUEUE | \ 170 E1000_EIMS_TCP_TIMER | \ 171 E1000_EIMS_OTHER) 172 173 /* Immediate Interrupt Rx (A.K.A. Low Latency Interrupt) */ 174 #define E1000_IMIR_PORT_IM_EN 0x00010000 /* TCP port enable */ 175 #define E1000_IMIR_PORT_BP 0x00020000 /* TCP port check bypass */ 176 #define E1000_IMIREXT_SIZE_BP 0x00001000 /* Packet size bypass */ 177 #define E1000_IMIREXT_CTRL_URG 0x00002000 /* Check URG bit in header */ 178 #define E1000_IMIREXT_CTRL_ACK 0x00004000 /* Check ACK bit in header */ 179 #define E1000_IMIREXT_CTRL_PSH 0x00008000 /* Check PSH bit in header */ 180 #define E1000_IMIREXT_CTRL_RST 0x00010000 /* Check RST bit in header */ 181 #define E1000_IMIREXT_CTRL_SYN 0x00020000 /* Check SYN bit in header */ 182 #define E1000_IMIREXT_CTRL_FIN 0x00040000 /* Check FIN bit in header */ 183 #define E1000_IMIREXT_CTRL_BP 0x00080000 /* Bypass check of ctrl bits */ 184 185 /* Receive Descriptor - Advanced */ 186 union e1000_adv_rx_desc { 187 struct { 188 u64 pkt_addr; /* Packet buffer address */ 189 u64 hdr_addr; /* Header buffer address */ 190 } read; 191 struct { 192 struct { 193 union { 194 u32 data; 195 struct { 196 u16 pkt_info; /* RSS type, Packet type */ 197 u16 hdr_info; /* Split Header, 198 * header buffer length */ 199 } hs_rss; 200 } lo_dword; 201 union { 202 u32 rss; /* RSS Hash */ 203 struct { 204 u16 ip_id; /* IP id */ 205 u16 csum; /* Packet Checksum */ 206 } csum_ip; 207 } hi_dword; 208 } lower; 209 struct { 210 u32 status_error; /* ext status/error */ 211 u16 length; /* Packet length */ 212 u16 vlan; /* VLAN tag */ 213 } upper; 214 } wb; /* writeback */ 215 }; 216 217 #define E1000_RXDADV_RSSTYPE_MASK 0x0000000F 218 #define E1000_RXDADV_RSSTYPE_SHIFT 12 219 #define E1000_RXDADV_HDRBUFLEN_MASK 0x7FE0 220 #define E1000_RXDADV_HDRBUFLEN_SHIFT 5 221 #define E1000_RXDADV_SPLITHEADER_EN 0x00001000 222 #define E1000_RXDADV_SPH 0x8000 223 #define E1000_RXDADV_ERR_HBO 0x00800000 224 225 /* RSS Hash results */ 226 #define E1000_RXDADV_RSSTYPE_NONE 0x00000000 227 #define E1000_RXDADV_RSSTYPE_IPV4_TCP 0x00000001 228 #define E1000_RXDADV_RSSTYPE_IPV4 0x00000002 229 #define E1000_RXDADV_RSSTYPE_IPV6_TCP 0x00000003 230 #define E1000_RXDADV_RSSTYPE_IPV6_EX 0x00000004 231 #define E1000_RXDADV_RSSTYPE_IPV6 0x00000005 232 #define E1000_RXDADV_RSSTYPE_IPV6_TCP_EX 0x00000006 233 #define E1000_RXDADV_RSSTYPE_IPV4_UDP 0x00000007 234 #define E1000_RXDADV_RSSTYPE_IPV6_UDP 0x00000008 235 #define E1000_RXDADV_RSSTYPE_IPV6_UDP_EX 0x00000009 236 237 /* RSS Packet Types as indicated in the receive descriptor */ 238 #define E1000_RXDADV_PKTTYPE_NONE 0x00000000 239 #define E1000_RXDADV_PKTTYPE_IPV4 0x00000010 /* IPV4 hdr present */ 240 #define E1000_RXDADV_PKTTYPE_IPV4_EX 0x00000020 /* IPV4 hdr + extensions */ 241 #define E1000_RXDADV_PKTTYPE_IPV6 0x00000040 /* IPV6 hdr present */ 242 #define E1000_RXDADV_PKTTYPE_IPV6_EX 0x00000080 /* IPV6 hdr + extensions */ 243 #define E1000_RXDADV_PKTTYPE_TCP 0x00000100 /* TCP hdr present */ 244 #define E1000_RXDADV_PKTTYPE_UDP 0x00000200 /* UDP hdr present */ 245 #define E1000_RXDADV_PKTTYPE_SCTP 0x00000400 /* SCTP hdr present */ 246 #define E1000_RXDADV_PKTTYPE_NFS 0x00000800 /* NFS hdr present */ 247 248 #define E1000_RXDADV_PKTTYPE_IPSEC_ESP 0x00001000 /* IPSec ESP */ 249 #define E1000_RXDADV_PKTTYPE_IPSEC_AH 0x00002000 /* IPSec AH */ 250 #define E1000_RXDADV_PKTTYPE_LINKSEC 0x00004000 /* LinkSec Encap */ 251 #define E1000_RXDADV_PKTTYPE_ETQF 0x00008000 /* PKTTYPE is ETQF index */ 252 #define E1000_RXDADV_PKTTYPE_ETQF_MASK 0x00000070 /* ETQF has 8 indices */ 253 #define E1000_RXDADV_PKTTYPE_ETQF_SHIFT 4 /* Right-shift 4 bits */ 254 255 /* LinkSec results */ 256 /* Security Processing bit Indication */ 257 #define E1000_RXDADV_LNKSEC_STATUS_SECP 0x00020000 258 #define E1000_RXDADV_LNKSEC_ERROR_BIT_MASK 0x18000000 259 #define E1000_RXDADV_LNKSEC_ERROR_NO_SA_MATCH 0x08000000 260 #define E1000_RXDADV_LNKSEC_ERROR_REPLAY_ERROR 0x10000000 261 #define E1000_RXDADV_LNKSEC_ERROR_BAD_SIG 0x18000000 262 263 #define E1000_RXDADV_IPSEC_STATUS_SECP 0x00020000 264 #define E1000_RXDADV_IPSEC_ERROR_BIT_MASK 0x18000000 265 #define E1000_RXDADV_IPSEC_ERROR_INVALID_PROTOCOL 0x08000000 266 #define E1000_RXDADV_IPSEC_ERROR_INVALID_LENGTH 0x10000000 267 #define E1000_RXDADV_IPSEC_ERROR_AUTHENTICATION_FAILED 0x18000000 268 269 /* Transmit Descriptor - Advanced */ 270 union e1000_adv_tx_desc { 271 struct { 272 u64 buffer_addr; /* Address of descriptor's data buf */ 273 u32 cmd_type_len; 274 u32 olinfo_status; 275 } read; 276 struct { 277 u64 rsvd; /* Reserved */ 278 u32 nxtseq_seed; 279 u32 status; 280 } wb; 281 }; 282 283 /* Adv Transmit Descriptor Config Masks */ 284 #define E1000_ADVTXD_DTYP_CTXT 0x00200000 /* Advanced Context Descriptor */ 285 #define E1000_ADVTXD_DTYP_DATA 0x00300000 /* Advanced Data Descriptor */ 286 #define E1000_ADVTXD_DCMD_EOP 0x01000000 /* End of Packet */ 287 #define E1000_ADVTXD_DCMD_IFCS 0x02000000 /* Insert FCS (Ethernet CRC) */ 288 #define E1000_ADVTXD_DCMD_RS 0x08000000 /* Report Status */ 289 #define E1000_ADVTXD_DCMD_DDTYP_ISCSI 0x10000000 /* DDP hdr type or iSCSI */ 290 #define E1000_ADVTXD_DCMD_DEXT 0x20000000 /* Descriptor extension (1=Adv) */ 291 #define E1000_ADVTXD_DCMD_VLE 0x40000000 /* VLAN pkt enable */ 292 #define E1000_ADVTXD_DCMD_TSE 0x80000000 /* TCP Seg enable */ 293 #define E1000_ADVTXD_MAC_LINKSEC 0x00040000 /* Apply LinkSec on packet */ 294 #define E1000_ADVTXD_MAC_TSTAMP 0x00080000 /* IEEE1588 Timestamp packet */ 295 #define E1000_ADVTXD_STAT_SN_CRC 0x00000002 /* NXTSEQ/SEED present in WB */ 296 #define E1000_ADVTXD_IDX_SHIFT 4 /* Adv desc Index shift */ 297 #define E1000_ADVTXD_POPTS_ISCO_1ST 0x00000000 /* 1st TSO of iSCSI PDU */ 298 #define E1000_ADVTXD_POPTS_ISCO_MDL 0x00000800 /* Middle TSO of iSCSI PDU */ 299 #define E1000_ADVTXD_POPTS_ISCO_LAST 0x00001000 /* Last TSO of iSCSI PDU */ 300 #define E1000_ADVTXD_POPTS_ISCO_FULL 0x00001800 /* 1st&Last TSO-full iSCSI PDU*/ 301 #define E1000_ADVTXD_POPTS_IPSEC 0x00000400 /* IPSec offload request */ 302 #define E1000_ADVTXD_PAYLEN_SHIFT 14 /* Adv desc PAYLEN shift */ 303 304 /* Context descriptors */ 305 struct e1000_adv_tx_context_desc { 306 u32 vlan_macip_lens; 307 u32 seqnum_seed; 308 u32 type_tucmd_mlhl; 309 u32 mss_l4len_idx; 310 }; 311 312 #define E1000_ADVTXD_MACLEN_SHIFT 9 /* Adv ctxt desc mac len shift */ 313 #define E1000_ADVTXD_VLAN_SHIFT 16 /* Adv ctxt vlan tag shift */ 314 #define E1000_ADVTXD_TUCMD_IPV4 0x00000400 /* IP Packet Type: 1=IPv4 */ 315 #define E1000_ADVTXD_TUCMD_IPV6 0x00000000 /* IP Packet Type: 0=IPv6 */ 316 #define E1000_ADVTXD_TUCMD_L4T_UDP 0x00000000 /* L4 Packet TYPE of UDP */ 317 #define E1000_ADVTXD_TUCMD_L4T_TCP 0x00000800 /* L4 Packet TYPE of TCP */ 318 #define E1000_ADVTXD_TUCMD_L4T_SCTP 0x00001000 /* L4 Packet TYPE of SCTP */ 319 #define E1000_ADVTXD_TUCMD_IPSEC_TYPE_ESP 0x00002000 /* IPSec Type ESP */ 320 /* IPSec Encrypt Enable for ESP */ 321 #define E1000_ADVTXD_TUCMD_IPSEC_ENCRYPT_EN 0x00004000 322 #define E1000_ADVTXD_TUCMD_MKRREQ 0x00002000 /* Req requires Markers and CRC */ 323 #define E1000_ADVTXD_L4LEN_SHIFT 8 /* Adv ctxt L4LEN shift */ 324 #define E1000_ADVTXD_MSS_SHIFT 16 /* Adv ctxt MSS shift */ 325 /* Adv ctxt IPSec SA IDX mask */ 326 #define E1000_ADVTXD_IPSEC_SA_INDEX_MASK 0x000000FF 327 /* Adv ctxt IPSec ESP len mask */ 328 #define E1000_ADVTXD_IPSEC_ESP_LEN_MASK 0x000000FF 329 330 /* Additional Transmit Descriptor Control definitions */ 331 #define E1000_TXDCTL_QUEUE_ENABLE 0x02000000 /* Enable specific Tx Queue */ 332 #define E1000_TXDCTL_SWFLSH 0x04000000 /* Tx Desc. write-back flushing */ 333 /* Tx Queue Arbitration Priority 0=low, 1=high */ 334 #define E1000_TXDCTL_PRIORITY 0x08000000 335 336 /* Additional Receive Descriptor Control definitions */ 337 #define E1000_RXDCTL_QUEUE_ENABLE 0x02000000 /* Enable specific Rx Queue */ 338 #define E1000_RXDCTL_SWFLSH 0x04000000 /* Rx Desc. write-back flushing */ 339 340 /* Direct Cache Access (DCA) definitions */ 341 #define E1000_DCA_CTRL_DCA_ENABLE 0x00000000 /* DCA Enable */ 342 #define E1000_DCA_CTRL_DCA_DISABLE 0x00000001 /* DCA Disable */ 343 344 #define E1000_DCA_CTRL_DCA_MODE_CB1 0x00 /* DCA Mode CB1 */ 345 #define E1000_DCA_CTRL_DCA_MODE_CB2 0x02 /* DCA Mode CB2 */ 346 347 #define E1000_DCA_RXCTRL_CPUID_MASK 0x0000001F /* Rx CPUID Mask */ 348 #define E1000_DCA_RXCTRL_DESC_DCA_EN (1 << 5) /* DCA Rx Desc enable */ 349 #define E1000_DCA_RXCTRL_HEAD_DCA_EN (1 << 6) /* DCA Rx Desc header enable */ 350 #define E1000_DCA_RXCTRL_DATA_DCA_EN (1 << 7) /* DCA Rx Desc payload enable */ 351 352 #define E1000_DCA_TXCTRL_CPUID_MASK 0x0000001F /* Tx CPUID Mask */ 353 #define E1000_DCA_TXCTRL_DESC_DCA_EN (1 << 5) /* DCA Tx Desc enable */ 354 #define E1000_DCA_TXCTRL_TX_WB_RO_EN (1 << 11) /* Tx Desc writeback RO bit */ 355 356 #define E1000_DCA_TXCTRL_CPUID_MASK_82576 0xFF000000 /* Tx CPUID Mask */ 357 #define E1000_DCA_RXCTRL_CPUID_MASK_82576 0xFF000000 /* Rx CPUID Mask */ 358 #define E1000_DCA_TXCTRL_CPUID_SHIFT_82576 24 /* Tx CPUID */ 359 #define E1000_DCA_RXCTRL_CPUID_SHIFT_82576 24 /* Rx CPUID */ 360 361 /* Additional interrupt register bit definitions */ 362 #define E1000_ICR_LSECPNS 0x00000020 /* PN threshold - server */ 363 #define E1000_IMS_LSECPNS E1000_ICR_LSECPNS /* PN threshold - server */ 364 #define E1000_ICS_LSECPNS E1000_ICR_LSECPNS /* PN threshold - server */ 365 366 /* ETQF register bit definitions */ 367 #define E1000_ETQF_FILTER_ENABLE (1 << 26) 368 #define E1000_ETQF_IMM_INT (1 << 29) 369 #define E1000_ETQF_1588 (1 << 30) 370 #define E1000_ETQF_QUEUE_ENABLE (1 << 31) 371 /* 372 * ETQF filter list: one static filter per filter consumer. This is 373 * to avoid filter collisions later. Add new filters 374 * here!! 375 * 376 * Current filters: 377 * EAPOL 802.1x (0x888e): Filter 0 378 */ 379 #define E1000_ETQF_FILTER_EAPOL 0 380 381 #define E1000_NVM_APME_82575 0x0400 382 #define MAX_NUM_VFS 8 383 384 #define E1000_DTXSWC_MAC_SPOOF_MASK 0x000000FF /* Per VF MAC spoof control */ 385 #define E1000_DTXSWC_VLAN_SPOOF_MASK 0x0000FF00 /* Per VF VLAN spoof control */ 386 #define E1000_DTXSWC_LLE_MASK 0x00FF0000 /* Per VF Local LB enables */ 387 #define E1000_DTXSWC_VLAN_SPOOF_SHIFT 8 388 #define E1000_DTXSWC_LLE_SHIFT 16 389 #define E1000_DTXSWC_VMDQ_LOOPBACK_EN (1 << 31) /* global VF LB enable */ 390 391 /* Easy defines for setting default pool, would normally be left a zero */ 392 #define E1000_VT_CTL_DEFAULT_POOL_SHIFT 7 393 #define E1000_VT_CTL_DEFAULT_POOL_MASK (0x7 << E1000_VT_CTL_DEFAULT_POOL_SHIFT) 394 395 /* Other useful VMD_CTL register defines */ 396 #define E1000_VT_CTL_IGNORE_MAC (1 << 28) 397 #define E1000_VT_CTL_DISABLE_DEF_POOL (1 << 29) 398 #define E1000_VT_CTL_VM_REPL_EN (1 << 30) 399 400 /* Per VM Offload register setup */ 401 #define E1000_VMOLR_RLPML_MASK 0x00003FFF /* Long Packet Maximum Length mask */ 402 #define E1000_VMOLR_LPE 0x00010000 /* Accept Long packet */ 403 #define E1000_VMOLR_RSSE 0x00020000 /* Enable RSS */ 404 #define E1000_VMOLR_AUPE 0x01000000 /* Accept untagged packets */ 405 #define E1000_VMOLR_ROMPE 0x02000000 /* Accept overflow multicast */ 406 #define E1000_VMOLR_ROPE 0x04000000 /* Accept overflow unicast */ 407 #define E1000_VMOLR_BAM 0x08000000 /* Accept Broadcast packets */ 408 #define E1000_VMOLR_MPME 0x10000000 /* Multicast promiscuous mode */ 409 #define E1000_VMOLR_STRVLAN 0x40000000 /* Vlan stripping enable */ 410 #define E1000_VMOLR_STRCRC 0x80000000 /* CRC stripping enable */ 411 412 #define E1000_VLVF_ARRAY_SIZE 32 413 #define E1000_VLVF_VLANID_MASK 0x00000FFF 414 #define E1000_VLVF_POOLSEL_SHIFT 12 415 #define E1000_VLVF_POOLSEL_MASK (0xFF << E1000_VLVF_POOLSEL_SHIFT) 416 #define E1000_VLVF_LVLAN 0x00100000 417 #define E1000_VLVF_VLANID_ENABLE 0x80000000 418 419 #define E1000_VF_INIT_TIMEOUT 200 /* Number of retries to clear RSTI */ 420 421 #define E1000_IOVCTL 0x05BBC 422 #define E1000_IOVCTL_REUSE_VFQ 0x00000001 423 424 #define E1000_RPLOLR_STRVLAN 0x40000000 425 #define E1000_RPLOLR_STRCRC 0x80000000 426 427 #define ALL_QUEUES 0xFFFF 428 429 void e1000_vmdq_set_loopback_pf(struct e1000_hw *hw, bool enable); 430 void e1000_vmdq_set_replication_pf(struct e1000_hw *hw, bool enable); 431 #endif /* _E1000_82575_H_ */ 432