summaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_common.c
diff options
context:
space:
mode:
authorEmil Tantilov2011-03-18 09:18:22 +0100
committerJeff Kirsher2011-04-14 04:21:52 +0200
commit7184b7cf555f5bc08e34994147c341abb07d1dbb (patch)
tree6273596a819234c83a8f2f3ca496920a191a58bc /drivers/net/ixgbe/ixgbe_common.c
parentixgbe: update version string for Dell CEM use (diff)
downloadkernel-qcow2-linux-7184b7cf555f5bc08e34994147c341abb07d1dbb.tar.gz
kernel-qcow2-linux-7184b7cf555f5bc08e34994147c341abb07d1dbb.tar.xz
kernel-qcow2-linux-7184b7cf555f5bc08e34994147c341abb07d1dbb.zip
ixgbe: refactor common start_hw code for 82599 and x540
Factored out the common start_hw code into a new function ixgbe_start_hw_gen2() so that it can be used by x540 and 82599. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Acked-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Evan Swanson <evan.swanson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_common.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_common.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/net/ixgbe/ixgbe_common.c b/drivers/net/ixgbe/ixgbe_common.c
index bcd952916eb2..c66fd957578c 100644
--- a/drivers/net/ixgbe/ixgbe_common.c
+++ b/drivers/net/ixgbe/ixgbe_common.c
@@ -96,6 +96,30 @@ s32 ixgbe_start_hw_generic(struct ixgbe_hw *hw)
}
/**
+ * ixgbe_start_hw_gen2 - Init sequence for common device family
+ * @hw: pointer to hw structure
+ *
+ * Performs the init sequence common to the second generation
+ * of 10 GbE devices.
+ * Devices in the second generation:
+ * 82599
+ * X540
+ **/
+s32 ixgbe_start_hw_gen2(struct ixgbe_hw *hw)
+{
+ u32 i;
+
+ /* Clear the rate limiters */
+ for (i = 0; i < hw->mac.max_tx_queues; i++) {
+ IXGBE_WRITE_REG(hw, IXGBE_RTTDQSEL, i);
+ IXGBE_WRITE_REG(hw, IXGBE_RTTBCNRC, 0);
+ }
+ IXGBE_WRITE_FLUSH(hw);
+
+ return 0;
+}
+
+/**
* ixgbe_init_hw_generic - Generic hardware initialization
* @hw: pointer to hardware structure
*