aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbevf
diff options
context:
space:
mode:
authorGreg Rose <gregory.v.rose@intel.com>2013-01-04 07:37:31 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2013-01-19 04:41:57 -0800
commit088245a3584d13f94ff0b4c1610dae7d897b28f9 (patch)
tree09e9344691df457a36fca6192760a7c4d3439609 /drivers/net/ethernet/intel/ixgbevf
parentixgbevf: Fix link up messages (diff)
downloadlinux-dev-088245a3584d13f94ff0b4c1610dae7d897b28f9.tar.xz
linux-dev-088245a3584d13f94ff0b4c1610dae7d897b28f9.zip
ixgbevf: Fix statistics corruption
When the physical function (PF) is reset for any reason the statistics collection in ixgbevf_update_stats needs to wait to update until after the reset synchronization ensures that the PF driver is up and running and is finished with its own reset. Go ahead and clear the link flag to indicate this when the control message from the PF is received. The reset synchronization and recovery in the watchdog task will eventually set the link flag up when the PF has resumed. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbevf')
-rw-r--r--drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 3fbf0d20bda9..551e31dc25c5 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -762,9 +762,11 @@ static irqreturn_t ixgbevf_msix_other(int irq, void *data)
if (!hw->mbx.ops.check_for_msg(hw)) {
hw->mbx.ops.read(hw, &msg, 1);
- if ((msg & IXGBE_MBVFICR_VFREQ_MASK) == IXGBE_PF_CONTROL_MSG)
+ if ((msg & IXGBE_MBVFICR_VFREQ_MASK) == IXGBE_PF_CONTROL_MSG) {
mod_timer(&adapter->watchdog_timer,
round_jiffies(jiffies + 1));
+ adapter->link_up = false;
+ }
if (msg & IXGBE_VT_MSGTYPE_NACK)
dev_info(&pdev->dev,
@@ -2118,6 +2120,9 @@ void ixgbevf_update_stats(struct ixgbevf_adapter *adapter)
struct ixgbe_hw *hw = &adapter->hw;
int i;
+ if (!adapter->link_up)
+ return;
+
UPDATE_VF_COUNTER_32bit(IXGBE_VFGPRC, adapter->stats.last_vfgprc,
adapter->stats.vfgprc);
UPDATE_VF_COUNTER_32bit(IXGBE_VFGPTC, adapter->stats.last_vfgptc,