Commit 57cde763 authored by Bruce Allan's avatar Bruce Allan Committed by Jeff Kirsher
Browse files

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: default avatarBruce Allan <bruce.w.allan@intel.com>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 6e3c8075
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1432,6 +1432,7 @@ static const struct e1000_mac_operations es2_mac_ops = {
	.setup_link		= e1000e_setup_link_generic,
	/* setup_physical_interface dependent on media type */
	.setup_led		= e1000e_setup_led_generic,
	.config_collision_dist	= e1000e_config_collision_dist_generic,
};

static const struct e1000_phy_operations es2_phy_ops = {
+1 −0
Original line number Diff line number Diff line
@@ -1927,6 +1927,7 @@ static const struct e1000_mac_operations e82571_mac_ops = {
	.setup_link		= e1000_setup_link_82571,
	/* .setup_physical_interface: media type dependent */
	.setup_led		= e1000e_setup_led_generic,
	.config_collision_dist	= e1000e_config_collision_dist_generic,
	.read_mac_addr		= e1000_read_mac_addr_82571,
};

+1 −1
Original line number Diff line number Diff line
@@ -575,7 +575,7 @@ extern s32 e1000e_set_fc_watermarks(struct e1000_hw *hw);
extern void e1000e_set_pcie_no_snoop(struct e1000_hw *hw, u32 no_snoop);
extern s32 e1000e_get_hw_semaphore(struct e1000_hw *hw);
extern s32 e1000e_valid_led_default(struct e1000_hw *hw, u16 *data);
extern void e1000e_config_collision_dist(struct e1000_hw *hw);
extern void e1000e_config_collision_dist_generic(struct e1000_hw *hw);
extern s32 e1000e_config_fc_after_link_up(struct e1000_hw *hw);
extern s32 e1000e_force_mac_fc(struct e1000_hw *hw);
extern s32 e1000e_blink_led_generic(struct e1000_hw *hw);
+1 −0
Original line number Diff line number Diff line
@@ -781,6 +781,7 @@ struct e1000_mac_operations {
	s32  (*setup_physical_interface)(struct e1000_hw *);
	s32  (*setup_led)(struct e1000_hw *);
	void (*write_vfta)(struct e1000_hw *, u32, u32);
	void (*config_collision_dist)(struct e1000_hw *);
	s32  (*read_mac_addr)(struct e1000_hw *);
};

+2 −1
Original line number Diff line number Diff line
@@ -746,7 +746,7 @@ static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
	 * of MAC speed/duplex configuration.  So we only need to
	 * configure Collision Distance in the MAC.
	 */
	e1000e_config_collision_dist(hw);
	mac->ops.config_collision_dist(hw);

	/*
	 * Configure Flow Control now that Auto-Neg has completed.
@@ -4022,6 +4022,7 @@ static const struct e1000_mac_operations ich8_mac_ops = {
	.setup_link		= e1000_setup_link_ich8lan,
	.setup_physical_interface= e1000_setup_copper_link_ich8lan,
	/* id_led_init dependent on mac type */
	.config_collision_dist	= e1000e_config_collision_dist_generic,
};

static const struct e1000_phy_operations ich8_phy_ops = {
Loading