aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_82599.c
diff options
context:
space:
mode:
authorDon Skidmore <donald.c.skidmore@intel.com>2010-12-02 22:31:51 -0500
committerDavid S. Miller <davem@davemloft.net>2010-12-03 12:36:45 -0500
commitc6ecf39a10ceec3e97096e2a8d3eadcecd593422 (patch)
tree995ed9963bbec2026f71010727a4e1cbe904d415 /drivers/net/ixgbe/ixgbe_82599.c
parente4d849b8113b0cf7b6ebfa9ee4c47bd514ea49d3 (diff)
ixgbe: fix link behavior for SFP+ when driver is brought down
We have had several requests to have ifconfig down command disable the SFP+ laser and thus make link go down. Likewise on ifconfig up the laser would be enabled and link would come up. This patch enables that behavior. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_82599.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_82599.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/ixgbe/ixgbe_82599.c b/drivers/net/ixgbe/ixgbe_82599.c
index e34643eef162..8fa76785b45c 100644
--- a/drivers/net/ixgbe/ixgbe_82599.c
+++ b/drivers/net/ixgbe/ixgbe_82599.c
@@ -65,9 +65,9 @@ static s32 ixgbe_verify_fw_version_82599(struct ixgbe_hw *hw);
65static void ixgbe_init_mac_link_ops_82599(struct ixgbe_hw *hw) 65static void ixgbe_init_mac_link_ops_82599(struct ixgbe_hw *hw)
66{ 66{
67 struct ixgbe_mac_info *mac = &hw->mac; 67 struct ixgbe_mac_info *mac = &hw->mac;
68 if (hw->phy.multispeed_fiber) { 68
69 /* Set up dual speed SFP+ support */ 69 /* enable the laser control functions for SFP+ fiber */
70 mac->ops.setup_link = &ixgbe_setup_mac_link_multispeed_fiber; 70 if (mac->ops.get_media_type(hw) == ixgbe_media_type_fiber) {
71 mac->ops.disable_tx_laser = 71 mac->ops.disable_tx_laser =
72 &ixgbe_disable_tx_laser_multispeed_fiber; 72 &ixgbe_disable_tx_laser_multispeed_fiber;
73 mac->ops.enable_tx_laser = 73 mac->ops.enable_tx_laser =
@@ -77,6 +77,12 @@ static void ixgbe_init_mac_link_ops_82599(struct ixgbe_hw *hw)
77 mac->ops.disable_tx_laser = NULL; 77 mac->ops.disable_tx_laser = NULL;
78 mac->ops.enable_tx_laser = NULL; 78 mac->ops.enable_tx_laser = NULL;
79 mac->ops.flap_tx_laser = NULL; 79 mac->ops.flap_tx_laser = NULL;
80 }
81
82 if (hw->phy.multispeed_fiber) {
83 /* Set up dual speed SFP+ support */
84 mac->ops.setup_link = &ixgbe_setup_mac_link_multispeed_fiber;
85 } else {
80 if ((mac->ops.get_media_type(hw) == 86 if ((mac->ops.get_media_type(hw) ==
81 ixgbe_media_type_backplane) && 87 ixgbe_media_type_backplane) &&
82 (hw->phy.smart_speed == ixgbe_smart_speed_auto || 88 (hw->phy.smart_speed == ixgbe_smart_speed_auto ||