1d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck/******************************************************************************* 2d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 3d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck Intel(R) 82576 Virtual Function Linux driver 42a06ed9297e927bb928897661940c47ea4f41707Mitch A Williams Copyright(c) 2009 - 2012 Intel Corporation. 5d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 6d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck This program is free software; you can redistribute it and/or modify it 7d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck under the terms and conditions of the GNU General Public License, 8d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck version 2, as published by the Free Software Foundation. 9d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 10d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck This program is distributed in the hope it will be useful, but WITHOUT 11d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck more details. 14d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 15d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck You should have received a copy of the GNU General Public License along with 16d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck this program; if not, write to the Free Software Foundation, Inc., 17d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. 18d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 19d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck The full GNU General Public License is included in this distribution in 20d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck the file called "COPYING". 21d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 22d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck Contact Information: 23d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> 24d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 25d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 26d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck*******************************************************************************/ 27d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 28d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#ifndef _E1000_VF_H_ 29d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#define _E1000_VF_H_ 30d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 31d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#include <linux/pci.h> 32d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#include <linux/delay.h> 33d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#include <linux/interrupt.h> 34d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#include <linux/if_ether.h> 35d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 36d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#include "regs.h" 37d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#include "defines.h" 38d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 39d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyckstruct e1000_hw; 40d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 41d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#define E1000_DEV_ID_82576_VF 0x10CA 42031d7952ee63e1aa679f7e87700e3281f4de4ba2Williams, Mitch A#define E1000_DEV_ID_I350_VF 0x1520 43d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#define E1000_REVISION_0 0 44d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#define E1000_REVISION_1 1 45d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#define E1000_REVISION_2 2 46d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#define E1000_REVISION_3 3 47d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#define E1000_REVISION_4 4 48d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 49d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#define E1000_FUNC_0 0 50d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#define E1000_FUNC_1 1 51d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 52d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck/* 53d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck * Receive Address Register Count 54d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck * Number of high/low register pairs in the RAR. The RAR (Receive Address 55d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck * Registers) holds the directed and multicast addresses that we monitor. 56d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck * These entries are also used for MAC-based filtering. 57d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck */ 58d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#define E1000_RAR_ENTRIES_VF 1 59d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 60d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck/* Receive Descriptor - Advanced */ 61d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyckunion e1000_adv_rx_desc { 62d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck struct { 63d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u64 pkt_addr; /* Packet buffer address */ 64d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u64 hdr_addr; /* Header buffer address */ 65d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck } read; 66d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck struct { 67d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck struct { 68d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck union { 69d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 data; 70d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck struct { 71d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u16 pkt_info; /* RSS/Packet type */ 72d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u16 hdr_info; /* Split Header, 73d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck * hdr buffer length */ 74d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck } hs_rss; 75d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck } lo_dword; 76d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck union { 77d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 rss; /* RSS Hash */ 78d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck struct { 79d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u16 ip_id; /* IP id */ 80d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u16 csum; /* Packet Checksum */ 81d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck } csum_ip; 82d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck } hi_dword; 83d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck } lower; 84d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck struct { 85d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 status_error; /* ext status/error */ 86d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u16 length; /* Packet length */ 87d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u16 vlan; /* VLAN tag */ 88d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck } upper; 89d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck } wb; /* writeback */ 90d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck}; 91d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 92d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#define E1000_RXDADV_HDRBUFLEN_MASK 0x7FE0 93d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#define E1000_RXDADV_HDRBUFLEN_SHIFT 5 94d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 95d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck/* Transmit Descriptor - Advanced */ 96d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyckunion e1000_adv_tx_desc { 97d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck struct { 98d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u64 buffer_addr; /* Address of descriptor's data buf */ 99d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 cmd_type_len; 100d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 olinfo_status; 101d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck } read; 102d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck struct { 103d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u64 rsvd; /* Reserved */ 104d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 nxtseq_seed; 105d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 status; 106d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck } wb; 107d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck}; 108d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 109d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck/* Adv Transmit Descriptor Config Masks */ 110d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#define E1000_ADVTXD_DTYP_CTXT 0x00200000 /* Advanced Context Descriptor */ 111d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#define E1000_ADVTXD_DTYP_DATA 0x00300000 /* Advanced Data Descriptor */ 112d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#define E1000_ADVTXD_DCMD_EOP 0x01000000 /* End of Packet */ 113d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#define E1000_ADVTXD_DCMD_IFCS 0x02000000 /* Insert FCS (Ethernet CRC) */ 114d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#define E1000_ADVTXD_DCMD_RS 0x08000000 /* Report Status */ 115d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#define E1000_ADVTXD_DCMD_DEXT 0x20000000 /* Descriptor extension (1=Adv) */ 116d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#define E1000_ADVTXD_DCMD_VLE 0x40000000 /* VLAN pkt enable */ 117d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#define E1000_ADVTXD_DCMD_TSE 0x80000000 /* TCP Seg enable */ 118d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#define E1000_ADVTXD_PAYLEN_SHIFT 14 /* Adv desc PAYLEN shift */ 119d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 120d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck/* Context descriptors */ 121d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyckstruct e1000_adv_tx_context_desc { 122d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 vlan_macip_lens; 123d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 seqnum_seed; 124d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 type_tucmd_mlhl; 125d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 mss_l4len_idx; 126d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck}; 127d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 128d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#define E1000_ADVTXD_MACLEN_SHIFT 9 /* Adv ctxt desc mac len shift */ 129d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#define E1000_ADVTXD_TUCMD_IPV4 0x00000400 /* IP Packet Type: 1=IPv4 */ 130d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#define E1000_ADVTXD_TUCMD_L4T_TCP 0x00000800 /* L4 Packet TYPE of TCP */ 131d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#define E1000_ADVTXD_L4LEN_SHIFT 8 /* Adv ctxt L4LEN shift */ 132d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#define E1000_ADVTXD_MSS_SHIFT 16 /* Adv ctxt MSS shift */ 133d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 134d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyckenum e1000_mac_type { 135d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck e1000_undefined = 0, 136d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck e1000_vfadapt, 137031d7952ee63e1aa679f7e87700e3281f4de4ba2Williams, Mitch A e1000_vfadapt_i350, 138d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck e1000_num_macs /* List is 1-based, so subtract 1 for true count. */ 139d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck}; 140d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 141d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyckstruct e1000_vf_stats { 142d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u64 base_gprc; 143d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u64 base_gptc; 144d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u64 base_gorc; 145d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u64 base_gotc; 146d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u64 base_mprc; 147d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u64 base_gotlbc; 148d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u64 base_gptlbc; 149d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u64 base_gorlbc; 150d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u64 base_gprlbc; 151d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 152d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 last_gprc; 153d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 last_gptc; 154d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 last_gorc; 155d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 last_gotc; 156d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 last_mprc; 157d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 last_gotlbc; 158d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 last_gptlbc; 159d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 last_gorlbc; 160d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 last_gprlbc; 161d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 162d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u64 gprc; 163d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u64 gptc; 164d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u64 gorc; 165d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u64 gotc; 166d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u64 mprc; 167d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u64 gotlbc; 168d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u64 gptlbc; 169d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u64 gorlbc; 170d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u64 gprlbc; 171d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck}; 172d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 173d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#include "mbx.h" 174d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 175d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyckstruct e1000_mac_operations { 176d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck /* Function pointers for the MAC. */ 177d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck s32 (*init_params)(struct e1000_hw *); 178d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck s32 (*check_for_link)(struct e1000_hw *); 179d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck void (*clear_vfta)(struct e1000_hw *); 180d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck s32 (*get_bus_info)(struct e1000_hw *); 181d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck s32 (*get_link_up_info)(struct e1000_hw *, u16 *, u16 *); 182d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck void (*update_mc_addr_list)(struct e1000_hw *, u8 *, u32, u32, u32); 183d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck s32 (*reset_hw)(struct e1000_hw *); 184d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck s32 (*init_hw)(struct e1000_hw *); 185d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck s32 (*setup_link)(struct e1000_hw *); 186d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck void (*write_vfta)(struct e1000_hw *, u32, u32); 187d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck void (*mta_set)(struct e1000_hw *, u32); 188d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck void (*rar_set)(struct e1000_hw *, u8*, u32); 189d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck s32 (*read_mac_addr)(struct e1000_hw *); 190d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck s32 (*set_vfta)(struct e1000_hw *, u16, bool); 191d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck}; 192d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 193d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyckstruct e1000_mac_info { 194d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck struct e1000_mac_operations ops; 195d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u8 addr[6]; 196d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u8 perm_addr[6]; 197d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 198d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck enum e1000_mac_type type; 199d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 200d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u16 mta_reg_count; 201d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u16 rar_entry_count; 202d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 203d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck bool get_link_status; 204d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck}; 205d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 206d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyckstruct e1000_mbx_operations { 207d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck s32 (*init_params)(struct e1000_hw *hw); 208d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck s32 (*read)(struct e1000_hw *, u32 *, u16); 209d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck s32 (*write)(struct e1000_hw *, u32 *, u16); 210d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck s32 (*read_posted)(struct e1000_hw *, u32 *, u16); 211d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck s32 (*write_posted)(struct e1000_hw *, u32 *, u16); 212d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck s32 (*check_for_msg)(struct e1000_hw *); 213d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck s32 (*check_for_ack)(struct e1000_hw *); 214d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck s32 (*check_for_rst)(struct e1000_hw *); 215d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck}; 216d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 217d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyckstruct e1000_mbx_stats { 218d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 msgs_tx; 219d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 msgs_rx; 220d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 221d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 acks; 222d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 reqs; 223d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 rsts; 224d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck}; 225d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 226d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyckstruct e1000_mbx_info { 227d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck struct e1000_mbx_operations ops; 228d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck struct e1000_mbx_stats stats; 229d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 timeout; 230d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 usec_delay; 231d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u16 size; 232d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck}; 233d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 234d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyckstruct e1000_dev_spec_vf { 235d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 vf_number; 236d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u32 v2p_mailbox; 237d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck}; 238d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 239d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyckstruct e1000_hw { 240d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck void *back; 241d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 242d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u8 __iomem *hw_addr; 243d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u8 __iomem *flash_address; 244d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck unsigned long io_base; 245d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 246d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck struct e1000_mac_info mac; 247d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck struct e1000_mbx_info mbx; 248d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 249d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck union { 250d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck struct e1000_dev_spec_vf vf; 251d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck } dev_spec; 252d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 253d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u16 device_id; 254d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u16 subsystem_vendor_id; 255d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u16 subsystem_device_id; 256d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u16 vendor_id; 257d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 258d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck u8 revision_id; 259d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck}; 260d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 261d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck/* These functions must be implemented by drivers */ 262d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyckvoid e1000_rlpml_set_vf(struct e1000_hw *, u16); 263d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyckvoid e1000_init_function_pointers_vf(struct e1000_hw *hw); 264d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 265d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck 266d4e0fe01a38a073568aee541a0247fe734095979Alexander Duyck#endif /* _E1000_VF_H_ */ 267