Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
041110a4
Commit
041110a4
authored
Dec 25, 2010
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net-next-2.6
parents
a1a5da57
2316aa2a
Changes
36
Show whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
410 additions
and
164 deletions
+410
-164
Documentation/networking/e100.txt
Documentation/networking/e100.txt
+5
-14
Documentation/networking/e1000.txt
Documentation/networking/e1000.txt
+3
-3
Documentation/networking/e1000e.txt
Documentation/networking/e1000e.txt
+7
-7
Documentation/networking/igb.txt
Documentation/networking/igb.txt
+3
-3
Documentation/networking/igbvf.txt
Documentation/networking/igbvf.txt
+2
-2
Documentation/networking/ixgb.txt
Documentation/networking/ixgb.txt
+5
-5
Documentation/networking/ixgbe.txt
Documentation/networking/ixgbe.txt
+4
-4
drivers/net/e1000e/es2lan.c
drivers/net/e1000e/es2lan.c
+4
-4
drivers/net/e1000e/ethtool.c
drivers/net/e1000e/ethtool.c
+61
-57
drivers/net/e1000e/ich8lan.c
drivers/net/e1000e/ich8lan.c
+2
-3
drivers/net/e1000e/lib.c
drivers/net/e1000e/lib.c
+2
-4
drivers/net/e1000e/netdev.c
drivers/net/e1000e/netdev.c
+8
-13
drivers/net/e1000e/phy.c
drivers/net/e1000e/phy.c
+12
-13
drivers/net/igb/e1000_82575.c
drivers/net/igb/e1000_82575.c
+36
-1
drivers/net/igb/e1000_82575.h
drivers/net/igb/e1000_82575.h
+5
-0
drivers/net/igb/e1000_hw.h
drivers/net/igb/e1000_hw.h
+4
-2
drivers/net/igb/e1000_regs.h
drivers/net/igb/e1000_regs.h
+1
-0
drivers/net/igb/igb.h
drivers/net/igb/igb.h
+1
-0
drivers/net/igb/igb_main.c
drivers/net/igb/igb_main.c
+67
-7
drivers/net/igbvf/igbvf.h
drivers/net/igbvf/igbvf.h
+1
-0
drivers/net/igbvf/netdev.c
drivers/net/igbvf/netdev.c
+9
-0
drivers/net/igbvf/vf.c
drivers/net/igbvf/vf.c
+2
-2
drivers/net/igbvf/vf.h
drivers/net/igbvf/vf.h
+2
-0
drivers/net/ixgbe/ixgbe_82599.c
drivers/net/ixgbe/ixgbe_82599.c
+2
-0
drivers/net/ixgbe/ixgbe_common.c
drivers/net/ixgbe/ixgbe_common.c
+64
-0
drivers/net/ixgbe/ixgbe_common.h
drivers/net/ixgbe/ixgbe_common.h
+2
-0
drivers/net/ixgbe/ixgbe_main.c
drivers/net/ixgbe/ixgbe_main.c
+25
-1
drivers/net/ixgbe/ixgbe_mbx.c
drivers/net/ixgbe/ixgbe_mbx.c
+3
-1
drivers/net/ixgbe/ixgbe_sriov.c
drivers/net/ixgbe/ixgbe_sriov.c
+39
-13
drivers/net/ixgbe/ixgbe_type.h
drivers/net/ixgbe/ixgbe_type.h
+12
-1
drivers/net/ixgbe/ixgbe_x540.c
drivers/net/ixgbe/ixgbe_x540.c
+2
-0
drivers/net/ixgbevf/defines.h
drivers/net/ixgbevf/defines.h
+1
-0
drivers/net/ixgbevf/ixgbevf.h
drivers/net/ixgbevf/ixgbevf.h
+3
-1
drivers/net/ixgbevf/ixgbevf_main.c
drivers/net/ixgbevf/ixgbevf_main.c
+5
-2
drivers/net/ixgbevf/vf.c
drivers/net/ixgbevf/vf.c
+5
-1
drivers/net/ixgbevf/vf.h
drivers/net/ixgbevf/vf.h
+1
-0
No files found.
Documentation/networking/e100.txt
View file @
041110a4
...
@@ -72,7 +72,7 @@ Tx Descriptors: Number of transmit descriptors. A transmit descriptor is a data
...
@@ -72,7 +72,7 @@ Tx Descriptors: Number of transmit descriptors. A transmit descriptor is a data
ethtool -G eth? tx n, where n is the number of desired tx descriptors.
ethtool -G eth? tx n, where n is the number of desired tx descriptors.
Speed/Duplex: The driver auto-negotiates the link speed and duplex settings by
Speed/Duplex: The driver auto-negotiates the link speed and duplex settings by
default.
Ethtool
can be used as follows to force speed/duplex.
default.
The ethtool utility
can be used as follows to force speed/duplex.
ethtool -s eth? autoneg off speed {10|100} duplex {full|half}
ethtool -s eth? autoneg off speed {10|100} duplex {full|half}
...
@@ -126,30 +126,21 @@ Additional Configurations
...
@@ -126,30 +126,21 @@ Additional Configurations
-------
-------
The driver utilizes the ethtool interface for driver configuration and
The driver utilizes the ethtool interface for driver configuration and
diagnostics, as well as displaying statistical information.
E
thtool
diagnostics, as well as displaying statistical information.
The e
thtool
version 1.6 or later is required for this functionality.
version 1.6 or later is required for this functionality.
The latest release of ethtool can be found from
The latest release of ethtool can be found from
http://sourceforge.net/projects/gkernel.
http://ftp.kernel.org/pub/software/network/ethtool/
NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support
for a more complete ethtool feature set can be enabled by upgrading
ethtool to ethtool-1.8.1.
Enabling Wake on LAN* (WoL)
Enabling Wake on LAN* (WoL)
---------------------------
---------------------------
WoL is provided through the Ethtool* utility. Ethtool is included with Red
WoL is provided through the ethtool* utility. For instructions on enabling
Hat* 8.0. For other Linux distributions, download and install Ethtool from
WoL with ethtool, refer to the ethtool man page.
the following website: http://sourceforge.net/projects/gkernel.
For instructions on enabling WoL with Ethtool, refer to the Ethtool man page.
WoL will be enabled on the system during the next shut down or reboot. For
WoL will be enabled on the system during the next shut down or reboot. For
this driver version, in order to enable WoL, the e100 driver must be
this driver version, in order to enable WoL, the e100 driver must be
loaded when shutting down or rebooting the system.
loaded when shutting down or rebooting the system.
NAPI
NAPI
----
----
...
...
Documentation/networking/e1000.txt
View file @
041110a4
...
@@ -431,15 +431,15 @@ Additional Configurations
...
@@ -431,15 +431,15 @@ Additional Configurations
Ethtool
Ethtool
-------
-------
The driver utilizes the ethtool interface for driver configuration and
The driver utilizes the ethtool interface for driver configuration and
diagnostics, as well as displaying statistical information.
E
thtool
diagnostics, as well as displaying statistical information.
The e
thtool
version 1.6 or later is required for this functionality.
version 1.6 or later is required for this functionality.
The latest release of ethtool can be found from
The latest release of ethtool can be found from
http://
sourceforge.net/projects/gkernel.
http://
ftp.kernel.org/pub/software/network/ethtool/
Enabling Wake on LAN* (WoL)
Enabling Wake on LAN* (WoL)
---------------------------
---------------------------
WoL is configured through the
E
thtool* utility.
WoL is configured through the
e
thtool* utility.
WoL will be enabled on the system during the next shut down or reboot.
WoL will be enabled on the system during the next shut down or reboot.
For this driver version, in order to enable WoL, the e1000 driver must be
For this driver version, in order to enable WoL, the e1000 driver must be
...
...
Documentation/networking/e1000e.txt
View file @
041110a4
...
@@ -269,26 +269,26 @@ Additional Configurations
...
@@ -269,26 +269,26 @@ Additional Configurations
-------
-------
The driver utilizes the ethtool interface for driver configuration and
The driver utilizes the ethtool interface for driver configuration and
diagnostics, as well as displaying statistical information. We
diagnostics, as well as displaying statistical information. We
strongly recommend downloading the latest version of
E
thtool at:
strongly recommend downloading the latest version of
e
thtool at:
http://
sourceforge.net/projects/gkernel.
http://
ftp.kernel.org/pub/software/network/ethtool/
Speed and Duplex
Speed and Duplex
----------------
----------------
Speed and Duplex are configured through the
E
thtool* utility. For
Speed and Duplex are configured through the
e
thtool* utility. For
instructions, refer to the
E
thtool man page.
instructions, refer to the
e
thtool man page.
Enabling Wake on LAN* (WoL)
Enabling Wake on LAN* (WoL)
---------------------------
---------------------------
WoL is configured through the
E
thtool* utility. For instructions on
WoL is configured through the
e
thtool* utility. For instructions on
enabling WoL with
Ethtool, refer to the E
thtool man page.
enabling WoL with
ethtool, refer to the e
thtool man page.
WoL will be enabled on the system during the next shut down or reboot.
WoL will be enabled on the system during the next shut down or reboot.
For this driver version, in order to enable WoL, the e1000e driver must be
For this driver version, in order to enable WoL, the e1000e driver must be
loaded when shutting down or rebooting the system.
loaded when shutting down or rebooting the system.
In most cases Wake On LAN is only supported on port A for multiple port
In most cases Wake On LAN is only supported on port A for multiple port
adapters. To verify if a port supports Wake on Lan run
E
thtool eth<X>.
adapters. To verify if a port supports Wake on Lan run
e
thtool eth<X>.
Support
Support
=======
=======
...
...
Documentation/networking/igb.txt
View file @
041110a4
...
@@ -62,15 +62,15 @@ Additional Configurations
...
@@ -62,15 +62,15 @@ Additional Configurations
-------
-------
The driver utilizes the ethtool interface for driver configuration and
The driver utilizes the ethtool interface for driver configuration and
diagnostics, as well as displaying statistical information. The latest
diagnostics, as well as displaying statistical information. The latest
version of
E
thtool can be found at:
version of
e
thtool can be found at:
http://ftp.kernel.org/pub/software/network/ethtool/
http://ftp.kernel.org/pub/software/network/ethtool/
Enabling Wake on LAN* (WoL)
Enabling Wake on LAN* (WoL)
---------------------------
---------------------------
WoL is configured through the
E
thtool* utility.
WoL is configured through the
e
thtool* utility.
For instructions on enabling WoL with
Ethtool, refer to the E
thtool man page.
For instructions on enabling WoL with
ethtool, refer to the e
thtool man page.
WoL will be enabled on the system during the next shut down or reboot.
WoL will be enabled on the system during the next shut down or reboot.
For this driver version, in order to enable WoL, the igb driver must be
For this driver version, in order to enable WoL, the igb driver must be
...
...
Documentation/networking/igbvf.txt
View file @
041110a4
...
@@ -58,11 +58,11 @@ Additional Configurations
...
@@ -58,11 +58,11 @@ Additional Configurations
Ethtool
Ethtool
-------
-------
The driver utilizes the ethtool interface for driver configuration and
The driver utilizes the ethtool interface for driver configuration and
diagnostics, as well as displaying statistical information.
E
thtool
diagnostics, as well as displaying statistical information.
The e
thtool
version 3.0 or later is required for this functionality, although we
version 3.0 or later is required for this functionality, although we
strongly recommend downloading the latest version at:
strongly recommend downloading the latest version at:
http://
sourceforge.net/projects/gkernel.
http://
ftp.kernel.org/pub/software/network/ethtool/
Support
Support
=======
=======
...
...
Documentation/networking/ixgb.txt
View file @
041110a4
...
@@ -309,15 +309,15 @@ Additional Configurations
...
@@ -309,15 +309,15 @@ Additional Configurations
Ethtool
Ethtool
-------
-------
The driver utilizes the ethtool interface for driver configuration and
The driver utilizes the ethtool interface for driver configuration and
diagnostics, as well as displaying statistical information.
E
thtool
diagnostics, as well as displaying statistical information.
The e
thtool
version 1.6 or later is required for this functionality.
version 1.6 or later is required for this functionality.
The latest release of ethtool can be found from
The latest release of ethtool can be found from
http://
sourceforge.net/projects/gkernel
http://
ftp.kernel.org/pub/software/network/ethtool/
NOTE:
Ethtool 1.6 only supports a limited set of ethtool options. Support
NOTE:
The ethtool version 1.6 only supports a limited set of ethtool options.
for a more complete ethtool feature set can be enabled by upgrading
Support for a more complete ethtool feature set can be enabled by
to the latest version.
upgrading
to the latest version.
NAPI
NAPI
...
...
Documentation/networking/ixgbe.txt
View file @
041110a4
...
@@ -34,7 +34,7 @@ is an Intel(R) Ethernet Server Adapter X520-2, then it only supports Intel
...
@@ -34,7 +34,7 @@ is an Intel(R) Ethernet Server Adapter X520-2, then it only supports Intel
optics and/or the direct attach cables listed below.
optics and/or the direct attach cables listed below.
When 82599-based SFP+ devices are connected back to back, they should be set to
When 82599-based SFP+ devices are connected back to back, they should be set to
the same Speed setting via
E
thtool. Results may vary if you mix speed settings.
the same Speed setting via
e
thtool. Results may vary if you mix speed settings.
82598-based adapters support all passive direct attach cables that comply
82598-based adapters support all passive direct attach cables that comply
with SFF-8431 v4.1 and SFF-8472 v10.4 specifications. Active direct attach
with SFF-8431 v4.1 and SFF-8472 v10.4 specifications. Active direct attach
cables are not supported.
cables are not supported.
...
@@ -110,7 +110,7 @@ threshold. When rx is enabled, the transmit unit will halt for the time delay
...
@@ -110,7 +110,7 @@ threshold. When rx is enabled, the transmit unit will halt for the time delay
specified when a PAUSE frame is received.
specified when a PAUSE frame is received.
Flow Control is enabled by default. If you want to disable a flow control
Flow Control is enabled by default. If you want to disable a flow control
capable link partner, use
E
thtool:
capable link partner, use
e
thtool:
ethtool -A eth? autoneg off RX off TX off
ethtool -A eth? autoneg off RX off TX off
...
@@ -181,10 +181,10 @@ Additional Configurations
...
@@ -181,10 +181,10 @@ Additional Configurations
-------
-------
The driver utilizes the ethtool interface for driver configuration and
The driver utilizes the ethtool interface for driver configuration and
diagnostics, as well as displaying statistical information. The latest
diagnostics, as well as displaying statistical information. The latest
E
thtool version is required for this functionality.
e
thtool version is required for this functionality.
The latest release of ethtool can be found from
The latest release of ethtool can be found from
http://
sourceforge.net/projects/gkernel.
http://
ftp.kernel.org/pub/software/network/ethtool/
FCoE
FCoE
----
----
...
...
drivers/net/e1000e/es2lan.c
View file @
041110a4
...
@@ -100,8 +100,8 @@
...
@@ -100,8 +100,8 @@
* with a lower bound at "index" and the upper bound at
* with a lower bound at "index" and the upper bound at
* "index + 5".
* "index + 5".
*/
*/
static
const
u16
e1000_gg82563_cable_length_table
[]
=
static
const
u16
e1000_gg82563_cable_length_table
[]
=
{
{
0
,
60
,
115
,
150
,
150
,
60
,
115
,
150
,
180
,
180
,
0xFF
};
0
,
60
,
115
,
150
,
150
,
60
,
115
,
150
,
180
,
180
,
0xFF
};
#define GG82563_CABLE_LENGTH_TABLE_SIZE \
#define GG82563_CABLE_LENGTH_TABLE_SIZE \
ARRAY_SIZE(e1000_gg82563_cable_length_table)
ARRAY_SIZE(e1000_gg82563_cable_length_table)
...
@@ -426,8 +426,8 @@ static void e1000_release_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask)
...
@@ -426,8 +426,8 @@ static void e1000_release_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask)
{
{
u32
swfw_sync
;
u32
swfw_sync
;
while
(
e1000e_get_hw_semaphore
(
hw
)
!=
0
)
;
while
(
e1000e_get_hw_semaphore
(
hw
)
!=
0
)
/* Empty */
;
/* Empty */
swfw_sync
=
er32
(
SW_FW_SYNC
);
swfw_sync
=
er32
(
SW_FW_SYNC
);
swfw_sync
&=
~
mask
;
swfw_sync
&=
~
mask
;
...
...
drivers/net/e1000e/ethtool.c
View file @
041110a4
...
@@ -45,63 +45,67 @@ struct e1000_stats {
...
@@ -45,63 +45,67 @@ struct e1000_stats {
int
stat_offset
;
int
stat_offset
;
};
};
#define E1000_STAT(m) E1000_STATS, \
#define E1000_STAT(str, m) { \
sizeof(((struct e1000_adapter *)0)->m), \
.stat_string = str, \
offsetof(struct e1000_adapter, m)
.type = E1000_STATS, \
#define E1000_NETDEV_STAT(m) NETDEV_STATS, \
.sizeof_stat = sizeof(((struct e1000_adapter *)0)->m), \
sizeof(((struct net_device *)0)->m), \
.stat_offset = offsetof(struct e1000_adapter, m) }
offsetof(struct net_device, m)
#define E1000_NETDEV_STAT(str, m) { \
.stat_string = str, \
.type = NETDEV_STATS, \
.sizeof_stat = sizeof(((struct net_device *)0)->m), \
.stat_offset = offsetof(struct net_device, m) }
static
const
struct
e1000_stats
e1000_gstrings_stats
[]
=
{
static
const
struct
e1000_stats
e1000_gstrings_stats
[]
=
{
{
"rx_packets"
,
E1000_STAT
(
stats
.
gprc
)
}
,
E1000_STAT
(
"rx_packets"
,
stats
.
gprc
)
,
{
"tx_packets"
,
E1000_STAT
(
stats
.
gptc
)
}
,
E1000_STAT
(
"tx_packets"
,
stats
.
gptc
)
,
{
"rx_bytes"
,
E1000_STAT
(
stats
.
gorc
)
}
,
E1000_STAT
(
"rx_bytes"
,
stats
.
gorc
)
,
{
"tx_bytes"
,
E1000_STAT
(
stats
.
gotc
)
}
,
E1000_STAT
(
"tx_bytes"
,
stats
.
gotc
)
,
{
"rx_broadcast"
,
E1000_STAT
(
stats
.
bprc
)
}
,
E1000_STAT
(
"rx_broadcast"
,
stats
.
bprc
)
,
{
"tx_broadcast"
,
E1000_STAT
(
stats
.
bptc
)
}
,
E1000_STAT
(
"tx_broadcast"
,
stats
.
bptc
)
,
{
"rx_multicast"
,
E1000_STAT
(
stats
.
mprc
)
}
,
E1000_STAT
(
"rx_multicast"
,
stats
.
mprc
)
,
{
"tx_multicast"
,
E1000_STAT
(
stats
.
mptc
)
}
,
E1000_STAT
(
"tx_multicast"
,
stats
.
mptc
)
,
{
"rx_errors"
,
E1000_NETDEV_STAT
(
stats
.
rx_errors
)
}
,
E1000_NETDEV_STAT
(
"rx_errors"
,
stats
.
rx_errors
)
,
{
"tx_errors"
,
E1000_NETDEV_STAT
(
stats
.
tx_errors
)
}
,
E1000_NETDEV_STAT
(
"tx_errors"
,
stats
.
tx_errors
)
,
{
"tx_dropped"
,
E1000_NETDEV_STAT
(
stats
.
tx_dropped
)
}
,
E1000_NETDEV_STAT
(
"tx_dropped"
,
stats
.
tx_dropped
)
,
{
"multicast"
,
E1000_STAT
(
stats
.
mprc
)
}
,
E1000_STAT
(
"multicast"
,
stats
.
mprc
)
,
{
"collisions"
,
E1000_STAT
(
stats
.
colc
)
}
,
E1000_STAT
(
"collisions"
,
stats
.
colc
)
,
{
"rx_length_errors"
,
E1000_NETDEV_STAT
(
stats
.
rx_length_errors
)
}
,
E1000_NETDEV_STAT
(
"rx_length_errors"
,
stats
.
rx_length_errors
)
,
{
"rx_over_errors"
,
E1000_NETDEV_STAT
(
stats
.
rx_over_errors
)
}
,
E1000_NETDEV_STAT
(
"rx_over_errors"
,
stats
.
rx_over_errors
)
,
{
"rx_crc_errors"
,
E1000_STAT
(
stats
.
crcerrs
)
}
,
E1000_STAT
(
"rx_crc_errors"
,
stats
.
crcerrs
)
,
{
"rx_frame_errors"
,
E1000_NETDEV_STAT
(
stats
.
rx_frame_errors
)
}
,
E1000_NETDEV_STAT
(
"rx_frame_errors"
,
stats
.
rx_frame_errors
)
,
{
"rx_no_buffer_count"
,
E1000_STAT
(
stats
.
rnbc
)
}
,
E1000_STAT
(
"rx_no_buffer_count"
,
stats
.
rnbc
)
,
{
"rx_missed_errors"
,
E1000_STAT
(
stats
.
mpc
)
}
,
E1000_STAT
(
"rx_missed_errors"
,
stats
.
mpc
)
,
{
"tx_aborted_errors"
,
E1000_STAT
(
stats
.
ecol
)
}
,
E1000_STAT
(
"tx_aborted_errors"
,
stats
.
ecol
)
,
{
"tx_carrier_errors"
,
E1000_STAT
(
stats
.
tncrs
)
}
,
E1000_STAT
(
"tx_carrier_errors"
,
stats
.
tncrs
)
,
{
"tx_fifo_errors"
,
E1000_NETDEV_STAT
(
stats
.
tx_fifo_errors
)
}
,
E1000_NETDEV_STAT
(
"tx_fifo_errors"
,
stats
.
tx_fifo_errors
)
,
{
"tx_heartbeat_errors"
,
E1000_NETDEV_STAT
(
stats
.
tx_heartbeat_errors
)
}
,
E1000_NETDEV_STAT
(
"tx_heartbeat_errors"
,
stats
.
tx_heartbeat_errors
)
,
{
"tx_window_errors"
,
E1000_STAT
(
stats
.
latecol
)
}
,
E1000_STAT
(
"tx_window_errors"
,
stats
.
latecol
)
,
{
"tx_abort_late_coll"
,
E1000_STAT
(
stats
.
latecol
)
}
,
E1000_STAT
(
"tx_abort_late_coll"
,
stats
.
latecol
)
,
{
"tx_deferred_ok"
,
E1000_STAT
(
stats
.
dc
)
}
,
E1000_STAT
(
"tx_deferred_ok"
,
stats
.
dc
)
,
{
"tx_single_coll_ok"
,
E1000_STAT
(
stats
.
scc
)
}
,
E1000_STAT
(
"tx_single_coll_ok"
,
stats
.
scc
)
,
{
"tx_multi_coll_ok"
,
E1000_STAT
(
stats
.
mcc
)
}
,
E1000_STAT
(
"tx_multi_coll_ok"
,
stats
.
mcc
)
,
{
"tx_timeout_count"
,
E1000_STAT
(
tx_timeout_count
)
}
,
E1000_STAT
(
"tx_timeout_count"
,
tx_timeout_count
)
,
{
"tx_restart_queue"
,
E1000_STAT
(
restart_queue
)
}
,
E1000_STAT
(
"tx_restart_queue"
,
restart_queue
)
,
{
"rx_long_length_errors"
,
E1000_STAT
(
stats
.
roc
)
}
,
E1000_STAT
(
"rx_long_length_errors"
,
stats
.
roc
)
,
{
"rx_short_length_errors"
,
E1000_STAT
(
stats
.
ruc
)
}
,
E1000_STAT
(
"rx_short_length_errors"
,
stats
.
ruc
)
,
{
"rx_align_errors"
,
E1000_STAT
(
stats
.
algnerrc
)
}
,
E1000_STAT
(
"rx_align_errors"
,
stats
.
algnerrc
)
,
{
"tx_tcp_seg_good"
,
E1000_STAT
(
stats
.
tsctc
)
}
,
E1000_STAT
(
"tx_tcp_seg_good"
,
stats
.
tsctc
)
,
{
"tx_tcp_seg_failed"
,
E1000_STAT
(
stats
.
tsctfc
)
}
,
E1000_STAT
(
"tx_tcp_seg_failed"
,
stats
.
tsctfc
)
,
{
"rx_flow_control_xon"
,
E1000_STAT
(
stats
.
xonrxc
)
}
,
E1000_STAT
(
"rx_flow_control_xon"
,
stats
.
xonrxc
)
,
{
"rx_flow_control_xoff"
,
E1000_STAT
(
stats
.
xoffrxc
)
}
,
E1000_STAT
(
"rx_flow_control_xoff"
,
stats
.
xoffrxc
)
,
{
"tx_flow_control_xon"
,
E1000_STAT
(
stats
.
xontxc
)
}
,
E1000_STAT
(
"tx_flow_control_xon"
,
stats
.
xontxc
)
,
{
"tx_flow_control_xoff"
,
E1000_STAT
(
stats
.
xofftxc
)
}
,
E1000_STAT
(
"tx_flow_control_xoff"
,
stats
.
xofftxc
)
,
{
"rx_long_byte_count"
,
E1000_STAT
(
stats
.
gorc
)
}
,
E1000_STAT
(
"rx_long_byte_count"
,
stats
.
gorc
)
,
{
"rx_csum_offload_good"
,
E1000_STAT
(
hw_csum_good
)
}
,
E1000_STAT
(
"rx_csum_offload_good"
,
hw_csum_good
)
,
{
"rx_csum_offload_errors"
,
E1000_STAT
(
hw_csum_err
)
}
,
E1000_STAT
(
"rx_csum_offload_errors"
,
hw_csum_err
)
,
{
"rx_header_split"
,
E1000_STAT
(
rx_hdr_split
)
}
,
E1000_STAT
(
"rx_header_split"
,
rx_hdr_split
)
,
{
"alloc_rx_buff_failed"
,
E1000_STAT
(
alloc_rx_buff_failed
)
}
,
E1000_STAT
(
"alloc_rx_buff_failed"
,
alloc_rx_buff_failed
)
,
{
"tx_smbus"
,
E1000_STAT
(
stats
.
mgptc
)
}
,
E1000_STAT
(
"tx_smbus"
,
stats
.
mgptc
)
,
{
"rx_smbus"
,
E1000_STAT
(
stats
.
mgprc
)
}
,
E1000_STAT
(
"rx_smbus"
,
stats
.
mgprc
)
,
{
"dropped_smbus"
,
E1000_STAT
(
stats
.
mgpdc
)
}
,
E1000_STAT
(
"dropped_smbus"
,
stats
.
mgpdc
)
,
{
"rx_dma_failed"
,
E1000_STAT
(
rx_dma_failed
)
}
,
E1000_STAT
(
"rx_dma_failed"
,
rx_dma_failed
)
,
{
"tx_dma_failed"
,
E1000_STAT
(
tx_dma_failed
)
}
,
E1000_STAT
(
"tx_dma_failed"
,
tx_dma_failed
)
,
};
};
#define E1000_GLOBAL_STATS_LEN ARRAY_SIZE(e1000_gstrings_stats)
#define E1000_GLOBAL_STATS_LEN ARRAY_SIZE(e1000_gstrings_stats)
...
@@ -749,8 +753,8 @@ static bool reg_pattern_test(struct e1000_adapter *adapter, u64 *data,
...
@@ -749,8 +753,8 @@ static bool reg_pattern_test(struct e1000_adapter *adapter, u64 *data,
int
reg
,
int
offset
,
u32
mask
,
u32
write
)
int
reg
,
int
offset
,
u32
mask
,
u32
write
)
{
{
u32
pat
,
val
;
u32
pat
,
val
;
static
const
u32
test
[]
=
static
const
u32
test
[]
=
{
{
0x5A5A5A5A
,
0xA5A5A5A5
,
0x00000000
,
0xFFFFFFFF
};
0x5A5A5A5A
,
0xA5A5A5A5
,
0x00000000
,
0xFFFFFFFF
};
for
(
pat
=
0
;
pat
<
ARRAY_SIZE
(
test
);
pat
++
)
{
for
(
pat
=
0
;
pat
<
ARRAY_SIZE
(
test
);
pat
++
)
{
E1000_WRITE_REG_ARRAY
(
&
adapter
->
hw
,
reg
,
offset
,
E1000_WRITE_REG_ARRAY
(
&
adapter
->
hw
,
reg
,
offset
,
(
test
[
pat
]
&
write
));
(
test
[
pat
]
&
write
));
...
...
drivers/net/e1000e/ich8lan.c
View file @
041110a4
...
@@ -2309,11 +2309,10 @@ static s32 e1000_read_flash_data_ich8lan(struct e1000_hw *hw, u32 offset,
...
@@ -2309,11 +2309,10 @@ static s32 e1000_read_flash_data_ich8lan(struct e1000_hw *hw, u32 offset,
*/
*/
if
(
ret_val
==
0
)
{
if
(
ret_val
==
0
)
{
flash_data
=
er32flash
(
ICH_FLASH_FDATA0
);
flash_data
=
er32flash
(
ICH_FLASH_FDATA0
);
if
(
size
==
1
)
{
if
(
size
==
1
)
*
data
=
(
u8
)(
flash_data
&
0x000000FF
);
*
data
=
(
u8
)(
flash_data
&
0x000000FF
);
}
else
if
(
size
==
2
)
{
else
if
(
size
==
2
)
*
data
=
(
u16
)(
flash_data
&
0x0000FFFF
);
*
data
=
(
u16
)(
flash_data
&
0x0000FFFF
);
}
break
;
break
;
}
else
{
}
else
{
/*
/*
...
...
drivers/net/e1000e/lib.c
View file @
041110a4
...
@@ -493,9 +493,8 @@ s32 e1000e_check_for_copper_link(struct e1000_hw *hw)
...
@@ -493,9 +493,8 @@ s32 e1000e_check_for_copper_link(struct e1000_hw *hw)
* different link partner.
* different link partner.
*/
*/
ret_val
=
e1000e_config_fc_after_link_up
(
hw
);
ret_val
=
e1000e_config_fc_after_link_up
(
hw
);
if
(
ret_val
)
{
if
(
ret_val
)
e_dbg
(
"Error configuring flow control
\n
"
);
e_dbg
(
"Error configuring flow control
\n
"
);
}
return
ret_val
;
return
ret_val
;
}
}
...
@@ -1496,9 +1495,8 @@ s32 e1000e_setup_led_generic(struct e1000_hw *hw)
...
@@ -1496,9 +1495,8 @@ s32 e1000e_setup_led_generic(struct e1000_hw *hw)
{
{
u32
ledctl
;
u32
ledctl
;
if
(
hw
->
mac
.
ops
.
setup_led
!=
e1000e_setup_led_generic
)
{
if
(
hw
->
mac
.
ops
.
setup_led
!=
e1000e_setup_led_generic
)
return
-
E1000_ERR_CONFIG
;
return
-
E1000_ERR_CONFIG
;
}
if
(
hw
->
phy
.
media_type
==
e1000_media_type_fiber
)
{
if
(
hw
->
phy
.
media_type
==
e1000_media_type_fiber
)
{
ledctl
=
er32
(
LEDCTL
);
ledctl
=
er32
(
LEDCTL
);
...
...
drivers/net/e1000e/netdev.c
View file @
041110a4
...
@@ -1325,7 +1325,7 @@ static bool e1000_clean_jumbo_rx_irq(struct e1000_adapter *adapter,
...
@@ -1325,7 +1325,7 @@ static bool e1000_clean_jumbo_rx_irq(struct e1000_adapter *adapter,
goto
next_desc
;
goto
next_desc
;
}
}
#define rxtop
rx_ring->rx_skb_top
#define rxtop
(rx_ring->rx_skb_top)
if
(
!
(
status
&
E1000_RXD_STAT_EOP
))
{
if
(
!
(
status
&
E1000_RXD_STAT_EOP
))
{
/* this descriptor is only the beginning (or middle) */
/* this descriptor is only the beginning (or middle) */
if
(
!
rxtop
)
{
if
(
!
rxtop
)
{
...
@@ -1806,10 +1806,9 @@ void e1000e_set_interrupt_capability(struct e1000_adapter *adapter)
...
@@ -1806,10 +1806,9 @@ void e1000e_set_interrupt_capability(struct e1000_adapter *adapter)
err
=
pci_enable_msix
(
adapter
->
pdev
,
err
=
pci_enable_msix
(
adapter
->
pdev
,
adapter
->
msix_entries
,
adapter
->
msix_entries
,
adapter
->
num_vectors
);
adapter
->
num_vectors
);
if
(
err
==
0
)
{
if
(
err
==
0
)
return
;
return
;
}
}
}
/* MSI-X failed, so fall through and try MSI */
/* MSI-X failed, so fall through and try MSI */
e_err
(
"Failed to initialize MSI-X interrupts. "
e_err
(
"Failed to initialize MSI-X interrupts. "
"Falling back to MSI interrupts.
\n
"
);
"Falling back to MSI interrupts.
\n
"
);
...
@@ -2198,9 +2197,8 @@ void e1000e_free_rx_resources(struct e1000_adapter *adapter)
...
@@ -2198,9 +2197,8 @@ void e1000e_free_rx_resources(struct e1000_adapter *adapter)
e1000_clean_rx_ring
(
adapter
);
e1000_clean_rx_ring
(
adapter
);
for
(
i
=
0
;
i
<
rx_ring
->
count
;
i
++
)
{
for
(
i
=
0
;
i
<
rx_ring
->
count
;
i
++
)
kfree
(
rx_ring
->
buffer_info
[
i
].
ps_pages
);
kfree
(
rx_ring
->
buffer_info
[
i
].
ps_pages
);
}
vfree
(
rx_ring
->
buffer_info
);
vfree
(
rx_ring
->
buffer_info
);
rx_ring
->
buffer_info
=
NULL
;
rx_ring
->
buffer_info
=
NULL
;
...
@@ -2240,20 +2238,18 @@ static unsigned int e1000_update_itr(struct e1000_adapter *adapter,
...
@@ -2240,20 +2238,18 @@ static unsigned int e1000_update_itr(struct e1000_adapter *adapter,
/* handle TSO and jumbo frames */
/* handle TSO and jumbo frames */
if
(
bytes
/
packets
>
8000
)
if
(
bytes
/
packets
>
8000
)
retval
=
bulk_latency
;
retval
=
bulk_latency
;
else
if
((
packets
<
5
)
&&
(
bytes
>
512
))
{
else
if
((
packets
<
5
)
&&
(
bytes
>
512
))
retval
=
low_latency
;
retval
=
low_latency
;
}
break
;
break
;
case
low_latency
:
/* 50 usec aka 20000 ints/s */
case
low_latency
:
/* 50 usec aka 20000 ints/s */
if
(
bytes
>
10000
)
{
if
(
bytes
>
10000
)
{
/* this if handles the TSO accounting */
/* this if handles the TSO accounting */
if
(
bytes
/
packets
>
8000
)
{
if
(
bytes
/
packets
>
8000
)
retval
=
bulk_latency
;
retval
=
bulk_latency
;
}
else
if
((
packets
<
10
)
||
((
bytes
/
packets
)
>
1200
))
{
else
if
((
packets
<
10
)
||
((
bytes
/
packets
)
>
1200
))
retval
=
bulk_latency
;
retval
=
bulk_latency
;
}
else
if
((
packets
>
35
))
{
else
if
((
packets
>
35
))
retval
=
lowest_latency
;
retval
=
lowest_latency
;
}
}
else
if
(
bytes
/
packets
>
2000
)
{
}
else
if
(
bytes
/
packets
>
2000
)
{
retval
=
bulk_latency
;
retval
=
bulk_latency
;
}
else
if
(
packets
<=
2
&&
bytes
<
512
)
{
}
else
if
(
packets
<=
2
&&
bytes
<
512
)
{
...
@@ -2262,9 +2258,8 @@ static unsigned int e1000_update_itr(struct e1000_adapter *adapter,
...
@@ -2262,9 +2258,8 @@ static unsigned int e1000_update_itr(struct e1000_adapter *adapter,
break
;
break
;
case
bulk_latency
:
/* 250 usec aka 4000 ints/s */
case
bulk_latency
:
/* 250 usec aka 4000 ints/s */
if
(
bytes
>
25000
)
{
if
(
bytes
>
25000
)
{
if
(
packets
>
35
)
{
if
(
packets
>
35
)
retval
=
low_latency
;
retval
=
low_latency
;
}
}
else
if
(
bytes
<
6000
)
{
}
else
if
(
bytes
<
6000
)
{
retval
=
low_latency
;
retval
=
low_latency
;
}
}
...
...
drivers/net/e1000e/phy.c
View file @
041110a4
...
@@ -42,13 +42,13 @@ static s32 e1000_access_phy_debug_regs_hv(struct e1000_hw *hw, u32 offset,
...
@@ -42,13 +42,13 @@ static s32 e1000_access_phy_debug_regs_hv(struct e1000_hw *hw, u32 offset,
u16
*
data
,
bool
read
);
u16
*
data
,
bool
read
);
/* Cable length tables */
/* Cable length tables */
static
const
u16
e1000_m88_cable_length_table
[]
=
static
const
u16
e1000_m88_cable_length_table
[]
=
{
{
0
,
50
,
80
,
110
,
140
,
140
,
E1000_CABLE_LENGTH_UNDEFINED
};
0
,
50
,
80
,
110
,
140
,
140
,
E1000_CABLE_LENGTH_UNDEFINED
};
#define M88E1000_CABLE_LENGTH_TABLE_SIZE \
#define M88E1000_CABLE_LENGTH_TABLE_SIZE \
ARRAY_SIZE(e1000_m88_cable_length_table)
ARRAY_SIZE(e1000_m88_cable_length_table)
static
const
u16
e1000_igp_2_cable_length_table
[]
=
static
const
u16
e1000_igp_2_cable_length_table
[]
=
{
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
3
,
5
,
8
,
11
,
13
,
16
,
18
,
21
,
0
,
0
,
0
,
3
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
3
,
5
,
8
,
11
,
13
,
16
,
18
,
21
,
0
,
0
,
0
,
3
,
6
,
10
,
13
,
16
,
19
,
23
,
26
,
29
,
32
,
35
,
38
,
41
,
6
,
10
,
14
,
18
,
22
,
6
,
10
,
13
,
16
,
19
,
23
,
26
,
29
,
32
,
35
,
38
,
41
,
6
,
10
,
14
,
18
,
22
,
26
,
30
,
33
,
37
,
41
,
44
,
48
,
51
,
54
,
58
,
61
,
21
,
26
,
31
,
35
,
40
,
26
,
30
,
33
,
37
,
41
,
44
,
48
,
51
,
54
,
58
,
61
,
21
,
26
,
31
,
35
,
40
,
44
,
49
,
53
,
57
,
61
,
65
,
68
,
72
,
75
,
79
,
82
,
40
,
45
,
51
,
56
,
61
,
44
,
49
,
53
,
57
,
61
,
65
,
68
,
72
,
75
,
79
,
82
,
40
,
45
,
51
,
56
,
61
,
...
@@ -1057,9 +1057,8 @@ static s32 e1000_phy_setup_autoneg(struct e1000_hw *hw)
...
@@ -1057,9 +1057,8 @@ static s32 e1000_phy_setup_autoneg(struct e1000_hw *hw)
e_dbg
(
"Auto-Neg Advertising %x
\n
"
,
mii_autoneg_adv_reg
);
e_dbg
(
"Auto-Neg Advertising %x
\n
"
,
mii_autoneg_adv_reg
);
if
(
phy
->
autoneg_mask
&
ADVERTISE_1000_FULL
)
{
if
(
phy
->
autoneg_mask
&
ADVERTISE_1000_FULL
)
ret_val
=
e1e_wphy
(
hw
,
PHY_1000T_CTRL
,
mii_1000t_ctrl_reg
);
ret_val
=
e1e_wphy
(
hw
,
PHY_1000T_CTRL
,
mii_1000t_ctrl_reg
);
}
return
ret_val
;
return
ret_val
;
}
}
...
...
drivers/net/igb/e1000_82575.c
View file @
041110a4
...
@@ -134,6 +134,8 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw)
...
@@ -134,6 +134,8 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw)
case
E1000_DEV_ID_82580_COPPER_DUAL
:
case
E1000_DEV_ID_82580_COPPER_DUAL
:
case
E1000_DEV_ID_DH89XXCC_SGMII
:
case
E1000_DEV_ID_DH89XXCC_SGMII
:
case
E1000_DEV_ID_DH89XXCC_SERDES
:
case
E1000_DEV_ID_DH89XXCC_SERDES
:
case
E1000_DEV_ID_DH89XXCC_BACKPLANE
:
case
E1000_DEV_ID_DH89XXCC_SFP
:
mac
->
type
=
e1000_82580
;
mac
->
type
=
e1000_82580
;
break
;
break
;
case
E1000_DEV_ID_I350_COPPER
:
case
E1000_DEV_ID_I350_COPPER
:
...
@@ -1477,6 +1479,39 @@ static s32 igb_set_pcie_completion_timeout(struct e1000_hw *hw)
...
@@ -1477,6 +1479,39 @@ static s32 igb_set_pcie_completion_timeout(struct e1000_hw *hw)
return
ret_val
;
return
ret_val
;
}
}
/**
* igb_vmdq_set_anti_spoofing_pf - enable or disable anti-spoofing
* @hw: pointer to the hardware struct
* @enable: state to enter, either enabled or disabled
* @pf: Physical Function pool - do not set anti-spoofing for the PF
*
* enables/disables L2 switch anti-spoofing functionality.
**/
void
igb_vmdq_set_anti_spoofing_pf
(
struct
e1000_hw
*
hw
,
bool
enable
,
int
pf
)
{
u32
dtxswc
;
switch
(
hw
->
mac
.
type
)
{
case
e1000_82576
:
case
e1000_i350
:
dtxswc
=
rd32
(
E1000_DTXSWC
);
if
(
enable
)
{
dtxswc
|=
(
E1000_DTXSWC_MAC_SPOOF_MASK
|
E1000_DTXSWC_VLAN_SPOOF_MASK
);
/* The PF can spoof - it has to in order to
* support emulation mode NICs */
dtxswc
^=
(
1
<<
pf
|
1
<<
(
pf
+
MAX_NUM_VFS
));
}
else
{
dtxswc
&=
~
(
E1000_DTXSWC_MAC_SPOOF_MASK
|
E1000_DTXSWC_VLAN_SPOOF_MASK
);
}
wr32
(
E1000_DTXSWC
,
dtxswc
);
break
;
default:
break
;
}
}
/**
/**
* igb_vmdq_set_loopback_pf - enable or disable vmdq loopback
* igb_vmdq_set_loopback_pf - enable or disable vmdq loopback
* @hw: pointer to the hardware struct
* @hw: pointer to the hardware struct
...
@@ -1578,7 +1613,7 @@ static s32 igb_reset_mdicnfg_82580(struct e1000_hw *hw)
...
@@ -1578,7 +1613,7 @@ static s32 igb_reset_mdicnfg_82580(struct e1000_hw *hw)
{
{
s32
ret_val
=
0
;
s32
ret_val
=
0
;
u32
mdicnfg
;
u32
mdicnfg
;
u16
nvm_data
;
u16
nvm_data
=
0
;
if
(
hw
->
mac
.
type
!=
e1000_82580
)
if
(
hw
->
mac
.
type
!=
e1000_82580
)
goto
out
;
goto
out
;
...
...
drivers/net/igb/e1000_82575.h
View file @
041110a4
...
@@ -194,6 +194,10 @@ struct e1000_adv_tx_context_desc {
...
@@ -194,6 +194,10 @@ struct e1000_adv_tx_context_desc {
#define E1000_NVM_APME_82575 0x0400
#define E1000_NVM_APME_82575 0x0400
#define MAX_NUM_VFS 8
#define MAX_NUM_VFS 8
#define E1000_DTXSWC_MAC_SPOOF_MASK 0x000000FF
/* Per VF MAC spoof control */
#define E1000_DTXSWC_VLAN_SPOOF_MASK 0x0000FF00
/* Per VF VLAN spoof control */
#define E1000_DTXSWC_LLE_MASK 0x00FF0000
/* Per VF Local LB enables */
#define E1000_DTXSWC_VLAN_SPOOF_SHIFT 8
#define E1000_DTXSWC_VMDQ_LOOPBACK_EN (1 << 31)
/* global VF LB enable */
#define E1000_DTXSWC_VMDQ_LOOPBACK_EN (1 << 31)
/* global VF LB enable */
/* Easy defines for setting default pool, would normally be left a zero */
/* Easy defines for setting default pool, would normally be left a zero */
...
@@ -243,6 +247,7 @@ struct e1000_adv_tx_context_desc {
...
@@ -243,6 +247,7 @@ struct e1000_adv_tx_context_desc {
/* RX packet buffer size defines */
/* RX packet buffer size defines */
#define E1000_RXPBS_SIZE_MASK_82576 0x0000007F
#define E1000_RXPBS_SIZE_MASK_82576 0x0000007F
void
igb_vmdq_set_anti_spoofing_pf
(
struct
e1000_hw
*
,
bool
,
int
);
void
igb_vmdq_set_loopback_pf
(
struct
e1000_hw
*
,
bool
);
void
igb_vmdq_set_loopback_pf
(
struct
e1000_hw
*
,
bool
);
void
igb_vmdq_set_replication_pf
(
struct
e1000_hw
*
,
bool
);
void
igb_vmdq_set_replication_pf
(
struct
e1000_hw
*
,
bool
);
u16
igb_rxpbs_adjust_82580
(
u32
data
);
u16
igb_rxpbs_adjust_82580
(
u32
data
);
...
...
drivers/net/igb/e1000_hw.h
View file @
041110a4
...
@@ -54,8 +54,10 @@ struct e1000_hw;
...
@@ -54,8 +54,10 @@ struct e1000_hw;
#define E1000_DEV_ID_82580_SERDES 0x1510
#define E1000_DEV_ID_82580_SERDES 0x1510
#define E1000_DEV_ID_82580_SGMII 0x1511
#define E1000_DEV_ID_82580_SGMII 0x1511
#define E1000_DEV_ID_82580_COPPER_DUAL 0x1516
#define E1000_DEV_ID_82580_COPPER_DUAL 0x1516
#define E1000_DEV_ID_DH89XXCC_SGMII 0x0436
#define E1000_DEV_ID_DH89XXCC_SGMII 0x0438
#define E1000_DEV_ID_DH89XXCC_SERDES 0x0438
#define E1000_DEV_ID_DH89XXCC_SERDES 0x043A
#define E1000_DEV_ID_DH89XXCC_BACKPLANE 0x043C
#define E1000_DEV_ID_DH89XXCC_SFP 0x0440
#define E1000_DEV_ID_I350_COPPER 0x1521
#define E1000_DEV_ID_I350_COPPER 0x1521
#define E1000_DEV_ID_I350_FIBER 0x1522
#define E1000_DEV_ID_I350_FIBER 0x1522
#define E1000_DEV_ID_I350_SERDES 0x1523
#define E1000_DEV_ID_I350_SERDES 0x1523
...
...
drivers/net/igb/e1000_regs.h
View file @
041110a4
...
@@ -301,6 +301,7 @@
...
@@ -301,6 +301,7 @@
#define E1000_VFTE 0x00C90
/* VF Transmit Enables */
#define E1000_VFTE 0x00C90
/* VF Transmit Enables */
#define E1000_QDE 0x02408
/* Queue Drop Enable - RW */
#define E1000_QDE 0x02408
/* Queue Drop Enable - RW */
#define E1000_DTXSWC 0x03500
/* DMA Tx Switch Control - RW */
#define E1000_DTXSWC 0x03500
/* DMA Tx Switch Control - RW */
#define E1000_WVBR 0x03554
/* VM Wrong Behavior - RWS */
#define E1000_RPLOLR 0x05AF0
/* Replication Offload - RW */
#define E1000_RPLOLR 0x05AF0
/* Replication Offload - RW */
#define E1000_UTA 0x0A000
/* Unicast Table Array - RW */
#define E1000_UTA 0x0A000
/* Unicast Table Array - RW */
#define E1000_IOVTCL 0x05BBC
/* IOV Control Register */
#define E1000_IOVTCL 0x05BBC
/* IOV Control Register */
...
...
drivers/net/igb/igb.h
View file @
041110a4
...
@@ -324,6 +324,7 @@ struct igb_adapter {
...
@@ -324,6 +324,7 @@ struct igb_adapter {
unsigned
int
vfs_allocated_count
;
unsigned
int
vfs_allocated_count
;
struct
vf_data_storage
*
vf_data
;
struct
vf_data_storage
*
vf_data
;
u32
rss_queues
;
u32
rss_queues
;
u32
wvbr
;
};
};
#define IGB_FLAG_HAS_MSI (1 << 0)
#define IGB_FLAG_HAS_MSI (1 << 0)
...
...
drivers/net/igb/igb_main.c
View file @
041110a4
...
@@ -73,6 +73,8 @@ static DEFINE_PCI_DEVICE_TABLE(igb_pci_tbl) = {
...
@@ -73,6 +73,8 @@ static DEFINE_PCI_DEVICE_TABLE(igb_pci_tbl) = {
{
PCI_VDEVICE
(
INTEL
,
E1000_DEV_ID_82580_COPPER_DUAL
),
board_82575
},
{
PCI_VDEVICE
(
INTEL
,
E1000_DEV_ID_82580_COPPER_DUAL
),
board_82575
},
{
PCI_VDEVICE
(
INTEL
,
E1000_DEV_ID_DH89XXCC_SGMII
),
board_82575
},
{
PCI_VDEVICE
(
INTEL
,
E1000_DEV_ID_DH89XXCC_SGMII
),
board_82575
},
{
PCI_VDEVICE
(
INTEL
,
E1000_DEV_ID_DH89XXCC_SERDES
),
board_82575
},
{
PCI_VDEVICE
(
INTEL
,
E1000_DEV_ID_DH89XXCC_SERDES
),
board_82575
},
{
PCI_VDEVICE
(
INTEL
,
E1000_DEV_ID_DH89XXCC_BACKPLANE
),
board_82575
},
{
PCI_VDEVICE
(
INTEL
,
E1000_DEV_ID_DH89XXCC_SFP
),
board_82575
},
{
PCI_VDEVICE
(
INTEL
,
E1000_DEV_ID_82576
),
board_82575
},
{
PCI_VDEVICE
(
INTEL
,
E1000_DEV_ID_82576
),
board_82575
},
{
PCI_VDEVICE
(
INTEL
,
E1000_DEV_ID_82576_NS
),
board_82575
},
{
PCI_VDEVICE
(
INTEL
,
E1000_DEV_ID_82576_NS
),
board_82575
},
{
PCI_VDEVICE
(
INTEL
,
E1000_DEV_ID_82576_NS_SERDES
),
board_82575
},
{
PCI_VDEVICE
(
INTEL
,
E1000_DEV_ID_82576_NS_SERDES
),
board_82575
},
...
@@ -1654,7 +1656,7 @@ void igb_reset(struct igb_adapter *adapter)
...
@@ -1654,7 +1656,7 @@ void igb_reset(struct igb_adapter *adapter)
if
(
adapter
->
vfs_allocated_count
)
{
if
(
adapter
->
vfs_allocated_count
)
{
int
i
;
int
i
;
for
(
i
=
0
;
i
<
adapter
->
vfs_allocated_count
;
i
++
)
for
(
i
=
0
;
i
<
adapter
->
vfs_allocated_count
;
i
++
)
adapter
->
vf_data
[
i
].
flags
=
0
;
adapter
->
vf_data
[
i
].
flags
&=
IGB_VF_FLAG_PF_SET_MAC
;
/* ping all the active vfs to let them know we are going down */
/* ping all the active vfs to let them know we are going down */
igb_ping_all_vfs
(
adapter
);
igb_ping_all_vfs
(
adapter
);
...
@@ -3364,6 +3366,45 @@ static void igb_set_rx_mode(struct net_device *netdev)
...
@@ -3364,6 +3366,45 @@ static void igb_set_rx_mode(struct net_device *netdev)
igb_restore_vf_multicasts
(
adapter
);
igb_restore_vf_multicasts
(
adapter
);
}
}
static
void
igb_check_wvbr
(
struct
igb_adapter
*
adapter
)
{
struct
e1000_hw
*
hw
=
&
adapter
->
hw
;
u32
wvbr
=
0
;
switch
(
hw
->
mac
.
type
)
{
case
e1000_82576
:
case
e1000_i350
:
if
(
!
(
wvbr
=
rd32
(
E1000_WVBR
)))
return
;
break
;
default:
break
;
}
adapter
->
wvbr
|=
wvbr
;
}
#define IGB_STAGGERED_QUEUE_OFFSET 8
static
void
igb_spoof_check
(
struct
igb_adapter
*
adapter
)
{
int
j
;
if
(
!
adapter
->
wvbr
)
return
;
for
(
j
=
0
;
j
<
adapter
->
vfs_allocated_count
;
j
++
)
{
if
(
adapter
->
wvbr
&
(
1
<<
j
)
||
adapter
->
wvbr
&
(
1
<<
(
j
+
IGB_STAGGERED_QUEUE_OFFSET
)))
{
dev_warn
(
&
adapter
->
pdev
->
dev
,
"Spoof event(s) detected on VF %d
\n
"
,
j
);
adapter
->
wvbr
&=
~
((
1
<<
j
)
|
(
1
<<
(
j
+
IGB_STAGGERED_QUEUE_OFFSET
)));
}
}
}
/* Need to wait a few seconds after link up to get diagnostic information from
/* Need to wait a few seconds after link up to get diagnostic information from
* the phy */
* the phy */
static
void
igb_update_phy_info
(
unsigned
long
data
)
static
void
igb_update_phy_info
(
unsigned
long
data
)
...
@@ -3523,6 +3564,8 @@ static void igb_watchdog_task(struct work_struct *work)
...
@@ -3523,6 +3564,8 @@ static void igb_watchdog_task(struct work_struct *work)
wr32
(
E1000_ICS
,
E1000_ICS_RXDMT0
);
wr32
(
E1000_ICS
,
E1000_ICS_RXDMT0
);
}
}
igb_spoof_check
(
adapter
);
/* Reset the timer */
/* Reset the timer */
if
(
!
test_bit
(
__IGB_DOWN
,
&
adapter
->
state
))
if
(
!
test_bit
(
__IGB_DOWN
,
&
adapter
->
state
))
mod_timer
(
&
adapter
->
watchdog_timer
,
mod_timer
(
&
adapter
->
watchdog_timer
,
...
@@ -4519,6 +4562,10 @@ static irqreturn_t igb_msix_other(int irq, void *data)
...
@@ -4519,6 +4562,10 @@ static irqreturn_t igb_msix_other(int irq, void *data)
if
(
icr
&
E1000_ICR_DOUTSYNC
)
{
if
(
icr
&
E1000_ICR_DOUTSYNC
)
{
/* HW is reporting DMA is out of sync */
/* HW is reporting DMA is out of sync */
adapter
->
stats
.
doosync
++
;
adapter
->
stats
.
doosync
++
;
/* The DMA Out of Sync is also indication of a spoof event
* in IOV mode. Check the Wrong VM Behavior register to
* see if it is really a spoof event. */
igb_check_wvbr
(
adapter
);
}
}
/* Check for a mailbox event */
/* Check for a mailbox event */
...
@@ -4971,8 +5018,8 @@ static int igb_set_vf_vlan(struct igb_adapter *adapter, u32 *msgbuf, u32 vf)
...
@@ -4971,8 +5018,8 @@ static int igb_set_vf_vlan(struct igb_adapter *adapter, u32 *msgbuf, u32 vf)
static
inline
void
igb_vf_reset
(
struct
igb_adapter
*
adapter
,
u32
vf
)
static
inline
void
igb_vf_reset
(
struct
igb_adapter
*
adapter
,
u32
vf
)
{
{
/* clear flags */
/* clear flags
- except flag that indicates PF has set the MAC
*/
adapter
->
vf_data
[
vf
].
flags
&=
~
(
IGB_VF_FLAG_PF_SET_MAC
)
;
adapter
->
vf_data
[
vf
].
flags
&=
IGB_VF_FLAG_PF_SET_MAC
;
adapter
->
vf_data
[
vf
].
last_nack
=
jiffies
;
adapter
->
vf_data
[
vf
].
last_nack
=
jiffies
;
/* reset offloads to defaults */
/* reset offloads to defaults */
...
@@ -5026,7 +5073,7 @@ static void igb_vf_reset_msg(struct igb_adapter *adapter, u32 vf)
...
@@ -5026,7 +5073,7 @@ static void igb_vf_reset_msg(struct igb_adapter *adapter, u32 vf)
reg
=
rd32
(
E1000_VFRE
);
reg
=
rd32
(
E1000_VFRE
);
wr32
(
E1000_VFRE
,
reg
|
(
1
<<
vf
));
wr32
(
E1000_VFRE
,
reg
|
(
1
<<
vf
));
adapter
->
vf_data
[
vf
].
flags
=
IGB_VF_FLAG_CTS
;
adapter
->
vf_data
[
vf
].
flags
|
=
IGB_VF_FLAG_CTS
;
/* reply to reset with ack and vf mac address */
/* reply to reset with ack and vf mac address */
msgbuf
[
0
]
=
E1000_VF_RESET
|
E1000_VT_MSGTYPE_ACK
;
msgbuf
[
0
]
=
E1000_VF_RESET
|
E1000_VT_MSGTYPE_ACK
;
...
@@ -5105,7 +5152,14 @@ static void igb_rcv_msg_from_vf(struct igb_adapter *adapter, u32 vf)
...
@@ -5105,7 +5152,14 @@ static void igb_rcv_msg_from_vf(struct igb_adapter *adapter, u32 vf)
switch
((
msgbuf
[
0
]
&
0xFFFF
))
{
switch
((
msgbuf
[
0
]
&
0xFFFF
))
{
case
E1000_VF_SET_MAC_ADDR
:
case
E1000_VF_SET_MAC_ADDR
:
retval
=
-
EINVAL
;
if
(
!
(
vf_data
->
flags
&
IGB_VF_FLAG_PF_SET_MAC
))
retval
=
igb_set_vf_mac_addr
(
adapter
,
msgbuf
,
vf
);
retval
=
igb_set_vf_mac_addr
(
adapter
,
msgbuf
,
vf
);
else
dev_warn
(
&
pdev
->
dev
,
"VF %d attempted to override administratively "
"set MAC address
\n
Reload the VF driver to "
"resume operations
\n
"
,
vf
);
break
;
break
;
case
E1000_VF_SET_PROMISC
:
case
E1000_VF_SET_PROMISC
:
retval
=
igb_set_vf_promisc
(
adapter
,
msgbuf
,
vf
);
retval
=
igb_set_vf_promisc
(
adapter
,
msgbuf
,
vf
);
...
@@ -5117,8 +5171,12 @@ static void igb_rcv_msg_from_vf(struct igb_adapter *adapter, u32 vf)
...
@@ -5117,8 +5171,12 @@ static void igb_rcv_msg_from_vf(struct igb_adapter *adapter, u32 vf)
retval
=
igb_set_vf_rlpml
(
adapter
,
msgbuf
[
1
],
vf
);
retval
=
igb_set_vf_rlpml
(
adapter
,
msgbuf
[
1
],
vf
);
break
;
break
;
case
E1000_VF_SET_VLAN
:
case
E1000_VF_SET_VLAN
:
if
(
adapter
->
vf_data
[
vf
].
pf_vlan
)
retval
=
-
1
;
retval
=
-
1
;
if
(
vf_data
->
pf_vlan
)
dev_warn
(
&
pdev
->
dev
,
"VF %d attempted to override administratively "
"set VLAN tag
\n
Reload the VF driver to "
"resume operations
\n
"
,
vf
);
else
else
retval
=
igb_set_vf_vlan
(
adapter
,
msgbuf
,
vf
);
retval
=
igb_set_vf_vlan
(
adapter
,
msgbuf
,
vf
);
break
;
break
;
...
@@ -6582,6 +6640,8 @@ static void igb_vmm_control(struct igb_adapter *adapter)
...
@@ -6582,6 +6640,8 @@ static void igb_vmm_control(struct igb_adapter *adapter)
if
(
adapter
->
vfs_allocated_count
)
{
if
(
adapter
->
vfs_allocated_count
)
{
igb_vmdq_set_loopback_pf
(
hw
,
true
);
igb_vmdq_set_loopback_pf
(
hw
,
true
);
igb_vmdq_set_replication_pf
(
hw
,
true
);
igb_vmdq_set_replication_pf
(
hw
,
true
);
igb_vmdq_set_anti_spoofing_pf
(
hw
,
true
,
adapter
->
vfs_allocated_count
);
}
else
{
}
else
{
igb_vmdq_set_loopback_pf
(
hw
,
false
);
igb_vmdq_set_loopback_pf
(
hw
,
false
);
igb_vmdq_set_replication_pf
(
hw
,
false
);
igb_vmdq_set_replication_pf
(
hw
,
false
);
...
...
drivers/net/igbvf/igbvf.h
View file @
041110a4
...
@@ -97,6 +97,7 @@ struct igbvf_adapter;
...
@@ -97,6 +97,7 @@ struct igbvf_adapter;
enum
igbvf_boards
{
enum
igbvf_boards
{
board_vf
,
board_vf
,
board_i350_vf
,
};
};
struct
igbvf_queue_stats
{
struct
igbvf_queue_stats
{
...
...
drivers/net/igbvf/netdev.c
View file @
041110a4
...
@@ -64,8 +64,16 @@ static struct igbvf_info igbvf_vf_info = {
...
@@ -64,8 +64,16 @@ static struct igbvf_info igbvf_vf_info = {
.
init_ops
=
e1000_init_function_pointers_vf
,
.
init_ops
=
e1000_init_function_pointers_vf
,
};
};
static
struct
igbvf_info
igbvf_i350_vf_info
=
{
.
mac
=
e1000_vfadapt_i350
,
.
flags
=
0
,
.
pba
=
10
,
.
init_ops
=
e1000_init_function_pointers_vf
,
};
static
const
struct
igbvf_info
*
igbvf_info_tbl
[]
=
{
static
const
struct
igbvf_info
*
igbvf_info_tbl
[]
=
{
[
board_vf
]
=
&
igbvf_vf_info
,
[
board_vf
]
=
&
igbvf_vf_info
,
[
board_i350_vf
]
=
&
igbvf_i350_vf_info
,
};
};
/**
/**
...
@@ -2865,6 +2873,7 @@ static struct pci_error_handlers igbvf_err_handler = {
...
@@ -2865,6 +2873,7 @@ static struct pci_error_handlers igbvf_err_handler = {
static
DEFINE_PCI_DEVICE_TABLE
(
igbvf_pci_tbl
)
=
{
static
DEFINE_PCI_DEVICE_TABLE
(
igbvf_pci_tbl
)
=
{
{
PCI_VDEVICE
(
INTEL
,
E1000_DEV_ID_82576_VF
),
board_vf
},
{
PCI_VDEVICE
(
INTEL
,
E1000_DEV_ID_82576_VF
),
board_vf
},
{
PCI_VDEVICE
(
INTEL
,
E1000_DEV_ID_I350_VF
),
board_i350_vf
},
{
}
/* terminate list */
{
}
/* terminate list */
};
};
MODULE_DEVICE_TABLE
(
pci
,
igbvf_pci_tbl
);
MODULE_DEVICE_TABLE
(
pci
,
igbvf_pci_tbl
);
...
...
drivers/net/igbvf/vf.c
View file @
041110a4
...
@@ -362,8 +362,8 @@ static s32 e1000_check_for_link_vf(struct e1000_hw *hw)
...
@@ -362,8 +362,8 @@ static s32 e1000_check_for_link_vf(struct e1000_hw *hw)
* or a virtual function reset
* or a virtual function reset
*/
*/
/* If we were hit with a reset drop the link */
/* If we were hit with a reset
or timeout
drop the link */
if
(
!
mbx
->
ops
.
check_for_rst
(
hw
))
if
(
!
mbx
->
ops
.
check_for_rst
(
hw
)
||
!
mbx
->
timeout
)
mac
->
get_link_status
=
true
;
mac
->
get_link_status
=
true
;
if
(
!
mac
->
get_link_status
)
if
(
!
mac
->
get_link_status
)
...
...
drivers/net/igbvf/vf.h
View file @
041110a4
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
struct
e1000_hw
;
struct
e1000_hw
;
#define E1000_DEV_ID_82576_VF 0x10CA
#define E1000_DEV_ID_82576_VF 0x10CA
#define E1000_DEV_ID_I350_VF 0x1520
#define E1000_REVISION_0 0
#define E1000_REVISION_0 0
#define E1000_REVISION_1 1
#define E1000_REVISION_1 1
#define E1000_REVISION_2 2
#define E1000_REVISION_2 2
...
@@ -133,6 +134,7 @@ struct e1000_adv_tx_context_desc {
...
@@ -133,6 +134,7 @@ struct e1000_adv_tx_context_desc {
enum
e1000_mac_type
{
enum
e1000_mac_type
{
e1000_undefined
=
0
,
e1000_undefined
=
0
,
e1000_vfadapt
,
e1000_vfadapt
,
e1000_vfadapt_i350
,
e1000_num_macs
/* List is 1-based, so subtract 1 for true count. */
e1000_num_macs
/* List is 1-based, so subtract 1 for true count. */
};
};
...
...
drivers/net/ixgbe/ixgbe_82599.c
View file @
041110a4
...
@@ -2165,6 +2165,8 @@ static struct ixgbe_mac_operations mac_ops_82599 = {
...
@@ -2165,6 +2165,8 @@ static struct ixgbe_mac_operations mac_ops_82599 = {
.
fc_enable
=
&
ixgbe_fc_enable_generic
,
.
fc_enable
=
&
ixgbe_fc_enable_generic
,
.
init_uta_tables
=
&
ixgbe_init_uta_tables_generic
,
.
init_uta_tables
=
&
ixgbe_init_uta_tables_generic
,
.
setup_sfp
=
&
ixgbe_setup_sfp_modules_82599
,
.
setup_sfp
=
&
ixgbe_setup_sfp_modules_82599
,
.
set_mac_anti_spoofing
=
&
ixgbe_set_mac_anti_spoofing
,
.
set_vlan_anti_spoofing
=
&
ixgbe_set_vlan_anti_spoofing
,
};
};
static
struct
ixgbe_eeprom_operations
eeprom_ops_82599
=
{
static
struct
ixgbe_eeprom_operations
eeprom_ops_82599
=
{
...
...
drivers/net/ixgbe/ixgbe_common.c
View file @
041110a4
...
@@ -2809,3 +2809,67 @@ s32 ixgbe_get_wwn_prefix_generic(struct ixgbe_hw *hw, u16 *wwnn_prefix,
...
@@ -2809,3 +2809,67 @@ s32 ixgbe_get_wwn_prefix_generic(struct ixgbe_hw *hw, u16 *wwnn_prefix,
wwn_prefix_out:
wwn_prefix_out:
return
0
;
return
0
;
}
}
/**
* ixgbe_set_mac_anti_spoofing - Enable/Disable MAC anti-spoofing
* @hw: pointer to hardware structure
* @enable: enable or disable switch for anti-spoofing
* @pf: Physical Function pool - do not enable anti-spoofing for the PF
*
**/
void
ixgbe_set_mac_anti_spoofing
(
struct
ixgbe_hw
*
hw
,
bool
enable
,
int
pf
)
{
int
j
;
int
pf_target_reg
=
pf
>>
3
;
int
pf_target_shift
=
pf
%
8
;
u32
pfvfspoof
=
0
;
if
(
hw
->
mac
.
type
==
ixgbe_mac_82598EB
)
return
;
if
(
enable
)
pfvfspoof
=
IXGBE_SPOOF_MACAS_MASK
;
/*
* PFVFSPOOF register array is size 8 with 8 bits assigned to
* MAC anti-spoof enables in each register array element.
*/
for
(
j
=
0
;
j
<
IXGBE_PFVFSPOOF_REG_COUNT
;
j
++
)
IXGBE_WRITE_REG
(
hw
,
IXGBE_PFVFSPOOF
(
j
),
pfvfspoof
);
/* If not enabling anti-spoofing then done */
if
(
!
enable
)
return
;
/*
* The PF should be allowed to spoof so that it can support
* emulation mode NICs. Reset the bit assigned to the PF
*/
pfvfspoof
=
IXGBE_READ_REG
(
hw
,
IXGBE_PFVFSPOOF
(
pf_target_reg
));
pfvfspoof
^=
(
1
<<
pf_target_shift
);
IXGBE_WRITE_REG
(
hw
,
IXGBE_PFVFSPOOF
(
pf_target_reg
),
pfvfspoof
);
}
/**
* ixgbe_set_vlan_anti_spoofing - Enable/Disable VLAN anti-spoofing
* @hw: pointer to hardware structure
* @enable: enable or disable switch for VLAN anti-spoofing
* @pf: Virtual Function pool - VF Pool to set for VLAN anti-spoofing
*
**/
void
ixgbe_set_vlan_anti_spoofing
(
struct
ixgbe_hw
*
hw
,
bool
enable
,
int
vf
)
{
int
vf_target_reg
=
vf
>>
3
;
int
vf_target_shift
=
vf
%
8
+
IXGBE_SPOOF_VLANAS_SHIFT
;
u32
pfvfspoof
;
if
(
hw
->
mac
.
type
==
ixgbe_mac_82598EB
)
return
;
pfvfspoof
=
IXGBE_READ_REG
(
hw
,
IXGBE_PFVFSPOOF
(
vf_target_reg
));
if
(
enable
)
pfvfspoof
|=
(
1
<<
vf_target_shift
);
else
pfvfspoof
&=
~
(
1
<<
vf_target_shift
);
IXGBE_WRITE_REG
(
hw
,
IXGBE_PFVFSPOOF
(
vf_target_reg
),
pfvfspoof
);
}
drivers/net/ixgbe/ixgbe_common.h
View file @
041110a4
...
@@ -88,6 +88,8 @@ s32 ixgbe_get_wwn_prefix_generic(struct ixgbe_hw *hw, u16 *wwnn_prefix,
...
@@ -88,6 +88,8 @@ s32 ixgbe_get_wwn_prefix_generic(struct ixgbe_hw *hw, u16 *wwnn_prefix,
u16
*
wwpn_prefix
);
u16
*
wwpn_prefix
);
s32
ixgbe_blink_led_start_generic
(
struct
ixgbe_hw
*
hw
,
u32
index
);
s32
ixgbe_blink_led_start_generic
(
struct
ixgbe_hw
*
hw
,
u32
index
);
s32
ixgbe_blink_led_stop_generic
(
struct
ixgbe_hw
*
hw
,
u32
index
);
s32
ixgbe_blink_led_stop_generic
(
struct
ixgbe_hw
*
hw
,
u32
index
);
void
ixgbe_set_mac_anti_spoofing
(
struct
ixgbe_hw
*
hw
,
bool
enable
,
int
pf
);
void
ixgbe_set_vlan_anti_spoofing
(
struct
ixgbe_hw
*
hw
,
bool
enable
,
int
vf
);
#define IXGBE_WRITE_REG(a, reg, value) writel((value), ((a)->hw_addr + (reg)))
#define IXGBE_WRITE_REG(a, reg, value) writel((value), ((a)->hw_addr + (reg)))
...
...
drivers/net/ixgbe/ixgbe_main.c
View file @
041110a4
...
@@ -3132,6 +3132,9 @@ static void ixgbe_configure_virtualization(struct ixgbe_adapter *adapter)
...
@@ -3132,6 +3132,9 @@ static void ixgbe_configure_virtualization(struct ixgbe_adapter *adapter)
/* enable Tx loopback for VF/PF communication */
/* enable Tx loopback for VF/PF communication */
IXGBE_WRITE_REG
(
hw
,
IXGBE_PFDTXGSWC
,
IXGBE_PFDTXGSWC_VT_LBEN
);
IXGBE_WRITE_REG
(
hw
,
IXGBE_PFDTXGSWC
,
IXGBE_PFDTXGSWC_VT_LBEN
);
/* Enable MAC Anti-Spoofing */
hw
->
mac
.
ops
.
set_mac_anti_spoofing
(
hw
,
(
adapter
->
num_vfs
!=
0
),
adapter
->
num_vfs
);
}
}
static
void
ixgbe_set_rx_buffer_len
(
struct
ixgbe_adapter
*
adapter
)
static
void
ixgbe_set_rx_buffer_len
(
struct
ixgbe_adapter
*
adapter
)
...
@@ -5960,6 +5963,26 @@ static void ixgbe_fdir_reinit_task(struct work_struct *work)
...
@@ -5960,6 +5963,26 @@ static void ixgbe_fdir_reinit_task(struct work_struct *work)
netif_tx_start_all_queues
(
adapter
->
netdev
);
netif_tx_start_all_queues
(
adapter
->
netdev
);
}
}
static
void
ixgbe_spoof_check
(
struct
ixgbe_adapter
*
adapter
)
{
u32
ssvpc
;
/* Do not perform spoof check for 82598 */
if
(
adapter
->
hw
.
mac
.
type
==
ixgbe_mac_82598EB
)
return
;
ssvpc
=
IXGBE_READ_REG
(
&
adapter
->
hw
,
IXGBE_SSVPC
);
/*
* ssvpc register is cleared on read, if zero then no
* spoofed packets in the last interval.
*/
if
(
!
ssvpc
)
return
;
e_warn
(
drv
,
"%d Spoofed packets detected
\n
"
,
ssvpc
);
}
static
DEFINE_MUTEX
(
ixgbe_watchdog_lock
);
static
DEFINE_MUTEX
(
ixgbe_watchdog_lock
);
/**
/**
...
@@ -6080,6 +6103,7 @@ static void ixgbe_watchdog_task(struct work_struct *work)
...
@@ -6080,6 +6103,7 @@ static void ixgbe_watchdog_task(struct work_struct *work)
}
}
}
}
ixgbe_spoof_check
(
adapter
);
ixgbe_update_stats
(
adapter
);
ixgbe_update_stats
(
adapter
);
mutex_unlock
(
&
ixgbe_watchdog_lock
);
mutex_unlock
(
&
ixgbe_watchdog_lock
);
}
}
...
@@ -6889,7 +6913,7 @@ static void __devinit ixgbe_probe_vf(struct ixgbe_adapter *adapter,
...
@@ -6889,7 +6913,7 @@ static void __devinit ixgbe_probe_vf(struct ixgbe_adapter *adapter,
struct
ixgbe_hw
*
hw
=
&
adapter
->
hw
;
struct
ixgbe_hw
*
hw
=
&
adapter
->
hw
;
int
err
;
int
err
;
if
(
hw
->
mac
.
type
!=
ixgbe_mac_82599
EB
||
!
max_vfs
)
if
(
hw
->
mac
.
type
==
ixgbe_mac_82598
EB
||
!
max_vfs
)
return
;
return
;
/* The 82599 supports up to 64 VFs per physical function
/* The 82599 supports up to 64 VFs per physical function
...
...
drivers/net/ixgbe/ixgbe_mbx.c
View file @
041110a4
...
@@ -321,9 +321,11 @@ static s32 ixgbe_check_for_rst_pf(struct ixgbe_hw *hw, u16 vf_number)
...
@@ -321,9 +321,11 @@ static s32 ixgbe_check_for_rst_pf(struct ixgbe_hw *hw, u16 vf_number)
switch
(
hw
->
mac
.
type
)
{
switch
(
hw
->
mac
.
type
)
{
case
ixgbe_mac_82599EB
:
case
ixgbe_mac_82599EB
:
case
ixgbe_mac_X540
:
vflre
=
IXGBE_READ_REG
(
hw
,
IXGBE_VFLRE
(
reg_offset
));
vflre
=
IXGBE_READ_REG
(
hw
,
IXGBE_VFLRE
(
reg_offset
));
break
;
break
;
case
ixgbe_mac_X540
:
vflre
=
IXGBE_READ_REG
(
hw
,
IXGBE_VFLREC
(
reg_offset
));
break
;
default:
default:
break
;
break
;
}
}
...
...
drivers/net/ixgbe/ixgbe_sriov.c
View file @
041110a4
...
@@ -215,6 +215,11 @@ static inline void ixgbe_vf_reset_msg(struct ixgbe_adapter *adapter, u32 vf)
...
@@ -215,6 +215,11 @@ static inline void ixgbe_vf_reset_msg(struct ixgbe_adapter *adapter, u32 vf)
reg
|=
(
reg
|
(
1
<<
vf_shift
));
reg
|=
(
reg
|
(
1
<<
vf_shift
));
IXGBE_WRITE_REG
(
hw
,
IXGBE_VFRE
(
reg_offset
),
reg
);
IXGBE_WRITE_REG
(
hw
,
IXGBE_VFRE
(
reg_offset
),
reg
);
/* Enable counting of spoofed packets in the SSVPC register */
reg
=
IXGBE_READ_REG
(
hw
,
IXGBE_VMECM
(
reg_offset
));
reg
|=
(
1
<<
vf_shift
);
IXGBE_WRITE_REG
(
hw
,
IXGBE_VMECM
(
reg_offset
),
reg
);
ixgbe_vf_reset_event
(
adapter
,
vf
);
ixgbe_vf_reset_event
(
adapter
,
vf
);
}
}
...
@@ -227,6 +232,7 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf)
...
@@ -227,6 +232,7 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf)
int
entries
;
int
entries
;
u16
*
hash_list
;
u16
*
hash_list
;
int
add
,
vid
;
int
add
,
vid
;
u8
*
new_mac
;
retval
=
ixgbe_read_mbx
(
hw
,
msgbuf
,
mbx_size
,
vf
);
retval
=
ixgbe_read_mbx
(
hw
,
msgbuf
,
mbx_size
,
vf
);
...
@@ -244,15 +250,22 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf)
...
@@ -244,15 +250,22 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf)
if
(
msgbuf
[
0
]
==
IXGBE_VF_RESET
)
{
if
(
msgbuf
[
0
]
==
IXGBE_VF_RESET
)
{
unsigned
char
*
vf_mac
=
adapter
->
vfinfo
[
vf
].
vf_mac_addresses
;
unsigned
char
*
vf_mac
=
adapter
->
vfinfo
[
vf
].
vf_mac_addresses
;
u8
*
addr
=
(
u8
*
)(
&
msgbuf
[
1
]);
new_mac
=
(
u8
*
)(
&
msgbuf
[
1
]);
e_info
(
probe
,
"VF Reset msg received from vf %d
\n
"
,
vf
);
e_info
(
probe
,
"VF Reset msg received from vf %d
\n
"
,
vf
);
adapter
->
vfinfo
[
vf
].
clear_to_send
=
false
;
adapter
->
vfinfo
[
vf
].
clear_to_send
=
false
;
ixgbe_vf_reset_msg
(
adapter
,
vf
);
ixgbe_vf_reset_msg
(
adapter
,
vf
);
adapter
->
vfinfo
[
vf
].
clear_to_send
=
true
;
adapter
->
vfinfo
[
vf
].
clear_to_send
=
true
;
if
(
is_valid_ether_addr
(
new_mac
)
&&
!
adapter
->
vfinfo
[
vf
].
pf_set_mac
)
ixgbe_set_vf_mac
(
adapter
,
vf
,
vf_mac
);
else
ixgbe_set_vf_mac
(
adapter
,
vf
,
adapter
->
vfinfo
[
vf
].
vf_mac_addresses
);
/* reply to reset with ack and vf mac address */
/* reply to reset with ack and vf mac address */
msgbuf
[
0
]
=
IXGBE_VF_RESET
|
IXGBE_VT_MSGTYPE_ACK
;
msgbuf
[
0
]
=
IXGBE_VF_RESET
|
IXGBE_VT_MSGTYPE_ACK
;
memcpy
(
addr
,
vf_mac
,
IXGBE_ETH_LENGTH_OF_ADDRESS
);
memcpy
(
new_mac
,
vf_mac
,
IXGBE_ETH_LENGTH_OF_ADDRESS
);
/*
/*
* Piggyback the multicast filter type so VF can compute the
* Piggyback the multicast filter type so VF can compute the
* correct vectors
* correct vectors
...
@@ -271,14 +284,16 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf)
...
@@ -271,14 +284,16 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf)
switch
((
msgbuf
[
0
]
&
0xFFFF
))
{
switch
((
msgbuf
[
0
]
&
0xFFFF
))
{
case
IXGBE_VF_SET_MAC_ADDR
:
case
IXGBE_VF_SET_MAC_ADDR
:
{
new_mac
=
((
u8
*
)(
&
msgbuf
[
1
]));
u8
*
new_mac
=
((
u8
*
)(
&
msgbuf
[
1
]));
if
(
is_valid_ether_addr
(
new_mac
)
&&
if
(
is_valid_ether_addr
(
new_mac
)
&&
!
adapter
->
vfinfo
[
vf
].
pf_set_mac
)
!
adapter
->
vfinfo
[
vf
].
pf_set_mac
)
{
ixgbe_set_vf_mac
(
adapter
,
vf
,
new_mac
);
ixgbe_set_vf_mac
(
adapter
,
vf
,
new_mac
);
else
}
else
if
(
memcmp
(
adapter
->
vfinfo
[
vf
].
vf_mac_addresses
,
ixgbe_set_vf_mac
(
adapter
,
new_mac
,
ETH_ALEN
))
{
vf
,
adapter
->
vfinfo
[
vf
].
vf_mac_addresses
);
e_warn
(
drv
,
"VF %d attempted to override "
"administratively set MAC address
\n
Reload "
"the VF driver to resume operations
\n
"
,
vf
);
retval
=
-
1
;
}
}
break
;
break
;
case
IXGBE_VF_SET_MULTICAST
:
case
IXGBE_VF_SET_MULTICAST
:
...
@@ -295,7 +310,15 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf)
...
@@ -295,7 +310,15 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf)
add
=
(
msgbuf
[
0
]
&
IXGBE_VT_MSGINFO_MASK
)
add
=
(
msgbuf
[
0
]
&
IXGBE_VT_MSGINFO_MASK
)
>>
IXGBE_VT_MSGINFO_SHIFT
;
>>
IXGBE_VT_MSGINFO_SHIFT
;
vid
=
(
msgbuf
[
1
]
&
IXGBE_VLVF_VLANID_MASK
);
vid
=
(
msgbuf
[
1
]
&
IXGBE_VLVF_VLANID_MASK
);
if
(
adapter
->
vfinfo
[
vf
].
pf_vlan
)
{
e_warn
(
drv
,
"VF %d attempted to override "
"administratively set VLAN configuration
\n
"
"Reload the VF driver to resume operations
\n
"
,
vf
);
retval
=
-
1
;
}
else
{
retval
=
ixgbe_set_vf_vlan
(
adapter
,
add
,
vid
,
vf
);
retval
=
ixgbe_set_vf_vlan
(
adapter
,
add
,
vid
,
vf
);
}
break
;
break
;
default:
default:
e_err
(
drv
,
"Unhandled Msg %8.8x
\n
"
,
msgbuf
[
0
]);
e_err
(
drv
,
"Unhandled Msg %8.8x
\n
"
,
msgbuf
[
0
]);
...
@@ -394,6 +417,7 @@ int ixgbe_ndo_set_vf_vlan(struct net_device *netdev, int vf, u16 vlan, u8 qos)
...
@@ -394,6 +417,7 @@ int ixgbe_ndo_set_vf_vlan(struct net_device *netdev, int vf, u16 vlan, u8 qos)
{
{
int
err
=
0
;
int
err
=
0
;
struct
ixgbe_adapter
*
adapter
=
netdev_priv
(
netdev
);
struct
ixgbe_adapter
*
adapter
=
netdev_priv
(
netdev
);
struct
ixgbe_hw
*
hw
=
&
adapter
->
hw
;
if
((
vf
>=
adapter
->
num_vfs
)
||
(
vlan
>
4095
)
||
(
qos
>
7
))
if
((
vf
>=
adapter
->
num_vfs
)
||
(
vlan
>
4095
)
||
(
qos
>
7
))
return
-
EINVAL
;
return
-
EINVAL
;
...
@@ -402,7 +426,8 @@ int ixgbe_ndo_set_vf_vlan(struct net_device *netdev, int vf, u16 vlan, u8 qos)
...
@@ -402,7 +426,8 @@ int ixgbe_ndo_set_vf_vlan(struct net_device *netdev, int vf, u16 vlan, u8 qos)
if
(
err
)
if
(
err
)
goto
out
;
goto
out
;
ixgbe_set_vmvir
(
adapter
,
vlan
|
(
qos
<<
VLAN_PRIO_SHIFT
),
vf
);
ixgbe_set_vmvir
(
adapter
,
vlan
|
(
qos
<<
VLAN_PRIO_SHIFT
),
vf
);
ixgbe_set_vmolr
(
&
adapter
->
hw
,
vf
,
false
);
ixgbe_set_vmolr
(
hw
,
vf
,
false
);
hw
->
mac
.
ops
.
set_vlan_anti_spoofing
(
hw
,
true
,
vf
);
adapter
->
vfinfo
[
vf
].
pf_vlan
=
vlan
;
adapter
->
vfinfo
[
vf
].
pf_vlan
=
vlan
;
adapter
->
vfinfo
[
vf
].
pf_qos
=
qos
;
adapter
->
vfinfo
[
vf
].
pf_qos
=
qos
;
dev_info
(
&
adapter
->
pdev
->
dev
,
dev_info
(
&
adapter
->
pdev
->
dev
,
...
@@ -419,7 +444,8 @@ int ixgbe_ndo_set_vf_vlan(struct net_device *netdev, int vf, u16 vlan, u8 qos)
...
@@ -419,7 +444,8 @@ int ixgbe_ndo_set_vf_vlan(struct net_device *netdev, int vf, u16 vlan, u8 qos)
err
=
ixgbe_set_vf_vlan
(
adapter
,
false
,
err
=
ixgbe_set_vf_vlan
(
adapter
,
false
,
adapter
->
vfinfo
[
vf
].
pf_vlan
,
vf
);
adapter
->
vfinfo
[
vf
].
pf_vlan
,
vf
);
ixgbe_set_vmvir
(
adapter
,
vlan
,
vf
);
ixgbe_set_vmvir
(
adapter
,
vlan
,
vf
);
ixgbe_set_vmolr
(
&
adapter
->
hw
,
vf
,
true
);
ixgbe_set_vmolr
(
hw
,
vf
,
true
);
hw
->
mac
.
ops
.
set_vlan_anti_spoofing
(
hw
,
false
,
vf
);
adapter
->
vfinfo
[
vf
].
pf_vlan
=
0
;
adapter
->
vfinfo
[
vf
].
pf_vlan
=
0
;
adapter
->
vfinfo
[
vf
].
pf_qos
=
0
;
adapter
->
vfinfo
[
vf
].
pf_qos
=
0
;
}
}
...
...
drivers/net/ixgbe/ixgbe_type.h
View file @
041110a4
...
@@ -230,6 +230,7 @@
...
@@ -230,6 +230,7 @@
#define IXGBE_VT_CTL 0x051B0
#define IXGBE_VT_CTL 0x051B0
#define IXGBE_VFRE(_i) (0x051E0 + ((_i) * 4))
#define IXGBE_VFRE(_i) (0x051E0 + ((_i) * 4))
#define IXGBE_VFTE(_i) (0x08110 + ((_i) * 4))
#define IXGBE_VFTE(_i) (0x08110 + ((_i) * 4))
#define IXGBE_VMECM(_i) (0x08790 + ((_i) * 4))
#define IXGBE_QDE 0x2F04
#define IXGBE_QDE 0x2F04
#define IXGBE_VMOLR(_i) (0x0F000 + ((_i) * 4))
/* 64 total */
#define IXGBE_VMOLR(_i) (0x0F000 + ((_i) * 4))
/* 64 total */
#define IXGBE_UTA(_i) (0x0F400 + ((_i) * 4))
#define IXGBE_UTA(_i) (0x0F400 + ((_i) * 4))
...
@@ -285,6 +286,7 @@
...
@@ -285,6 +286,7 @@
#define IXGBE_DTXCTL 0x07E00
#define IXGBE_DTXCTL 0x07E00
#define IXGBE_DMATXCTL 0x04A80
#define IXGBE_DMATXCTL 0x04A80
#define IXGBE_PFVFSPOOF(_i) (0x08200 + ((_i) * 4))
/* 8 of these 0 - 7 */
#define IXGBE_PFDTXGSWC 0x08220
#define IXGBE_PFDTXGSWC 0x08220
#define IXGBE_DTXMXSZRQ 0x08100
#define IXGBE_DTXMXSZRQ 0x08100
#define IXGBE_DTXTCPFLGL 0x04A88
#define IXGBE_DTXTCPFLGL 0x04A88
...
@@ -298,6 +300,13 @@
...
@@ -298,6 +300,13 @@
#define IXGBE_DMATXCTL_VT_SHIFT 16
/* VLAN EtherType */
#define IXGBE_DMATXCTL_VT_SHIFT 16
/* VLAN EtherType */
#define IXGBE_PFDTXGSWC_VT_LBEN 0x1
/* Local L2 VT switch enable */
#define IXGBE_PFDTXGSWC_VT_LBEN 0x1
/* Local L2 VT switch enable */
/* Anti-spoofing defines */
#define IXGBE_SPOOF_MACAS_MASK 0xFF
#define IXGBE_SPOOF_VLANAS_MASK 0xFF00
#define IXGBE_SPOOF_VLANAS_SHIFT 8
#define IXGBE_PFVFSPOOF_REG_COUNT 8
#define IXGBE_DCA_TXCTRL(_i) (0x07200 + ((_i) * 4))
/* 16 of these (0-15) */
#define IXGBE_DCA_TXCTRL(_i) (0x07200 + ((_i) * 4))
/* 16 of these (0-15) */
/* Tx DCA Control register : 128 of these (0-127) */
/* Tx DCA Control register : 128 of these (0-127) */
#define IXGBE_DCA_TXCTRL_82599(_i) (0x0600C + ((_i) * 0x40))
#define IXGBE_DCA_TXCTRL_82599(_i) (0x0600C + ((_i) * 0x40))
...
@@ -2482,6 +2491,8 @@ struct ixgbe_mac_operations {
...
@@ -2482,6 +2491,8 @@ struct ixgbe_mac_operations {
s32
(
*
clear_vfta
)(
struct
ixgbe_hw
*
);
s32
(
*
clear_vfta
)(
struct
ixgbe_hw
*
);
s32
(
*
set_vfta
)(
struct
ixgbe_hw
*
,
u32
,
u32
,
bool
);
s32
(
*
set_vfta
)(
struct
ixgbe_hw
*
,
u32
,
u32
,
bool
);
s32
(
*
init_uta_tables
)(
struct
ixgbe_hw
*
);
s32
(
*
init_uta_tables
)(
struct
ixgbe_hw
*
);
void
(
*
set_mac_anti_spoofing
)(
struct
ixgbe_hw
*
,
bool
,
int
);
void
(
*
set_vlan_anti_spoofing
)(
struct
ixgbe_hw
*
,
bool
,
int
);
/* Flow Control */
/* Flow Control */
s32
(
*
fc_enable
)(
struct
ixgbe_hw
*
,
s32
);
s32
(
*
fc_enable
)(
struct
ixgbe_hw
*
,
s32
);
...
...
drivers/net/ixgbe/ixgbe_x540.c
View file @
041110a4
...
@@ -685,6 +685,8 @@ static struct ixgbe_mac_operations mac_ops_X540 = {
...
@@ -685,6 +685,8 @@ static struct ixgbe_mac_operations mac_ops_X540 = {
.
fc_enable
=
&
ixgbe_fc_enable_generic
,
.
fc_enable
=
&
ixgbe_fc_enable_generic
,
.
init_uta_tables
=
&
ixgbe_init_uta_tables_generic
,
.
init_uta_tables
=
&
ixgbe_init_uta_tables_generic
,
.
setup_sfp
=
NULL
,
.
setup_sfp
=
NULL
,
.
set_mac_anti_spoofing
=
&
ixgbe_set_mac_anti_spoofing
,
.
set_vlan_anti_spoofing
=
&
ixgbe_set_vlan_anti_spoofing
,
};
};
static
struct
ixgbe_eeprom_operations
eeprom_ops_X540
=
{
static
struct
ixgbe_eeprom_operations
eeprom_ops_X540
=
{
...
...
drivers/net/ixgbevf/defines.h
View file @
041110a4
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
/* Device IDs */
/* Device IDs */
#define IXGBE_DEV_ID_82599_VF 0x10ED
#define IXGBE_DEV_ID_82599_VF 0x10ED
#define IXGBE_DEV_ID_X540_VF 0x1515
#define IXGBE_VF_IRQ_CLEAR_MASK 7
#define IXGBE_VF_IRQ_CLEAR_MASK 7
#define IXGBE_VF_MAX_TX_QUEUES 1
#define IXGBE_VF_MAX_TX_QUEUES 1
...
...
drivers/net/ixgbevf/ixgbevf.h
View file @
041110a4
...
@@ -275,9 +275,11 @@ enum ixbgevf_state_t {
...
@@ -275,9 +275,11 @@ enum ixbgevf_state_t {
enum
ixgbevf_boards
{
enum
ixgbevf_boards
{
board_82599_vf
,
board_82599_vf
,
board_X540_vf
,
};
};
extern
struct
ixgbevf_info
ixgbevf_vf_info
;
extern
struct
ixgbevf_info
ixgbevf_82599_vf_info
;
extern
struct
ixgbevf_info
ixgbevf_X540_vf_info
;
extern
struct
ixgbe_mac_operations
ixgbevf_mbx_ops
;
extern
struct
ixgbe_mac_operations
ixgbevf_mbx_ops
;
/* needed by ethtool.c */
/* needed by ethtool.c */
...
...
drivers/net/ixgbevf/ixgbevf_main.c
View file @
041110a4
...
@@ -51,13 +51,14 @@ char ixgbevf_driver_name[] = "ixgbevf";
...
@@ -51,13 +51,14 @@ char ixgbevf_driver_name[] = "ixgbevf";
static
const
char
ixgbevf_driver_string
[]
=
static
const
char
ixgbevf_driver_string
[]
=
"Intel(R) 82599 Virtual Function"
;
"Intel(R) 82599 Virtual Function"
;
#define DRV_VERSION "1.0.1
2
-k0"
#define DRV_VERSION "1.0.1
9
-k0"
const
char
ixgbevf_driver_version
[]
=
DRV_VERSION
;
const
char
ixgbevf_driver_version
[]
=
DRV_VERSION
;
static
char
ixgbevf_copyright
[]
=
static
char
ixgbevf_copyright
[]
=
"Copyright (c) 2009 - 2010 Intel Corporation."
;
"Copyright (c) 2009 - 2010 Intel Corporation."
;
static
const
struct
ixgbevf_info
*
ixgbevf_info_tbl
[]
=
{
static
const
struct
ixgbevf_info
*
ixgbevf_info_tbl
[]
=
{
[
board_82599_vf
]
=
&
ixgbevf_vf_info
,
[
board_82599_vf
]
=
&
ixgbevf_82599_vf_info
,
[
board_X540_vf
]
=
&
ixgbevf_X540_vf_info
,
};
};
/* ixgbevf_pci_tbl - PCI Device ID Table
/* ixgbevf_pci_tbl - PCI Device ID Table
...
@@ -71,6 +72,8 @@ static const struct ixgbevf_info *ixgbevf_info_tbl[] = {
...
@@ -71,6 +72,8 @@ static const struct ixgbevf_info *ixgbevf_info_tbl[] = {
static
struct
pci_device_id
ixgbevf_pci_tbl
[]
=
{
static
struct
pci_device_id
ixgbevf_pci_tbl
[]
=
{
{
PCI_VDEVICE
(
INTEL
,
IXGBE_DEV_ID_82599_VF
),
{
PCI_VDEVICE
(
INTEL
,
IXGBE_DEV_ID_82599_VF
),
board_82599_vf
},
board_82599_vf
},
{
PCI_VDEVICE
(
INTEL
,
IXGBE_DEV_ID_X540_VF
),
board_X540_vf
},
/* required last entry */
/* required last entry */
{
0
,
}
{
0
,
}
...
...
drivers/net/ixgbevf/vf.c
View file @
041110a4
...
@@ -381,8 +381,12 @@ static struct ixgbe_mac_operations ixgbevf_mac_ops = {
...
@@ -381,8 +381,12 @@ static struct ixgbe_mac_operations ixgbevf_mac_ops = {
.
set_vfta
=
ixgbevf_set_vfta_vf
,
.
set_vfta
=
ixgbevf_set_vfta_vf
,
};
};
struct
ixgbevf_info
ixgbevf_vf_info
=
{
struct
ixgbevf_info
ixgbevf_
82599_
vf_info
=
{
.
mac
=
ixgbe_mac_82599_vf
,
.
mac
=
ixgbe_mac_82599_vf
,
.
mac_ops
=
&
ixgbevf_mac_ops
,
.
mac_ops
=
&
ixgbevf_mac_ops
,
};
};
struct
ixgbevf_info
ixgbevf_X540_vf_info
=
{
.
mac
=
ixgbe_mac_X540_vf
,
.
mac_ops
=
&
ixgbevf_mac_ops
,
};
drivers/net/ixgbevf/vf.h
View file @
041110a4
...
@@ -73,6 +73,7 @@ struct ixgbe_mac_operations {
...
@@ -73,6 +73,7 @@ struct ixgbe_mac_operations {
enum
ixgbe_mac_type
{
enum
ixgbe_mac_type
{
ixgbe_mac_unknown
=
0
,
ixgbe_mac_unknown
=
0
,
ixgbe_mac_82599_vf
,
ixgbe_mac_82599_vf
,
ixgbe_mac_X540_vf
,
ixgbe_num_macs
ixgbe_num_macs
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment