netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, gospo@redhat.com,
	Greg Rose <gregory.v.rose@intel.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next-2.6 PATCH 5/7] ixgbevf: Take action when the PF notifies the VF it is resetting.
Date: Sat, 23 Jan 2010 00:47:00 -0800	[thread overview]
Message-ID: <20100123084658.9865.8972.stgit@localhost.localdomain> (raw)
In-Reply-To: <20100123084457.9865.51853.stgit@localhost.localdomain>

From: Greg Rose <gregory.v.rose@intel.com>

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>
---

 drivers/net/ixgbevf/ixgbevf_main.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ixgbevf/ixgbevf_main.c b/drivers/net/ixgbevf/ixgbevf_main.c
index 39544af..bd2fd46 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)
 	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;
 }
 


  parent reply	other threads:[~2010-01-23  8:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-23  8:45 [net-next-2.6 PATCH 1/7] ixgbe: Set the correct pool when VLANs are added in SR-IOV mode Jeff Kirsher
2010-01-23  8:46 ` [net-next-2.6 PATCH 2/7] ixgbe: Remove unused emulation MAC storage from the per VF data structure Jeff Kirsher
2010-01-23  9:14   ` David Miller
2010-01-23  8:46 ` [net-next-2.6 PATCH 3/7] ixgbe: Allow the VF driver to be loaded before the PF driver Jeff Kirsher
2010-01-23  9:14   ` David Miller
2010-01-23  8:46 ` [net-next-2.6 PATCH 4/7] ixgbe: Improve reset coordination between the PF and the VF Jeff Kirsher
2010-01-23  9:14   ` David Miller
2010-01-23  8:47 ` Jeff Kirsher [this message]
2010-01-23  9:14   ` [net-next-2.6 PATCH 5/7] ixgbevf: Take action when the PF notifies the VF it is resetting David Miller
2010-01-23  8:47 ` [net-next-2.6 PATCH 6/7] ixgbevf: Fix panics in the VF driver Jeff Kirsher
2010-01-23  9:14   ` David Miller
2010-01-23  8:47 ` [net-next-2.6 PATCH 7/7] ixgbevf: Tell network stack to stop tx when the VF detects PF reset Jeff Kirsher
2010-01-23  9:14   ` David Miller
2010-01-23  9:14 ` [net-next-2.6 PATCH 1/7] ixgbe: Set the correct pool when VLANs are added in SR-IOV mode David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100123084658.9865.8972.stgit@localhost.localdomain \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=gregory.v.rose@intel.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).