aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Rose <gregory.v.rose@intel.com>2010-01-22 17:47:00 -0500
committerDavid S. Miller <davem@davemloft.net>2010-01-23 04:13:55 -0500
commita9ee25a2b87c8077042ce23d3231f67f026719b0 (patch)
tree694507f13457ad07efaeb830b06ab175b1579e4c
parent767081adbd920ce93e3f1cbe797d0631637f92b3 (diff)
ixgbevf: Take action when the PF notifies the VF it is resetting.
When the VF driver gets a control message from the PF that indicates the PF is about to reset or go down we schedule the watchdog timer so that it will detect the PF has gone offline and take appropriate action. 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>
-rw-r--r--drivers/net/ixgbevf/ixgbevf_main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ixgbevf/ixgbevf_main.c b/drivers/net/ixgbevf/ixgbevf_main.c
index 39544afdc57f..bd2fd4608ed7 100644
--- a/drivers/net/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ixgbevf/ixgbevf_main.c
@@ -956,10 +956,17 @@ static irqreturn_t ixgbevf_msix_mbx(int irq, void *data)
956 struct ixgbevf_adapter *adapter = netdev_priv(netdev); 956 struct ixgbevf_adapter *adapter = netdev_priv(netdev);
957 struct ixgbe_hw *hw = &adapter->hw; 957 struct ixgbe_hw *hw = &adapter->hw;
958 u32 eicr; 958 u32 eicr;
959 u32 msg;
959 960
960 eicr = IXGBE_READ_REG(hw, IXGBE_VTEICS); 961 eicr = IXGBE_READ_REG(hw, IXGBE_VTEICS);
961 IXGBE_WRITE_REG(hw, IXGBE_VTEICR, eicr); 962 IXGBE_WRITE_REG(hw, IXGBE_VTEICR, eicr);
962 963
964 hw->mbx.ops.read(hw, &msg, 1);
965
966 if ((msg & IXGBE_MBVFICR_VFREQ_MASK) == IXGBE_PF_CONTROL_MSG)
967 mod_timer(&adapter->watchdog_timer,
968 round_jiffies(jiffies + 10));
969
963 return IRQ_HANDLED; 970 return IRQ_HANDLED;
964} 971}
965 972