aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbevf
diff options
context:
space:
mode:
authorGreg Rose <gregory.v.rose@intel.com>2010-01-08 21:23:11 -0500
committerDavid S. Miller <davem@davemloft.net>2010-01-10 16:34:20 -0500
commit50d9c84ee522ce6f61cd6a7dfce1b82a260edd3c (patch)
tree051979d4afdc7e8bd1f979485c88599c80e640e1 /drivers/net/ixgbevf
parentc026ca581f22497c42cbe7a2004fa0d5f1bd6c42 (diff)
ixgbevf: Macros, data structures, useful defines and registers
These two headers define the commonly used macros, data structures, register bits and register offsets used by the ixgbevf driver on the 82599 virtual function device Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbevf')
-rw-r--r--drivers/net/ixgbevf/defines.h292
-rw-r--r--drivers/net/ixgbevf/regs.h85
2 files changed, 377 insertions, 0 deletions
diff --git a/drivers/net/ixgbevf/defines.h b/drivers/net/ixgbevf/defines.h
new file mode 100644
index 000000000000..c44fdb05447a
--- /dev/null
+++ b/drivers/net/ixgbevf/defines.h
@@ -0,0 +1,292 @@
1/*******************************************************************************
2
3 Intel 82599 Virtual Function driver
4 Copyright(c) 1999 - 2009 Intel Corporation.
5
6 This program is free software; you can redistribute it and/or modify it
7 under the terms and conditions of the GNU General Public License,
8 version 2, as published by the Free Software Foundation.
9
10 This program is distributed in the hope it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 more details.
14
15 You should have received a copy of the GNU General Public License along with
16 this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
18
19 The full GNU General Public License is included in this distribution in
20 the file called "COPYING".
21
22 Contact Information:
23 e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
24 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
25
26*******************************************************************************/
27
28#ifndef _IXGBEVF_DEFINES_H_
29#define _IXGBEVF_DEFINES_H_
30
31/* Device IDs */
32#define IXGBE_DEV_ID_82599_VF 0x10ED
33
34#define IXGBE_VF_IRQ_CLEAR_MASK 7
35#define IXGBE_VF_MAX_TX_QUEUES 1
36#define IXGBE_VF_MAX_RX_QUEUES 1
37#define IXGBE_ETH_LENGTH_OF_ADDRESS 6
38
39/* Link speed */
40typedef u32 ixgbe_link_speed;
41#define IXGBE_LINK_SPEED_1GB_FULL 0x0020
42#define IXGBE_LINK_SPEED_10GB_FULL 0x0080
43
44#define IXGBE_CTRL_RST 0x04000000 /* Reset (SW) */
45#define IXGBE_RXDCTL_ENABLE 0x02000000 /* Enable specific Rx Queue */
46#define IXGBE_TXDCTL_ENABLE 0x02000000 /* Enable specific Tx Queue */
47#define IXGBE_LINKS_UP 0x40000000
48#define IXGBE_LINKS_SPEED 0x20000000
49
50/* Number of Transmit and Receive Descriptors must be a multiple of 8 */
51#define IXGBE_REQ_TX_DESCRIPTOR_MULTIPLE 8
52#define IXGBE_REQ_RX_DESCRIPTOR_MULTIPLE 8
53#define IXGBE_REQ_TX_BUFFER_GRANULARITY 1024
54
55/* Interrupt Vector Allocation Registers */
56#define IXGBE_IVAR_ALLOC_VAL 0x80 /* Interrupt Allocation valid */
57
58#define IXGBE_VF_INIT_TIMEOUT 200 /* Number of retries to clear RSTI */
59
60/* Receive Config masks */
61#define IXGBE_RXCTRL_RXEN 0x00000001 /* Enable Receiver */
62#define IXGBE_RXCTRL_DMBYPS 0x00000002 /* Descriptor Monitor Bypass */
63#define IXGBE_RXDCTL_ENABLE 0x02000000 /* Enable specific Rx Queue */
64#define IXGBE_RXDCTL_VME 0x40000000 /* VLAN mode enable */
65
66/* DCA Control */
67#define IXGBE_DCA_TXCTRL_TX_WB_RO_EN (1 << 11) /* Tx Desc writeback RO bit */
68
69/* PSRTYPE bit definitions */
70#define IXGBE_PSRTYPE_TCPHDR 0x00000010
71#define IXGBE_PSRTYPE_UDPHDR 0x00000020
72#define IXGBE_PSRTYPE_IPV4HDR 0x00000100
73#define IXGBE_PSRTYPE_IPV6HDR 0x00000200
74#define IXGBE_PSRTYPE_L2HDR 0x00001000
75
76/* SRRCTL bit definitions */
77#define IXGBE_SRRCTL_BSIZEPKT_SHIFT 10 /* so many KBs */
78#define IXGBE_SRRCTL_RDMTS_SHIFT 22
79#define IXGBE_SRRCTL_RDMTS_MASK 0x01C00000
80#define IXGBE_SRRCTL_DROP_EN 0x10000000
81#define IXGBE_SRRCTL_BSIZEPKT_MASK 0x0000007F
82#define IXGBE_SRRCTL_BSIZEHDR_MASK 0x00003F00
83#define IXGBE_SRRCTL_DESCTYPE_LEGACY 0x00000000
84#define IXGBE_SRRCTL_DESCTYPE_ADV_ONEBUF 0x02000000
85#define IXGBE_SRRCTL_DESCTYPE_HDR_SPLIT 0x04000000
86#define IXGBE_SRRCTL_DESCTYPE_HDR_REPLICATION_LARGE_PKT 0x08000000
87#define IXGBE_SRRCTL_DESCTYPE_HDR_SPLIT_ALWAYS 0x0A000000
88#define IXGBE_SRRCTL_DESCTYPE_MASK 0x0E000000
89
90/* Receive Descriptor bit definitions */
91#define IXGBE_RXD_STAT_DD 0x01 /* Descriptor Done */
92#define IXGBE_RXD_STAT_EOP 0x02 /* End of Packet */
93#define IXGBE_RXD_STAT_FLM 0x04 /* FDir Match */
94#define IXGBE_RXD_STAT_VP 0x08 /* IEEE VLAN Packet */
95#define IXGBE_RXDADV_NEXTP_MASK 0x000FFFF0 /* Next Descriptor Index */
96#define IXGBE_RXDADV_NEXTP_SHIFT 0x00000004
97#define IXGBE_RXD_STAT_UDPCS 0x10 /* UDP xsum calculated */
98#define IXGBE_RXD_STAT_L4CS 0x20 /* L4 xsum calculated */
99#define IXGBE_RXD_STAT_IPCS 0x40 /* IP xsum calculated */
100#define IXGBE_RXD_STAT_PIF 0x80 /* passed in-exact filter */
101#define IXGBE_RXD_STAT_CRCV 0x100 /* Speculative CRC Valid */
102#define IXGBE_RXD_STAT_VEXT 0x200 /* 1st VLAN found */
103#define IXGBE_RXD_STAT_UDPV 0x400 /* Valid UDP checksum */
104#define IXGBE_RXD_STAT_DYNINT 0x800 /* Pkt caused INT via DYNINT */
105#define IXGBE_RXD_STAT_TS 0x10000 /* Time Stamp */
106#define IXGBE_RXD_STAT_SECP 0x20000 /* Security Processing */
107#define IXGBE_RXD_STAT_LB 0x40000 /* Loopback Status */
108#define IXGBE_RXD_STAT_ACK 0x8000 /* ACK Packet indication */
109#define IXGBE_RXD_ERR_CE 0x01 /* CRC Error */
110#define IXGBE_RXD_ERR_LE 0x02 /* Length Error */
111#define IXGBE_RXD_ERR_PE 0x08 /* Packet Error */
112#define IXGBE_RXD_ERR_OSE 0x10 /* Oversize Error */
113#define IXGBE_RXD_ERR_USE 0x20 /* Undersize Error */
114#define IXGBE_RXD_ERR_TCPE 0x40 /* TCP/UDP Checksum Error */
115#define IXGBE_RXD_ERR_IPE 0x80 /* IP Checksum Error */
116#define IXGBE_RXDADV_ERR_MASK 0xFFF00000 /* RDESC.ERRORS mask */
117#define IXGBE_RXDADV_ERR_SHIFT 20 /* RDESC.ERRORS shift */
118#define IXGBE_RXDADV_ERR_HBO 0x00800000 /*Header Buffer Overflow */
119#define IXGBE_RXDADV_ERR_CE 0x01000000 /* CRC Error */
120#define IXGBE_RXDADV_ERR_LE 0x02000000 /* Length Error */
121#define IXGBE_RXDADV_ERR_PE 0x08000000 /* Packet Error */
122#define IXGBE_RXDADV_ERR_OSE 0x10000000 /* Oversize Error */
123#define IXGBE_RXDADV_ERR_USE 0x20000000 /* Undersize Error */
124#define IXGBE_RXDADV_ERR_TCPE 0x40000000 /* TCP/UDP Checksum Error */
125#define IXGBE_RXDADV_ERR_IPE 0x80000000 /* IP Checksum Error */
126#define IXGBE_RXD_VLAN_ID_MASK 0x0FFF /* VLAN ID is in lower 12 bits */
127#define IXGBE_RXD_PRI_MASK 0xE000 /* Priority is in upper 3 bits */
128#define IXGBE_RXD_PRI_SHIFT 13
129#define IXGBE_RXD_CFI_MASK 0x1000 /* CFI is bit 12 */
130#define IXGBE_RXD_CFI_SHIFT 12
131
132#define IXGBE_RXDADV_STAT_DD IXGBE_RXD_STAT_DD /* Done */
133#define IXGBE_RXDADV_STAT_EOP IXGBE_RXD_STAT_EOP /* End of Packet */
134#define IXGBE_RXDADV_STAT_FLM IXGBE_RXD_STAT_FLM /* FDir Match */
135#define IXGBE_RXDADV_STAT_VP IXGBE_RXD_STAT_VP /* IEEE VLAN Pkt */
136#define IXGBE_RXDADV_STAT_MASK 0x000FFFFF /* Stat/NEXTP: bit 0-19 */
137#define IXGBE_RXDADV_STAT_FCEOFS 0x00000040 /* FCoE EOF/SOF Stat */
138#define IXGBE_RXDADV_STAT_FCSTAT 0x00000030 /* FCoE Pkt Stat */
139#define IXGBE_RXDADV_STAT_FCSTAT_NOMTCH 0x00000000 /* 00: No Ctxt Match */
140#define IXGBE_RXDADV_STAT_FCSTAT_NODDP 0x00000010 /* 01: Ctxt w/o DDP */
141#define IXGBE_RXDADV_STAT_FCSTAT_FCPRSP 0x00000020 /* 10: Recv. FCP_RSP */
142#define IXGBE_RXDADV_STAT_FCSTAT_DDP 0x00000030 /* 11: Ctxt w/ DDP */
143
144#define IXGBE_RXDADV_RSSTYPE_MASK 0x0000000F
145#define IXGBE_RXDADV_PKTTYPE_MASK 0x0000FFF0
146#define IXGBE_RXDADV_PKTTYPE_MASK_EX 0x0001FFF0
147#define IXGBE_RXDADV_HDRBUFLEN_MASK 0x00007FE0
148#define IXGBE_RXDADV_RSCCNT_MASK 0x001E0000
149#define IXGBE_RXDADV_RSCCNT_SHIFT 17
150#define IXGBE_RXDADV_HDRBUFLEN_SHIFT 5
151#define IXGBE_RXDADV_SPLITHEADER_EN 0x00001000
152#define IXGBE_RXDADV_SPH 0x8000
153
154#define IXGBE_RXD_ERR_FRAME_ERR_MASK ( \
155 IXGBE_RXD_ERR_CE | \
156 IXGBE_RXD_ERR_LE | \
157 IXGBE_RXD_ERR_PE | \
158 IXGBE_RXD_ERR_OSE | \
159 IXGBE_RXD_ERR_USE)
160
161#define IXGBE_RXDADV_ERR_FRAME_ERR_MASK ( \
162 IXGBE_RXDADV_ERR_CE | \
163 IXGBE_RXDADV_ERR_LE | \
164 IXGBE_RXDADV_ERR_PE | \
165 IXGBE_RXDADV_ERR_OSE | \
166 IXGBE_RXDADV_ERR_USE)
167
168#define IXGBE_TXD_POPTS_IXSM 0x01 /* Insert IP checksum */
169#define IXGBE_TXD_POPTS_TXSM 0x02 /* Insert TCP/UDP checksum */
170#define IXGBE_TXD_CMD_EOP 0x01000000 /* End of Packet */
171#define IXGBE_TXD_CMD_IFCS 0x02000000 /* Insert FCS (Ethernet CRC) */
172#define IXGBE_TXD_CMD_IC 0x04000000 /* Insert Checksum */
173#define IXGBE_TXD_CMD_RS 0x08000000 /* Report Status */
174#define IXGBE_TXD_CMD_DEXT 0x20000000 /* Descriptor extension (0 = legacy) */
175#define IXGBE_TXD_CMD_VLE 0x40000000 /* Add VLAN tag */
176#define IXGBE_TXD_STAT_DD 0x00000001 /* Descriptor Done */
177
178/* Transmit Descriptor - Advanced */
179union ixgbe_adv_tx_desc {
180 struct {
181 __le64 buffer_addr; /* Address of descriptor's data buf */
182 __le32 cmd_type_len;
183 __le32 olinfo_status;
184 } read;
185 struct {
186 __le64 rsvd; /* Reserved */
187 __le32 nxtseq_seed;
188 __le32 status;
189 } wb;
190};
191
192/* Receive Descriptor - Advanced */
193union ixgbe_adv_rx_desc {
194 struct {
195 __le64 pkt_addr; /* Packet buffer address */
196 __le64 hdr_addr; /* Header buffer address */
197 } read;
198 struct {
199 struct {
200 union {
201 __le32 data;
202 struct {
203 __le16 pkt_info; /* RSS, Pkt type */
204 __le16 hdr_info; /* Splithdr, hdrlen */
205 } hs_rss;
206 } lo_dword;
207 union {
208 __le32 rss; /* RSS Hash */
209 struct {
210 __le16 ip_id; /* IP id */
211 __le16 csum; /* Packet Checksum */
212 } csum_ip;
213 } hi_dword;
214 } lower;
215 struct {
216 __le32 status_error; /* ext status/error */
217 __le16 length; /* Packet length */
218 __le16 vlan; /* VLAN tag */
219 } upper;
220 } wb; /* writeback */
221};
222
223/* Context descriptors */
224struct ixgbe_adv_tx_context_desc {
225 __le32 vlan_macip_lens;
226 __le32 seqnum_seed;
227 __le32 type_tucmd_mlhl;
228 __le32 mss_l4len_idx;
229};
230
231/* Adv Transmit Descriptor Config Masks */
232#define IXGBE_ADVTXD_DTYP_MASK 0x00F00000 /* DTYP mask */
233#define IXGBE_ADVTXD_DTYP_CTXT 0x00200000 /* Advanced Context Desc */
234#define IXGBE_ADVTXD_DTYP_DATA 0x00300000 /* Advanced Data Descriptor */
235#define IXGBE_ADVTXD_DCMD_EOP IXGBE_TXD_CMD_EOP /* End of Packet */
236#define IXGBE_ADVTXD_DCMD_IFCS IXGBE_TXD_CMD_IFCS /* Insert FCS */
237#define IXGBE_ADVTXD_DCMD_RS IXGBE_TXD_CMD_RS /* Report Status */
238#define IXGBE_ADVTXD_DCMD_DEXT IXGBE_TXD_CMD_DEXT /* Desc ext (1=Adv) */
239#define IXGBE_ADVTXD_DCMD_VLE IXGBE_TXD_CMD_VLE /* VLAN pkt enable */
240#define IXGBE_ADVTXD_DCMD_TSE 0x80000000 /* TCP Seg enable */
241#define IXGBE_ADVTXD_STAT_DD IXGBE_TXD_STAT_DD /* Descriptor Done */
242#define IXGBE_ADVTXD_TUCMD_IPV4 0x00000400 /* IP Packet Type: 1=IPv4 */
243#define IXGBE_ADVTXD_TUCMD_IPV6 0x00000000 /* IP Packet Type: 0=IPv6 */
244#define IXGBE_ADVTXD_TUCMD_L4T_UDP 0x00000000 /* L4 Packet TYPE of UDP */
245#define IXGBE_ADVTXD_TUCMD_L4T_TCP 0x00000800 /* L4 Packet TYPE of TCP */
246#define IXGBE_ADVTXD_TUCMD_L4T_SCTP 0x00001000 /* L4 Packet TYPE of SCTP */
247#define IXGBE_ADVTXD_IDX_SHIFT 4 /* Adv desc Index shift */
248#define IXGBE_ADVTXD_POPTS_SHIFT 8 /* Adv desc POPTS shift */
249#define IXGBE_ADVTXD_POPTS_IXSM (IXGBE_TXD_POPTS_IXSM << \
250 IXGBE_ADVTXD_POPTS_SHIFT)
251#define IXGBE_ADVTXD_POPTS_TXSM (IXGBE_TXD_POPTS_TXSM << \
252 IXGBE_ADVTXD_POPTS_SHIFT)
253#define IXGBE_ADVTXD_PAYLEN_SHIFT 14 /* Adv desc PAYLEN shift */
254#define IXGBE_ADVTXD_MACLEN_SHIFT 9 /* Adv ctxt desc mac len shift */
255#define IXGBE_ADVTXD_VLAN_SHIFT 16 /* Adv ctxt vlan tag shift */
256#define IXGBE_ADVTXD_L4LEN_SHIFT 8 /* Adv ctxt L4LEN shift */
257#define IXGBE_ADVTXD_MSS_SHIFT 16 /* Adv ctxt MSS shift */
258
259/* Interrupt register bitmasks */
260
261/* Extended Interrupt Cause Read */
262#define IXGBE_EICR_RTX_QUEUE 0x0000FFFF /* RTx Queue Interrupt */
263#define IXGBE_EICR_MAILBOX 0x00080000 /* VF to PF Mailbox Interrupt */
264#define IXGBE_EICR_OTHER 0x80000000 /* Interrupt Cause Active */
265
266/* Extended Interrupt Cause Set */
267#define IXGBE_EICS_RTX_QUEUE IXGBE_EICR_RTX_QUEUE /* RTx Queue Interrupt */
268#define IXGBE_EICS_MAILBOX IXGBE_EICR_MAILBOX /* VF to PF Mailbox Int */
269#define IXGBE_EICS_OTHER IXGBE_EICR_OTHER /* INT Cause Active */
270
271/* Extended Interrupt Mask Set */
272#define IXGBE_EIMS_RTX_QUEUE IXGBE_EICR_RTX_QUEUE /* RTx Queue Interrupt */
273#define IXGBE_EIMS_MAILBOX IXGBE_EICR_MAILBOX /* VF to PF Mailbox Int */
274#define IXGBE_EIMS_OTHER IXGBE_EICR_OTHER /* INT Cause Active */
275
276/* Extended Interrupt Mask Clear */
277#define IXGBE_EIMC_RTX_QUEUE IXGBE_EICR_RTX_QUEUE /* RTx Queue Interrupt */
278#define IXGBE_EIMC_MAILBOX IXGBE_EICR_MAILBOX /* VF to PF Mailbox Int */
279#define IXGBE_EIMC_OTHER IXGBE_EICR_OTHER /* INT Cause Active */
280
281#define IXGBE_EIMS_ENABLE_MASK ( \
282 IXGBE_EIMS_RTX_QUEUE | \
283 IXGBE_EIMS_MAILBOX | \
284 IXGBE_EIMS_OTHER)
285
286#define IXGBE_EITR_CNT_WDIS 0x80000000
287
288/* Error Codes */
289#define IXGBE_ERR_INVALID_MAC_ADDR -1
290#define IXGBE_ERR_RESET_FAILED -2
291
292#endif /* _IXGBEVF_DEFINES_H_ */
diff --git a/drivers/net/ixgbevf/regs.h b/drivers/net/ixgbevf/regs.h
new file mode 100644
index 000000000000..12f75960aec1
--- /dev/null
+++ b/drivers/net/ixgbevf/regs.h
@@ -0,0 +1,85 @@
1/*******************************************************************************
2
3 Intel 82599 Virtual Function driver
4 Copyright(c) 1999 - 2009 Intel Corporation.
5
6 This program is free software; you can redistribute it and/or modify it
7 under the terms and conditions of the GNU General Public License,
8 version 2, as published by the Free Software Foundation.
9
10 This program is distributed in the hope it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 more details.
14
15 You should have received a copy of the GNU General Public License along with
16 this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
18
19 The full GNU General Public License is included in this distribution in
20 the file called "COPYING".
21
22 Contact Information:
23 e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
24 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
25
26*******************************************************************************/
27
28#ifndef _IXGBEVF_REGS_H_
29#define _IXGBEVF_REGS_H_
30
31#define IXGBE_VFCTRL 0x00000
32#define IXGBE_VFSTATUS 0x00008
33#define IXGBE_VFLINKS 0x00010
34#define IXGBE_VFRTIMER 0x00048
35#define IXGBE_VFRXMEMWRAP 0x03190
36#define IXGBE_VTEICR 0x00100
37#define IXGBE_VTEICS 0x00104
38#define IXGBE_VTEIMS 0x00108
39#define IXGBE_VTEIMC 0x0010C
40#define IXGBE_VTEIAC 0x00110
41#define IXGBE_VTEIAM 0x00114
42#define IXGBE_VTEITR(x) (0x00820 + (4 * x))
43#define IXGBE_VTIVAR(x) (0x00120 + (4 * x))
44#define IXGBE_VTIVAR_MISC 0x00140
45#define IXGBE_VTRSCINT(x) (0x00180 + (4 * x))
46#define IXGBE_VFRDBAL(x) (0x01000 + (0x40 * x))
47#define IXGBE_VFRDBAH(x) (0x01004 + (0x40 * x))
48#define IXGBE_VFRDLEN(x) (0x01008 + (0x40 * x))
49#define IXGBE_VFRDH(x) (0x01010 + (0x40 * x))
50#define IXGBE_VFRDT(x) (0x01018 + (0x40 * x))
51#define IXGBE_VFRXDCTL(x) (0x01028 + (0x40 * x))
52#define IXGBE_VFSRRCTL(x) (0x01014 + (0x40 * x))
53#define IXGBE_VFRSCCTL(x) (0x0102C + (0x40 * x))
54#define IXGBE_VFPSRTYPE 0x00300
55#define IXGBE_VFTDBAL(x) (0x02000 + (0x40 * x))
56#define IXGBE_VFTDBAH(x) (0x02004 + (0x40 * x))
57#define IXGBE_VFTDLEN(x) (0x02008 + (0x40 * x))
58#define IXGBE_VFTDH(x) (0x02010 + (0x40 * x))
59#define IXGBE_VFTDT(x) (0x02018 + (0x40 * x))
60#define IXGBE_VFTXDCTL(x) (0x02028 + (0x40 * x))
61#define IXGBE_VFTDWBAL(x) (0x02038 + (0x40 * x))
62#define IXGBE_VFTDWBAH(x) (0x0203C + (0x40 * x))
63#define IXGBE_VFDCA_RXCTRL(x) (0x0100C + (0x40 * x))
64#define IXGBE_VFDCA_TXCTRL(x) (0x0200c + (0x40 * x))
65#define IXGBE_VFGPRC 0x0101C
66#define IXGBE_VFGPTC 0x0201C
67#define IXGBE_VFGORC_LSB 0x01020
68#define IXGBE_VFGORC_MSB 0x01024
69#define IXGBE_VFGOTC_LSB 0x02020
70#define IXGBE_VFGOTC_MSB 0x02024
71#define IXGBE_VFMPRC 0x01034
72
73#define IXGBE_WRITE_REG(a, reg, value) writel((value), ((a)->hw_addr + (reg)))
74
75#define IXGBE_READ_REG(a, reg) readl((a)->hw_addr + (reg))
76
77#define IXGBE_WRITE_REG_ARRAY(a, reg, offset, value) ( \
78 writel((value), ((a)->hw_addr + (reg) + ((offset) << 2))))
79
80#define IXGBE_READ_REG_ARRAY(a, reg, offset) ( \
81 readl((a)->hw_addr + (reg) + ((offset) << 2)))
82
83#define IXGBE_WRITE_FLUSH(a) (IXGBE_READ_REG(a, IXGBE_VFSTATUS))
84
85#endif /* _IXGBEVF_REGS_H_ */