aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_x540.c
diff options
context:
space:
mode:
authorEmil Tantilov <emil.s.tantilov@intel.com>2011-03-18 04:18:22 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2011-04-13 22:21:52 -0400
commit7184b7cf555f5bc08e34994147c341abb07d1dbb (patch)
tree6273596a819234c83a8f2f3ca496920a191a58bc /drivers/net/ixgbe/ixgbe_x540.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_x540.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_x540.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/drivers/net/ixgbe/ixgbe_x540.c b/drivers/net/ixgbe/ixgbe_x540.c
index 7ce3f45cad71..295c17003d6d 100644
--- a/drivers/net/ixgbe/ixgbe_x540.c
+++ b/drivers/net/ixgbe/ixgbe_x540.c
@@ -226,6 +226,28 @@ mac_reset_top:
226} 226}
227 227
228/** 228/**
229 * ixgbe_start_hw_X540 - Prepare hardware for Tx/Rx
230 * @hw: pointer to hardware structure
231 *
232 * Starts the hardware using the generic start_hw function
233 * and the generation start_hw function.
234 * Then performs revision-specific operations, if any.
235 **/
236static s32 ixgbe_start_hw_X540(struct ixgbe_hw *hw)
237{
238 s32 ret_val = 0;
239
240 ret_val = ixgbe_start_hw_generic(hw);
241 if (ret_val != 0)
242 goto out;
243
244 ret_val = ixgbe_start_hw_gen2(hw);
245
246out:
247 return ret_val;
248}
249
250/**
229 * ixgbe_get_supported_physical_layer_X540 - Returns physical layer type 251 * ixgbe_get_supported_physical_layer_X540 - Returns physical layer type
230 * @hw: pointer to hardware structure 252 * @hw: pointer to hardware structure
231 * 253 *
@@ -660,7 +682,7 @@ static void ixgbe_release_swfw_sync_semaphore(struct ixgbe_hw *hw)
660static struct ixgbe_mac_operations mac_ops_X540 = { 682static struct ixgbe_mac_operations mac_ops_X540 = {
661 .init_hw = &ixgbe_init_hw_generic, 683 .init_hw = &ixgbe_init_hw_generic,
662 .reset_hw = &ixgbe_reset_hw_X540, 684 .reset_hw = &ixgbe_reset_hw_X540,
663 .start_hw = &ixgbe_start_hw_generic, 685 .start_hw = &ixgbe_start_hw_X540,
664 .clear_hw_cntrs = &ixgbe_clear_hw_cntrs_generic, 686 .clear_hw_cntrs = &ixgbe_clear_hw_cntrs_generic,
665 .get_media_type = &ixgbe_get_media_type_X540, 687 .get_media_type = &ixgbe_get_media_type_X540,
666 .get_supported_physical_layer = 688 .get_supported_physical_layer =