diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2012-02-22 04:02:58 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2012-02-25 00:39:52 -0500 |
commit | 57cde7630c1911ea7e8e1561cccfde8096e8bcc7 (patch) | |
tree | 36a8dbfb7fcf6a72eaa0f39856f7159d90d17173 | |
parent | 6e3c807504a573aba1ff5aad99e235d04ac72269 (diff) |
e1000e: rename e1000e_config_collision_dist() and call as function pointer
Rename e1000e_config_collision_dist() to
e1000e_config_collision_dist_generic() to signify the function is used for
more than one MAC-family type, and set and use it as a MAC ops function
pointer to be consistent with the driver design.
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>
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/80003es2lan.c | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/82571.c | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/e1000.h | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/hw.h | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/ich8lan.c | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/mac.c | 11 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/netdev.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/phy.c | 4 |
8 files changed, 14 insertions, 11 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/80003es2lan.c b/drivers/net/ethernet/intel/e1000e/80003es2lan.c index 0ea3e7e404e6..6e58e94ff46b 100644 --- a/drivers/net/ethernet/intel/e1000e/80003es2lan.c +++ b/drivers/net/ethernet/intel/e1000e/80003es2lan.c | |||
@@ -1432,6 +1432,7 @@ static const struct e1000_mac_operations es2_mac_ops = { | |||
1432 | .setup_link = e1000e_setup_link_generic, | 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 | .config_collision_dist = e1000e_config_collision_dist_generic, | ||
1435 | }; | 1436 | }; |
1436 | 1437 | ||
1437 | static const struct e1000_phy_operations es2_phy_ops = { | 1438 | static const struct e1000_phy_operations es2_phy_ops = { |
diff --git a/drivers/net/ethernet/intel/e1000e/82571.c b/drivers/net/ethernet/intel/e1000e/82571.c index 721c2030ebe3..7f44ab76a200 100644 --- a/drivers/net/ethernet/intel/e1000e/82571.c +++ b/drivers/net/ethernet/intel/e1000e/82571.c | |||
@@ -1927,6 +1927,7 @@ static const struct e1000_mac_operations e82571_mac_ops = { | |||
1927 | .setup_link = e1000_setup_link_82571, | 1927 | .setup_link = e1000_setup_link_82571, |
1928 | /* .setup_physical_interface: media type dependent */ | 1928 | /* .setup_physical_interface: media type dependent */ |
1929 | .setup_led = e1000e_setup_led_generic, | 1929 | .setup_led = e1000e_setup_led_generic, |
1930 | .config_collision_dist = e1000e_config_collision_dist_generic, | ||
1930 | .read_mac_addr = e1000_read_mac_addr_82571, | 1931 | .read_mac_addr = e1000_read_mac_addr_82571, |
1931 | }; | 1932 | }; |
1932 | 1933 | ||
diff --git a/drivers/net/ethernet/intel/e1000e/e1000.h b/drivers/net/ethernet/intel/e1000e/e1000.h index f93d7a40e6ad..9f3a26859d6d 100644 --- a/drivers/net/ethernet/intel/e1000e/e1000.h +++ b/drivers/net/ethernet/intel/e1000e/e1000.h | |||
@@ -575,7 +575,7 @@ extern s32 e1000e_set_fc_watermarks(struct e1000_hw *hw); | |||
575 | extern void e1000e_set_pcie_no_snoop(struct e1000_hw *hw, u32 no_snoop); | 575 | extern void e1000e_set_pcie_no_snoop(struct e1000_hw *hw, u32 no_snoop); |
576 | extern s32 e1000e_get_hw_semaphore(struct e1000_hw *hw); | 576 | extern s32 e1000e_get_hw_semaphore(struct e1000_hw *hw); |
577 | extern s32 e1000e_valid_led_default(struct e1000_hw *hw, u16 *data); | 577 | extern s32 e1000e_valid_led_default(struct e1000_hw *hw, u16 *data); |
578 | extern void e1000e_config_collision_dist(struct e1000_hw *hw); | 578 | extern void e1000e_config_collision_dist_generic(struct e1000_hw *hw); |
579 | extern s32 e1000e_config_fc_after_link_up(struct e1000_hw *hw); | 579 | extern s32 e1000e_config_fc_after_link_up(struct e1000_hw *hw); |
580 | extern s32 e1000e_force_mac_fc(struct e1000_hw *hw); | 580 | extern s32 e1000e_force_mac_fc(struct e1000_hw *hw); |
581 | extern s32 e1000e_blink_led_generic(struct e1000_hw *hw); | 581 | extern s32 e1000e_blink_led_generic(struct e1000_hw *hw); |
diff --git a/drivers/net/ethernet/intel/e1000e/hw.h b/drivers/net/ethernet/intel/e1000e/hw.h index 197059bb9abf..50e114b68e39 100644 --- a/drivers/net/ethernet/intel/e1000e/hw.h +++ b/drivers/net/ethernet/intel/e1000e/hw.h | |||
@@ -781,6 +781,7 @@ struct e1000_mac_operations { | |||
781 | s32 (*setup_physical_interface)(struct e1000_hw *); | 781 | s32 (*setup_physical_interface)(struct e1000_hw *); |
782 | s32 (*setup_led)(struct e1000_hw *); | 782 | s32 (*setup_led)(struct e1000_hw *); |
783 | void (*write_vfta)(struct e1000_hw *, u32, u32); | 783 | void (*write_vfta)(struct e1000_hw *, u32, u32); |
784 | void (*config_collision_dist)(struct e1000_hw *); | ||
784 | s32 (*read_mac_addr)(struct e1000_hw *); | 785 | s32 (*read_mac_addr)(struct e1000_hw *); |
785 | }; | 786 | }; |
786 | 787 | ||
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c index 14366829f848..df91c426a098 100644 --- a/drivers/net/ethernet/intel/e1000e/ich8lan.c +++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c | |||
@@ -746,7 +746,7 @@ static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw) | |||
746 | * of MAC speed/duplex configuration. So we only need to | 746 | * of MAC speed/duplex configuration. So we only need to |
747 | * configure Collision Distance in the MAC. | 747 | * configure Collision Distance in the MAC. |
748 | */ | 748 | */ |
749 | e1000e_config_collision_dist(hw); | 749 | mac->ops.config_collision_dist(hw); |
750 | 750 | ||
751 | /* | 751 | /* |
752 | * Configure Flow Control now that Auto-Neg has completed. | 752 | * Configure Flow Control now that Auto-Neg has completed. |
@@ -4022,6 +4022,7 @@ static const struct e1000_mac_operations ich8_mac_ops = { | |||
4022 | .setup_link = e1000_setup_link_ich8lan, | 4022 | .setup_link = e1000_setup_link_ich8lan, |
4023 | .setup_physical_interface= e1000_setup_copper_link_ich8lan, | 4023 | .setup_physical_interface= e1000_setup_copper_link_ich8lan, |
4024 | /* id_led_init dependent on mac type */ | 4024 | /* id_led_init dependent on mac type */ |
4025 | .config_collision_dist = e1000e_config_collision_dist_generic, | ||
4025 | }; | 4026 | }; |
4026 | 4027 | ||
4027 | static const struct e1000_phy_operations ich8_phy_ops = { | 4028 | static const struct e1000_phy_operations ich8_phy_ops = { |
diff --git a/drivers/net/ethernet/intel/e1000e/mac.c b/drivers/net/ethernet/intel/e1000e/mac.c index 011d83ddad1e..f16a611e2ded 100644 --- a/drivers/net/ethernet/intel/e1000e/mac.c +++ b/drivers/net/ethernet/intel/e1000e/mac.c | |||
@@ -465,7 +465,7 @@ s32 e1000e_check_for_copper_link(struct e1000_hw *hw) | |||
465 | * of MAC speed/duplex configuration. So we only need to | 465 | * of MAC speed/duplex configuration. So we only need to |
466 | * configure Collision Distance in the MAC. | 466 | * configure Collision Distance in the MAC. |
467 | */ | 467 | */ |
468 | e1000e_config_collision_dist(hw); | 468 | mac->ops.config_collision_dist(hw); |
469 | 469 | ||
470 | /* | 470 | /* |
471 | * Configure Flow Control now that Auto-Neg has completed. | 471 | * Configure Flow Control now that Auto-Neg has completed. |
@@ -890,7 +890,7 @@ s32 e1000e_setup_fiber_serdes_link(struct e1000_hw *hw) | |||
890 | /* Take the link out of reset */ | 890 | /* Take the link out of reset */ |
891 | ctrl &= ~E1000_CTRL_LRST; | 891 | ctrl &= ~E1000_CTRL_LRST; |
892 | 892 | ||
893 | e1000e_config_collision_dist(hw); | 893 | hw->mac.ops.config_collision_dist(hw); |
894 | 894 | ||
895 | ret_val = e1000_commit_fc_settings_generic(hw); | 895 | ret_val = e1000_commit_fc_settings_generic(hw); |
896 | if (ret_val) | 896 | if (ret_val) |
@@ -925,14 +925,13 @@ s32 e1000e_setup_fiber_serdes_link(struct e1000_hw *hw) | |||
925 | } | 925 | } |
926 | 926 | ||
927 | /** | 927 | /** |
928 | * e1000e_config_collision_dist - Configure collision distance | 928 | * e1000e_config_collision_dist_generic - Configure collision distance |
929 | * @hw: pointer to the HW structure | 929 | * @hw: pointer to the HW structure |
930 | * | 930 | * |
931 | * Configures the collision distance to the default value and is used | 931 | * Configures the collision distance to the default value and is used |
932 | * during link setup. Currently no func pointer exists and all | 932 | * during link setup. |
933 | * implementations are handled in the generic version of this function. | ||
934 | **/ | 933 | **/ |
935 | void e1000e_config_collision_dist(struct e1000_hw *hw) | 934 | void e1000e_config_collision_dist_generic(struct e1000_hw *hw) |
936 | { | 935 | { |
937 | u32 tctl; | 936 | u32 tctl; |
938 | 937 | ||
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 3975ed1fb279..56c1aec65186 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c | |||
@@ -2855,7 +2855,7 @@ static void e1000_configure_tx(struct e1000_adapter *adapter) | |||
2855 | /* enable Report Status bit */ | 2855 | /* enable Report Status bit */ |
2856 | adapter->txd_cmd |= E1000_TXD_CMD_RS; | 2856 | adapter->txd_cmd |= E1000_TXD_CMD_RS; |
2857 | 2857 | ||
2858 | e1000e_config_collision_dist(hw); | 2858 | hw->mac.ops.config_collision_dist(hw); |
2859 | } | 2859 | } |
2860 | 2860 | ||
2861 | /** | 2861 | /** |
diff --git a/drivers/net/ethernet/intel/e1000e/phy.c b/drivers/net/ethernet/intel/e1000e/phy.c index d10b27fee201..683abac4a049 100644 --- a/drivers/net/ethernet/intel/e1000e/phy.c +++ b/drivers/net/ethernet/intel/e1000e/phy.c | |||
@@ -1181,7 +1181,7 @@ s32 e1000e_setup_copper_link(struct e1000_hw *hw) | |||
1181 | 1181 | ||
1182 | if (link) { | 1182 | if (link) { |
1183 | e_dbg("Valid link established!!!\n"); | 1183 | e_dbg("Valid link established!!!\n"); |
1184 | e1000e_config_collision_dist(hw); | 1184 | hw->mac.ops.config_collision_dist(hw); |
1185 | ret_val = e1000e_config_fc_after_link_up(hw); | 1185 | ret_val = e1000e_config_fc_after_link_up(hw); |
1186 | } else { | 1186 | } else { |
1187 | e_dbg("Unable to establish link!!!\n"); | 1187 | e_dbg("Unable to establish link!!!\n"); |
@@ -1489,7 +1489,7 @@ void e1000e_phy_force_speed_duplex_setup(struct e1000_hw *hw, u16 *phy_ctrl) | |||
1489 | e_dbg("Forcing 10mb\n"); | 1489 | e_dbg("Forcing 10mb\n"); |
1490 | } | 1490 | } |
1491 | 1491 | ||
1492 | e1000e_config_collision_dist(hw); | 1492 | hw->mac.ops.config_collision_dist(hw); |
1493 | 1493 | ||
1494 | ew32(CTRL, ctrl); | 1494 | ew32(CTRL, ctrl); |
1495 | } | 1495 | } |