Netdev List
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: netdev@vger.kernel.org
Cc: gospo@redhat.com, Greg Rose <gregory.v.rose@intel.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [RFC PATCH v2 11/12] ixgbe: Add SR-IOV feature enablement code
Date: Fri, 18 Dec 2009 14:53:59 -0800	[thread overview]
Message-ID: <20091218225358.10698.75075.stgit@localhost.localdomain> (raw)
In-Reply-To: <20091218225043.10698.58897.stgit@localhost.localdomain>

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

Adds code to the core 82599 module to support SR-IOV features of the 82599
network controller

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/ixgbe/ixgbe_82599.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_82599.c b/drivers/net/ixgbe/ixgbe_82599.c
index 5383405..8d555a9 100644
--- a/drivers/net/ixgbe/ixgbe_82599.c
+++ b/drivers/net/ixgbe/ixgbe_82599.c
@@ -31,6 +31,7 @@
 
 #include "ixgbe.h"
 #include "ixgbe_phy.h"
+#include "ixgbe_mbx.h"
 
 #define IXGBE_82599_MAX_TX_QUEUES 128
 #define IXGBE_82599_MAX_RX_QUEUES 128
@@ -951,8 +952,6 @@ static s32 ixgbe_reset_hw_82599(struct ixgbe_hw *hw)
 
 	msleep(50);
 
-
-
 	/*
 	 * Store the original AUTOC/AUTOC2 values if they have not been
 	 * stored off yet.  Otherwise restore the stored original
@@ -1098,6 +1097,7 @@ static s32 ixgbe_set_vfta_82599(struct ixgbe_hw *hw, u32 vlan, u32 vind,
 	u32 bitindex;
 	u32 bits;
 	u32 first_empty_slot;
+	u32 vt_ctl;
 
 	if (vlan > 4095)
 		return IXGBE_ERR_PARAM;
@@ -1124,14 +1124,15 @@ static s32 ixgbe_set_vfta_82599(struct ixgbe_hw *hw, u32 vlan, u32 vind,
 
 
 	/* Part 2
-	 * If the vind is set
+	 * If VT mode is set
 	 *   Either vlan_on
 	 *     make sure the vlan is in VLVF
 	 *     set the vind bit in the matching VLVFB
 	 *   Or !vlan_on
 	 *     clear the pool bit and possibly the vind
 	 */
-	if (vind) {
+	vt_ctl = IXGBE_READ_REG(hw, IXGBE_VT_CTL);
+	if (vt_ctl & IXGBE_VT_CTL_VT_ENABLE) {
 		/* find the vlanid or the first empty slot */
 		first_empty_slot = 0;
 
@@ -2655,4 +2656,5 @@ struct ixgbe_info ixgbe_82599_info = {
 	.mac_ops                = &mac_ops_82599,
 	.eeprom_ops             = &eeprom_ops_82599,
 	.phy_ops                = &phy_ops_82599,
+	.mbx_ops                = &mbx_ops_82599,
 };


  parent reply	other threads:[~2009-12-18 22:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-18 22:51 [RFC PATCH v2 01/12] ixgbevf: Macros, data structures, useful defines and registers Jeff Kirsher
2009-12-18 22:51 ` [RFC PATCH v2 02/12] ixgbevf: 82599 Virtual Function core functions and header Jeff Kirsher
2009-12-21  5:03   ` Simon Horman
2009-12-23 20:22   ` Ben Hutchings
2009-12-23 21:36     ` Rose, Gregory V
2009-12-18 22:51 ` [RFC PATCH v2 03/12] ixgbevf: Mailbox communication Jeff Kirsher
2009-12-23 20:28   ` Ben Hutchings
2009-12-23 21:38     ` Rose, Gregory V
2009-12-18 22:51 ` [RFC PATCH v2 04/12] ixgbevf: Driver main and ethool interface module and main header Jeff Kirsher
2009-12-21  7:59   ` Simon Horman
2009-12-21 18:18     ` Rose, Gregory V
2009-12-23  0:05     ` Rose, Gregory V
2009-12-18 22:52 ` [RFC PATCH v2 05/12] ixgbevf: Driver Makefile Jeff Kirsher
2009-12-18 22:52 ` [RFC PATCH v2 06/12] ixgbevf: Kconfig, Makefile and Documentation Jeff Kirsher
2009-12-18 22:52 ` [RFC PATCH v2 07/12] ixgbe: Mailbox header and code module Jeff Kirsher
2009-12-18 22:53 ` [RFC PATCH v2 08/12] ixgbe: Add SR-IOV register, structure and bit defines Jeff Kirsher
2009-12-18 22:53 ` [RFC PATCH v2 09/12] ixgbe: Add SR-IOV specific features Jeff Kirsher
2009-12-18 22:53 ` [RFC PATCH v2 10/12] ixgbe: Add SR-IOV specific modules to driver Makefile Jeff Kirsher
2009-12-18 22:53 ` Jeff Kirsher [this message]
2009-12-18 22:54 ` [RFC PATCH v2 12/12] ixgbe: Add SR-IOV features to main module Jeff Kirsher
2009-12-21 18:38 ` [RFC PATCH v2 01/12] ixgbevf: Macros, data structures, useful defines and registers Ben Hutchings
2009-12-21 18:51   ` Rose, Gregory V

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=20091218225358.10698.75075.stgit@localhost.localdomain \
    --to=jeffrey.t.kirsher@intel.com \
    --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