summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
diff options
context:
space:
mode:
authorGreg Rose <gregory.v.rose@intel.com>2012-08-08 04:00:58 +0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-09-24 11:35:05 +0400
commit0584d999328f3033c038118fb891c9efd5f361df (patch)
tree75ee5efdbe4705e72aaa4a83d5a1bbd5eadde885 /drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
parent4b2cd27f834e526f933aa63ce91964b7581271f4 (diff)
downloadlinux-0584d999328f3033c038118fb891c9efd5f361df.tar.xz
ixgbe: Do not read the spoofed packets counter when not in IOV mode
The counter is not valid unless the controller is running in IOV mode. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_main.c')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 70d27a361857..29465be2a14a 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -5560,8 +5560,9 @@ 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)
+ /* Do not perform spoof check for 82598 or if not in IOV mode */
+ if (adapter->hw.mac.type == ixgbe_mac_82598EB ||
+ adapter->num_vfs == 0)
return;
ssvpc = IXGBE_READ_REG(&adapter->hw, IXGBE_SSVPC);