diff options
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 8f677cb86290..6c00ee493a3b 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -2982,6 +2982,10 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter) | |||
2982 | else | 2982 | else |
2983 | ixgbe_configure_msi_and_legacy(adapter); | 2983 | ixgbe_configure_msi_and_legacy(adapter); |
2984 | 2984 | ||
2985 | /* enable the optics */ | ||
2986 | if (hw->phy.multispeed_fiber) | ||
2987 | hw->mac.ops.enable_tx_laser(hw); | ||
2988 | |||
2985 | clear_bit(__IXGBE_DOWN, &adapter->state); | 2989 | clear_bit(__IXGBE_DOWN, &adapter->state); |
2986 | ixgbe_napi_enable_all(adapter); | 2990 | ixgbe_napi_enable_all(adapter); |
2987 | 2991 | ||
@@ -3243,6 +3247,10 @@ void ixgbe_down(struct ixgbe_adapter *adapter) | |||
3243 | /* signal that we are down to the interrupt handler */ | 3247 | /* signal that we are down to the interrupt handler */ |
3244 | set_bit(__IXGBE_DOWN, &adapter->state); | 3248 | set_bit(__IXGBE_DOWN, &adapter->state); |
3245 | 3249 | ||
3250 | /* power down the optics */ | ||
3251 | if (hw->phy.multispeed_fiber) | ||
3252 | hw->mac.ops.disable_tx_laser(hw); | ||
3253 | |||
3246 | /* disable receive for all VFs and wait one second */ | 3254 | /* disable receive for all VFs and wait one second */ |
3247 | if (adapter->num_vfs) { | 3255 | if (adapter->num_vfs) { |
3248 | /* ping all the active vfs to let them know we are going down */ | 3256 | /* ping all the active vfs to let them know we are going down */ |
@@ -6253,6 +6261,10 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
6253 | goto err_eeprom; | 6261 | goto err_eeprom; |
6254 | } | 6262 | } |
6255 | 6263 | ||
6264 | /* power down the optics */ | ||
6265 | if (hw->phy.multispeed_fiber) | ||
6266 | hw->mac.ops.disable_tx_laser(hw); | ||
6267 | |||
6256 | init_timer(&adapter->watchdog_timer); | 6268 | init_timer(&adapter->watchdog_timer); |
6257 | adapter->watchdog_timer.function = &ixgbe_watchdog; | 6269 | adapter->watchdog_timer.function = &ixgbe_watchdog; |
6258 | adapter->watchdog_timer.data = (unsigned long)adapter; | 6270 | adapter->watchdog_timer.data = (unsigned long)adapter; |
@@ -6400,16 +6412,6 @@ static void __devexit ixgbe_remove(struct pci_dev *pdev) | |||
6400 | del_timer_sync(&adapter->sfp_timer); | 6412 | del_timer_sync(&adapter->sfp_timer); |
6401 | cancel_work_sync(&adapter->watchdog_task); | 6413 | cancel_work_sync(&adapter->watchdog_task); |
6402 | cancel_work_sync(&adapter->sfp_task); | 6414 | cancel_work_sync(&adapter->sfp_task); |
6403 | if (adapter->hw.phy.multispeed_fiber) { | ||
6404 | struct ixgbe_hw *hw = &adapter->hw; | ||
6405 | /* | ||
6406 | * Restart clause 37 autoneg, disable and re-enable | ||
6407 | * the tx laser, to clear & alert the link partner | ||
6408 | * that it needs to restart autotry | ||
6409 | */ | ||
6410 | hw->mac.autotry_restart = true; | ||
6411 | hw->mac.ops.flap_tx_laser(hw); | ||
6412 | } | ||
6413 | cancel_work_sync(&adapter->multispeed_fiber_task); | 6415 | cancel_work_sync(&adapter->multispeed_fiber_task); |
6414 | cancel_work_sync(&adapter->sfp_config_module_task); | 6416 | cancel_work_sync(&adapter->sfp_config_module_task); |
6415 | if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE || | 6417 | if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE || |