Skip to content

Commit

Permalink
ixgbevf: Take action when the PF notifies the VF it is resetting.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Greg Rose authored and David S. Miller committed Jan 23, 2010
1 parent 767081a commit a9ee25a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/net/ixgbevf/ixgbevf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -956,10 +956,17 @@ static irqreturn_t ixgbevf_msix_mbx(int irq, void *data)
struct ixgbevf_adapter *adapter = netdev_priv(netdev);
struct ixgbe_hw *hw = &adapter->hw;
u32 eicr;
u32 msg;

eicr = IXGBE_READ_REG(hw, IXGBE_VTEICS);
IXGBE_WRITE_REG(hw, IXGBE_VTEICR, eicr);

hw->mbx.ops.read(hw, &msg, 1);

if ((msg & IXGBE_MBVFICR_VFREQ_MASK) == IXGBE_PF_CONTROL_MSG)
mod_timer(&adapter->watchdog_timer,
round_jiffies(jiffies + 10));

return IRQ_HANDLED;
}

Expand Down

0 comments on commit a9ee25a

Please sign in to comment.