diff options
author | Emil Tantilov <emil.s.tantilov@intel.com> | 2011-03-18 04:18:22 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2011-04-13 22:21:52 -0400 |
commit | 7184b7cf555f5bc08e34994147c341abb07d1dbb (patch) | |
tree | 6273596a819234c83a8f2f3ca496920a191a58bc /drivers/net/ixgbe/ixgbe_common.c | |
parent | 75e3d3c6812ef2387f8dcfd86437cff00f64b68b (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_common.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_common.c | 24 |
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) | |||
96 | } | 96 | } |
97 | 97 | ||
98 | /** | 98 | /** |
99 | * ixgbe_start_hw_gen2 - Init sequence for common device family | ||
100 | * @hw: pointer to hw structure | ||
101 | * | ||
102 | * Performs the init sequence common to the second generation | ||
103 | * of 10 GbE devices. | ||
104 | * Devices in the second generation: | ||
105 | * 82599 | ||
106 | * X540 | ||
107 | **/ | ||
108 | s32 ixgbe_start_hw_gen2(struct ixgbe_hw *hw) | ||
109 | { | ||
110 | u32 i; | ||
111 | |||
112 | /* Clear the rate limiters */ | ||
113 | for (i = 0; i < hw->mac.max_tx_queues; i++) { | ||
114 | IXGBE_WRITE_REG(hw, IXGBE_RTTDQSEL, i); | ||
115 | IXGBE_WRITE_REG(hw, IXGBE_RTTBCNRC, 0); | ||
116 | } | ||
117 | IXGBE_WRITE_FLUSH(hw); | ||
118 | |||
119 | return 0; | ||
120 | } | ||
121 | |||
122 | /** | ||
99 | * ixgbe_init_hw_generic - Generic hardware initialization | 123 | * ixgbe_init_hw_generic - Generic hardware initialization |
100 | * @hw: pointer to hardware structure | 124 | * @hw: pointer to hardware structure |
101 | * | 125 | * |