aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel
diff options
context:
space:
mode:
authorBruce Allan <bruce.w.allan@intel.com>2012-02-22 04:02:26 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-02-25 00:34:15 -0500
commit1a46b40fbb1dfd698efbc7a9575aa64aed04d568 (patch)
tree46e479dcc8a92756cf91711d1b548c6ec6773572 /drivers/net/ethernet/intel
parentd1964eb138901286a170de8ed422efd227dd4daf (diff)
e1000e: cleanup: rename e1000e_setup_link() and call as function pointer
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>
Diffstat (limited to 'drivers/net/ethernet/intel')
-rw-r--r--drivers/net/ethernet/intel/e1000e/80003es2lan.c4
-rw-r--r--drivers/net/ethernet/intel/e1000e/82571.c4
-rw-r--r--drivers/net/ethernet/intel/e1000e/e1000.h2
-rw-r--r--drivers/net/ethernet/intel/e1000e/ich8lan.c2
-rw-r--r--drivers/net/ethernet/intel/e1000e/mac.c4
5 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/80003es2lan.c b/drivers/net/ethernet/intel/e1000e/80003es2lan.c
index c1464845439d..e1cbead69409 100644
--- a/drivers/net/ethernet/intel/e1000e/80003es2lan.c
+++ b/drivers/net/ethernet/intel/e1000e/80003es2lan.c
@@ -838,7 +838,7 @@ static s32 e1000_init_hw_80003es2lan(struct e1000_hw *hw)
838 E1000_WRITE_REG_ARRAY(hw, E1000_MTA, i, 0); 838 E1000_WRITE_REG_ARRAY(hw, E1000_MTA, i, 0);
839 839
840 /* Setup link and flow control */ 840 /* Setup link and flow control */
841 ret_val = e1000e_setup_link(hw); 841 ret_val = mac->ops.setup_link(hw);
842 842
843 /* Disable IBIST slave mode (far-end loopback) */ 843 /* Disable IBIST slave mode (far-end loopback) */
844 e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, 844 e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM,
@@ -1429,7 +1429,7 @@ static const struct e1000_mac_operations es2_mac_ops = {
1429 .clear_vfta = e1000_clear_vfta_generic, 1429 .clear_vfta = e1000_clear_vfta_generic,
1430 .reset_hw = e1000_reset_hw_80003es2lan, 1430 .reset_hw = e1000_reset_hw_80003es2lan,
1431 .init_hw = e1000_init_hw_80003es2lan, 1431 .init_hw = e1000_init_hw_80003es2lan,
1432 .setup_link = e1000e_setup_link, 1432 .setup_link = e1000e_setup_link_generic,
1433 /* setup_physical_interface dependent on media type */ 1433 /* setup_physical_interface dependent on media type */
1434 .setup_led = e1000e_setup_led_generic, 1434 .setup_led = e1000e_setup_led_generic,
1435}; 1435};
diff --git a/drivers/net/ethernet/intel/e1000e/82571.c b/drivers/net/ethernet/intel/e1000e/82571.c
index 2ca6377bd015..721c2030ebe3 100644
--- a/drivers/net/ethernet/intel/e1000e/82571.c
+++ b/drivers/net/ethernet/intel/e1000e/82571.c
@@ -1143,7 +1143,7 @@ static s32 e1000_init_hw_82571(struct e1000_hw *hw)
1143 E1000_WRITE_REG_ARRAY(hw, E1000_MTA, i, 0); 1143 E1000_WRITE_REG_ARRAY(hw, E1000_MTA, i, 0);
1144 1144
1145 /* Setup link and flow control */ 1145 /* Setup link and flow control */
1146 ret_val = e1000_setup_link_82571(hw); 1146 ret_val = mac->ops.setup_link(hw);
1147 1147
1148 /* Set the transmit descriptor write-back policy */ 1148 /* Set the transmit descriptor write-back policy */
1149 reg_data = er32(TXDCTL(0)); 1149 reg_data = er32(TXDCTL(0));
@@ -1455,7 +1455,7 @@ static s32 e1000_setup_link_82571(struct e1000_hw *hw)
1455 break; 1455 break;
1456 } 1456 }
1457 1457
1458 return e1000e_setup_link(hw); 1458 return e1000e_setup_link_generic(hw);
1459} 1459}
1460 1460
1461/** 1461/**
diff --git a/drivers/net/ethernet/intel/e1000e/e1000.h b/drivers/net/ethernet/intel/e1000e/e1000.h
index 2a0d658b596c..22e03e567fed 100644
--- a/drivers/net/ethernet/intel/e1000e/e1000.h
+++ b/drivers/net/ethernet/intel/e1000e/e1000.h
@@ -564,7 +564,7 @@ extern void e1000e_clear_hw_cntrs_base(struct e1000_hw *hw);
564extern s32 e1000e_setup_fiber_serdes_link(struct e1000_hw *hw); 564extern s32 e1000e_setup_fiber_serdes_link(struct e1000_hw *hw);
565extern s32 e1000e_copper_link_setup_m88(struct e1000_hw *hw); 565extern s32 e1000e_copper_link_setup_m88(struct e1000_hw *hw);
566extern s32 e1000e_copper_link_setup_igp(struct e1000_hw *hw); 566extern s32 e1000e_copper_link_setup_igp(struct e1000_hw *hw);
567extern s32 e1000e_setup_link(struct e1000_hw *hw); 567extern s32 e1000e_setup_link_generic(struct e1000_hw *hw);
568extern void e1000_clear_vfta_generic(struct e1000_hw *hw); 568extern void e1000_clear_vfta_generic(struct e1000_hw *hw);
569extern void e1000e_init_rx_addrs(struct e1000_hw *hw, u16 rar_count); 569extern void e1000e_init_rx_addrs(struct e1000_hw *hw, u16 rar_count);
570extern void e1000e_update_mc_addr_list_generic(struct e1000_hw *hw, 570extern void e1000e_update_mc_addr_list_generic(struct e1000_hw *hw,
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c
index 7d3a7fb11dd3..8b9bf94f9887 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
@@ -3212,7 +3212,7 @@ static s32 e1000_init_hw_ich8lan(struct e1000_hw *hw)
3212 } 3212 }
3213 3213
3214 /* Setup link and flow control */ 3214 /* Setup link and flow control */
3215 ret_val = e1000_setup_link_ich8lan(hw); 3215 ret_val = mac->ops.setup_link(hw);
3216 3216
3217 /* Set the transmit descriptor write-back policy for both queues */ 3217 /* Set the transmit descriptor write-back policy for both queues */
3218 txdctl = er32(TXDCTL(0)); 3218 txdctl = er32(TXDCTL(0));
diff --git a/drivers/net/ethernet/intel/e1000e/mac.c b/drivers/net/ethernet/intel/e1000e/mac.c
index aaf4a4d731b6..6e48895aa2ef 100644
--- a/drivers/net/ethernet/intel/e1000e/mac.c
+++ b/drivers/net/ethernet/intel/e1000e/mac.c
@@ -693,7 +693,7 @@ static s32 e1000_set_default_fc_generic(struct e1000_hw *hw)
693} 693}
694 694
695/** 695/**
696 * e1000e_setup_link - Setup flow control and link settings 696 * e1000e_setup_link_generic - Setup flow control and link settings
697 * @hw: pointer to the HW structure 697 * @hw: pointer to the HW structure
698 * 698 *
699 * Determines which flow control settings to use, then configures flow 699 * 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)
702 * should be established. Assumes the hardware has previously been reset 702 * should be established. Assumes the hardware has previously been reset
703 * and the transmitter and receiver are not enabled. 703 * and the transmitter and receiver are not enabled.
704 **/ 704 **/
705s32 e1000e_setup_link(struct e1000_hw *hw) 705s32 e1000e_setup_link_generic(struct e1000_hw *hw)
706{ 706{
707 struct e1000_mac_info *mac = &hw->mac; 707 struct e1000_mac_info *mac = &hw->mac;
708 s32 ret_val; 708 s32 ret_val;