e1000e: cleanup: rename e1000e_setup_link() and call as function pointer
authorBruce Allan <bruce.w.allan@intel.com>
Wed, 22 Feb 2012 09:02:26 +0000 (09:02 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 25 Feb 2012 05:34:15 +0000 (21:34 -0800)
Rename e1000e_setup_link() to e1000e_setup_link_generic() to signify the
function is used for more than one MAC-family type.  The 82571-family has
a custom setup_link function which also calls the generic function.  The
ich8lan-family has a custom function which should just be called via the
function pointer.  The 80003es2lan-family just uses the generic function.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/e1000e/80003es2lan.c
drivers/net/ethernet/intel/e1000e/82571.c
drivers/net/ethernet/intel/e1000e/e1000.h
drivers/net/ethernet/intel/e1000e/ich8lan.c
drivers/net/ethernet/intel/e1000e/mac.c

index c1464845439d871a9a25df85a02c568bb81d40c1..e1cbead69409578f696ca3edd31ae18b6a8ddf2b 100644 (file)
@@ -838,7 +838,7 @@ static s32 e1000_init_hw_80003es2lan(struct e1000_hw *hw)
                E1000_WRITE_REG_ARRAY(hw, E1000_MTA, i, 0);
 
        /* Setup link and flow control */
-       ret_val = e1000e_setup_link(hw);
+       ret_val = mac->ops.setup_link(hw);
 
        /* Disable IBIST slave mode (far-end loopback) */
        e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM,
@@ -1429,7 +1429,7 @@ static const struct e1000_mac_operations es2_mac_ops = {
        .clear_vfta             = e1000_clear_vfta_generic,
        .reset_hw               = e1000_reset_hw_80003es2lan,
        .init_hw                = e1000_init_hw_80003es2lan,
-       .setup_link             = e1000e_setup_link,
+       .setup_link             = e1000e_setup_link_generic,
        /* setup_physical_interface dependent on media type */
        .setup_led              = e1000e_setup_led_generic,
 };
index 2ca6377bd01569be91c2118374706c4ceb35e0f8..721c2030ebe3c2da6b5d39662e331404e13396f4 100644 (file)
@@ -1143,7 +1143,7 @@ static s32 e1000_init_hw_82571(struct e1000_hw *hw)
                E1000_WRITE_REG_ARRAY(hw, E1000_MTA, i, 0);
 
        /* Setup link and flow control */
-       ret_val = e1000_setup_link_82571(hw);
+       ret_val = mac->ops.setup_link(hw);
 
        /* Set the transmit descriptor write-back policy */
        reg_data = er32(TXDCTL(0));
@@ -1455,7 +1455,7 @@ static s32 e1000_setup_link_82571(struct e1000_hw *hw)
                break;
        }
 
-       return e1000e_setup_link(hw);
+       return e1000e_setup_link_generic(hw);
 }
 
 /**
index 2a0d658b596c41adf76627ef8b2240a9be7f08f8..22e03e567fed4eb5d41102540751aaae6aaf60ee 100644 (file)
@@ -564,7 +564,7 @@ extern void e1000e_clear_hw_cntrs_base(struct e1000_hw *hw);
 extern s32 e1000e_setup_fiber_serdes_link(struct e1000_hw *hw);
 extern s32 e1000e_copper_link_setup_m88(struct e1000_hw *hw);
 extern s32 e1000e_copper_link_setup_igp(struct e1000_hw *hw);
-extern s32 e1000e_setup_link(struct e1000_hw *hw);
+extern s32 e1000e_setup_link_generic(struct e1000_hw *hw);
 extern void e1000_clear_vfta_generic(struct e1000_hw *hw);
 extern void e1000e_init_rx_addrs(struct e1000_hw *hw, u16 rar_count);
 extern void e1000e_update_mc_addr_list_generic(struct e1000_hw *hw,
index 7d3a7fb11dd373f32a6c21a951d5c1be2f594bbc..8b9bf94f9887e0719d427d93be3daef806a685fc 100644 (file)
@@ -3212,7 +3212,7 @@ static s32 e1000_init_hw_ich8lan(struct e1000_hw *hw)
        }
 
        /* Setup link and flow control */
-       ret_val = e1000_setup_link_ich8lan(hw);
+       ret_val = mac->ops.setup_link(hw);
 
        /* Set the transmit descriptor write-back policy for both queues */
        txdctl = er32(TXDCTL(0));
index aaf4a4d731b64b88fb1ae7f438f6b19298c679b3..6e48895aa2ef14a04ffb8081c583205e593c4dc8 100644 (file)
@@ -693,7 +693,7 @@ static s32 e1000_set_default_fc_generic(struct e1000_hw *hw)
 }
 
 /**
- *  e1000e_setup_link - Setup flow control and link settings
+ *  e1000e_setup_link_generic - Setup flow control and link settings
  *  @hw: pointer to the HW structure
  *
  *  Determines which flow control settings to use, then configures flow
@@ -702,7 +702,7 @@ static s32 e1000_set_default_fc_generic(struct e1000_hw *hw)
  *  should be established.  Assumes the hardware has previously been reset
  *  and the transmitter and receiver are not enabled.
  **/
-s32 e1000e_setup_link(struct e1000_hw *hw)
+s32 e1000e_setup_link_generic(struct e1000_hw *hw)
 {
        struct e1000_mac_info *mac = &hw->mac;
        s32 ret_val;