summaryrefslogtreecommitdiff
path: root/drivers/net/ixgbe/ixgbe_82599.c
diff options
context:
space:
mode:
authorEmil Tantilov <emil.s.tantilov@intel.com>2011-03-18 08:18:22 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2011-04-13 19:21:52 -0700
commit7184b7cf555f5bc08e34994147c341abb07d1dbb (patch)
tree6273596a819234c83a8f2f3ca496920a191a58bc /drivers/net/ixgbe/ixgbe_82599.c
parent75e3d3c6812ef2387f8dcfd86437cff00f64b68b (diff)
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_82599.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_82599.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/net/ixgbe/ixgbe_82599.c b/drivers/net/ixgbe/ixgbe_82599.c
index 32ad4119ff7..09934a82eb3 100644
--- a/drivers/net/ixgbe/ixgbe_82599.c
+++ b/drivers/net/ixgbe/ixgbe_82599.c
@@ -1740,30 +1740,28 @@ static s32 ixgbe_write_analog_reg8_82599(struct ixgbe_hw *hw, u32 reg, u8 val)
* ixgbe_start_hw_82599 - Prepare hardware for Tx/Rx
* @hw: pointer to hardware structure
*
- * Starts the hardware using the generic start_hw function.
- * Then performs device-specific:
- * Clears the rate limiter registers.
+ * Starts the hardware using the generic start_hw function
+ * and the generation start_hw function.
+ * Then performs revision-specific operations, if any.
**/
static s32 ixgbe_start_hw_82599(struct ixgbe_hw *hw)
{
- u32 q_num;
- s32 ret_val;
+ s32 ret_val = 0;
ret_val = ixgbe_start_hw_generic(hw);
+ if (ret_val != 0)
+ goto out;
- /* Clear the rate limiters */
- for (q_num = 0; q_num < hw->mac.max_tx_queues; q_num++) {
- IXGBE_WRITE_REG(hw, IXGBE_RTTDQSEL, q_num);
- IXGBE_WRITE_REG(hw, IXGBE_RTTBCNRC, 0);
- }
- IXGBE_WRITE_FLUSH(hw);
+ ret_val = ixgbe_start_hw_gen2(hw);
+ if (ret_val != 0)
+ goto out;
/* We need to run link autotry after the driver loads */
hw->mac.autotry_restart = true;
if (ret_val == 0)
ret_val = ixgbe_verify_fw_version_82599(hw);
-
+out:
return ret_val;
}