-
Notifications
You must be signed in to change notification settings - Fork 0
/
ixgbevf.c
181 lines (148 loc) · 4.27 KB
/
ixgbevf.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
/* Copyright (c) 2013 Intel Corporation */
#include <stdio.h>
#include "internal.h"
int
ixgbevf_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
u32 *regs_buff = (u32 *)regs->data;
u8 version = (u8)(regs->version >> 24);
u8 i;
if (version == 0)
return -1;
fprintf(stdout,
"0x00000: VFCTRL (VF Control Register) (Write Only) N/A\n");
fprintf(stdout,
"0x00008: VFSTATUS (VF Status Register) 0x%08X\n",
regs_buff[1]);
fprintf(stdout,
"0x00010: VFLINKS (VF Link Status Register) 0x%08X\n",
regs_buff[2]);
fprintf(stdout,
"0x03190: VFRXMEMWRAP (Rx Packet Buffer Flush Detect) 0x%08X\n",
regs_buff[3]);
fprintf(stdout,
"0x00048: VFFRTIMER (VF Free Running Timer) 0x%08X\n",
regs_buff[4]);
fprintf(stdout,
"0x00100: VFEICR (VF Extended Interrupt Cause) 0x%08X\n",
regs_buff[5]);
fprintf(stdout,
"0x00104: VFEICS (VF Extended Interrupt Cause Set) 0x%08X\n",
regs_buff[6]);
fprintf(stdout,
"0x00108: VFEIMS (VF Extended Interrupt Mask Set) 0x%08X\n",
regs_buff[7]);
fprintf(stdout,
"0x0010C: VFEIMC (VF Extended Interrupt Mask Clear) 0x%08X\n",
regs_buff[8]);
fprintf(stdout,
"0x00110: VFEIAC (VF Extended Interrupt Auto Clear) 0x%08X\n",
regs_buff[9]);
fprintf(stdout,
"0x00114: VFEIAM (VF Extended Interrupt Auto Mask) 0x%08X\n",
regs_buff[10]);
fprintf(stdout,
"0x00820: VFEITR(0) (VF Extended Interrupt Throttle) 0x%08X\n",
regs_buff[11]);
fprintf(stdout,
"0x00120: VFIVAR(0) (VF Interrupt Vector Allocation) 0x%08X\n",
regs_buff[12]);
fprintf(stdout,
"0x00140: VFIVAR_MISC (VF Interrupt Vector Misc) 0x%08X\n",
regs_buff[13]);
fprintf(stdout,
"0x00104: VFPSRTYPE (VF Replication Packet Split Type) 0x%08X\n",
regs_buff[28]);
for (i = 0; i < 2; i++)
fprintf(stdout,
"0x%05x: VFRDBAL(%d) (VF Rx Desc. Base Addr Low %d) 0x%08X\n",
0x1000 + 0x40*i,
i, i,
regs_buff[14+i]);
for (i = 0; i < 2; i++)
fprintf(stdout,
"0x%05x: VFRDBAH(%d) (VF Rx Desc. Base Addr High %d) 0x%08X\n",
0x1004 + 0x40*i,
i, i,
regs_buff[16+i]);
for (i = 0; i < 2; i++)
fprintf(stdout,
"0x%05x: VFRDLEN(%d) (VF Rx Desc. Length %d) 0x%08X\n",
0x1008 + 0x40*i,
i, i,
regs_buff[18+i]);
for (i = 0; i < 2; i++)
fprintf(stdout,
"0x%05x: VFRDH(%d) (VF Rx Desc. Head %d) 0x%08X\n",
0x1010 + 0x40*i,
i, i,
regs_buff[20+i]);
for (i = 0; i < 2; i++)
fprintf(stdout,
"0x%05x: VFRDT(%d) (VF Rx Desc. Tail %d) 0x%08X\n",
0x1018 + 0x40*i,
i, i,
regs_buff[22+i]);
for (i = 0; i < 2; i++)
fprintf(stdout,
"0x%05x: VFRDT(%d) (VF Rx Desc. Control %d), 0x%08X\n",
0x1028 + 0x40*i,
i, i,
regs_buff[24+i]);
for (i = 0; i < 2; i++)
fprintf(stdout,
"0x%05x: VFSRRCTL(%d) (VF Split Rx Control %d) 0x%08X\n",
0x1014 + 0x40*i,
i, i,
regs_buff[26+i]);
for (i = 0; i < 2; i++)
fprintf(stdout,
"0x%05x: VFTDBAL(%d) (VF Tx Desc. Base Addr Low %d) 0x%08X\n",
0x2000 + 0x40*i,
i, i,
regs_buff[29+i]);
for (i = 0; i < 2; i++)
fprintf(stdout,
"0x%05x: VFTDBAH(%d) (VF Tx Desc. Base Addr High %d) 0x%08X\n",
0x2004 + 0x40*i,
i, i,
regs_buff[31+i]);
for (i = 0; i < 2; i++)
fprintf(stdout,
"0x%05x: VFTDLEN(%d) (VF Tx Desc. Length %d) 0x%08X\n",
0x2008 + 0x40*i,
i, i,
regs_buff[33+i]);
for (i = 0; i < 2; i++)
fprintf(stdout,
"0x%05x: VFTDH(%d) (VF Tx Desc. Head %d) 0x%08X\n",
0x2010 + 0x40*i,
i, i,
regs_buff[35+i]);
for (i = 0; i < 2; i++)
fprintf(stdout,
"0x%05x: VFTDT(%d) (VF Tx Desc. Tail %d) 0x%08X\n",
0x2018 + 0x40*i,
i, i,
regs_buff[37+i]);
for (i = 0; i < 2; i++)
fprintf(stdout,
"0x%05x: VFTDT(%d) (VF Tx Desc. Control %d) 0x%08X\n",
0x2028 + 0x40*i,
i, i,
regs_buff[39+i]);
for (i = 0; i < 2; i++)
fprintf(stdout,
"0x%05x: VFTDWBAL(%d) (VF Tx Desc. Write Back Addr Lo %d) 0x%08X\n",
0x2038 + 0x40*i,
i, i,
regs_buff[41+i]);
for (i = 0; i < 2; i++)
fprintf(stdout,
"0x%05x: VFTDWBAH(%d) (VF Tx Desc. Write Back Addr Hi %d) 0x%08X\n",
0x203C + 0x40*i,
i, i,
regs_buff[43+i]);
return 0;
}