summaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_sriov.c
diff options
context:
space:
mode:
authorGreg Rose <gregory.v.rose@intel.com>2010-01-22 22:46:40 +0000
committerDavid S. Miller <davem@davemloft.net>2010-01-23 01:13:55 -0800
commit767081adbd920ce93e3f1cbe797d0631637f92b3 (patch)
treeac2abe391813533691229513fb89dbcfe4d4a0ea /drivers/net/ixgbe/ixgbe_sriov.c
parentc9205697c7527173c8f8bfa9f8c9dabdbced3c49 (diff)
downloadop-kernel-dev-767081adbd920ce93e3f1cbe797d0631637f92b3.zip
op-kernel-dev-767081adbd920ce93e3f1cbe797d0631637f92b3.tar.gz
ixgbe: Improve reset coordination between the PF and the VF
Inadequate coordination between the PF driver and the VF driver results in tx hangs in the VF driver when you perform certain actions that will lead to a re-init of the PF. Add feature to notify active VFs when the PF is about to re-initialize so that the VFs can 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>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_sriov.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_sriov.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/net/ixgbe/ixgbe_sriov.c b/drivers/net/ixgbe/ixgbe_sriov.c
index 74bca74..d4cd20f 100644
--- a/drivers/net/ixgbe/ixgbe_sriov.c
+++ b/drivers/net/ixgbe/ixgbe_sriov.c
@@ -334,3 +334,29 @@ void ixgbe_msg_task(struct ixgbe_adapter *adapter)
}
}
+void ixgbe_disable_tx_rx(struct ixgbe_adapter *adapter)
+{
+ struct ixgbe_hw *hw = &adapter->hw;
+
+ /* disable transmit and receive for all vfs */
+ IXGBE_WRITE_REG(hw, IXGBE_VFTE(0), 0);
+ IXGBE_WRITE_REG(hw, IXGBE_VFTE(1), 0);
+
+ IXGBE_WRITE_REG(hw, IXGBE_VFRE(0), 0);
+ IXGBE_WRITE_REG(hw, IXGBE_VFRE(1), 0);
+}
+
+void ixgbe_ping_all_vfs(struct ixgbe_adapter *adapter)
+{
+ struct ixgbe_hw *hw = &adapter->hw;
+ u32 ping;
+ int i;
+
+ for (i = 0 ; i < adapter->num_vfs; i++) {
+ ping = IXGBE_PF_CONTROL_MSG;
+ if (adapter->vfinfo[i].clear_to_send)
+ ping |= IXGBE_VT_MSGTYPE_CTS;
+ ixgbe_write_mbx(hw, &ping, 1, i);
+ }
+}
+
OpenPOWER on IntegriCloud