diff options
author | David S. Miller <davem@davemloft.net> | 2010-04-27 15:49:13 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-27 15:49:13 -0400 |
commit | e1703b36c358dde24ececba4fd609ecd91433ba3 (patch) | |
tree | d59c333d0ad5bf72f165264eba6048c87fdc4e0f /drivers/net/ixgbe/ixgbe_main.c | |
parent | 7ec75c582e639d956ce3afd499f67febe6f902a4 (diff) | |
parent | e95ef5d3f6bc60433883e1ef65dac747acd0bf1a (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/e100.c
drivers/net/e1000e/netdev.c
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 a98ff0e76e86..32781b3f8964 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -2991,6 +2991,10 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter) | |||
2991 | else | 2991 | else |
2992 | ixgbe_configure_msi_and_legacy(adapter); | 2992 | ixgbe_configure_msi_and_legacy(adapter); |
2993 | 2993 | ||
2994 | /* enable the optics */ | ||
2995 | if (hw->phy.multispeed_fiber) | ||
2996 | hw->mac.ops.enable_tx_laser(hw); | ||
2997 | |||
2994 | clear_bit(__IXGBE_DOWN, &adapter->state); | 2998 | clear_bit(__IXGBE_DOWN, &adapter->state); |
2995 | ixgbe_napi_enable_all(adapter); | 2999 | ixgbe_napi_enable_all(adapter); |
2996 | 3000 | ||
@@ -3252,6 +3256,10 @@ void ixgbe_down(struct ixgbe_adapter *adapter) | |||
3252 | /* signal that we are down to the interrupt handler */ | 3256 | /* signal that we are down to the interrupt handler */ |
3253 | set_bit(__IXGBE_DOWN, &adapter->state); | 3257 | set_bit(__IXGBE_DOWN, &adapter->state); |
3254 | 3258 | ||
3259 | /* power down the optics */ | ||
3260 | if (hw->phy.multispeed_fiber) | ||
3261 | hw->mac.ops.disable_tx_laser(hw); | ||
3262 | |||
3255 | /* disable receive for all VFs and wait one second */ | 3263 | /* disable receive for all VFs and wait one second */ |
3256 | if (adapter->num_vfs) { | 3264 | if (adapter->num_vfs) { |
3257 | /* ping all the active vfs to let them know we are going down */ | 3265 | /* ping all the active vfs to let them know we are going down */ |
@@ -6262,6 +6270,10 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
6262 | goto err_eeprom; | 6270 | goto err_eeprom; |
6263 | } | 6271 | } |
6264 | 6272 | ||
6273 | /* power down the optics */ | ||
6274 | if (hw->phy.multispeed_fiber) | ||
6275 | hw->mac.ops.disable_tx_laser(hw); | ||
6276 | |||
6265 | init_timer(&adapter->watchdog_timer); | 6277 | init_timer(&adapter->watchdog_timer); |
6266 | adapter->watchdog_timer.function = &ixgbe_watchdog; | 6278 | adapter->watchdog_timer.function = &ixgbe_watchdog; |
6267 | adapter->watchdog_timer.data = (unsigned long)adapter; | 6279 | adapter->watchdog_timer.data = (unsigned long)adapter; |
@@ -6409,16 +6421,6 @@ static void __devexit ixgbe_remove(struct pci_dev *pdev) | |||
6409 | del_timer_sync(&adapter->sfp_timer); | 6421 | del_timer_sync(&adapter->sfp_timer); |
6410 | cancel_work_sync(&adapter->watchdog_task); | 6422 | cancel_work_sync(&adapter->watchdog_task); |
6411 | cancel_work_sync(&adapter->sfp_task); | 6423 | cancel_work_sync(&adapter->sfp_task); |
6412 | if (adapter->hw.phy.multispeed_fiber) { | ||
6413 | struct ixgbe_hw *hw = &adapter->hw; | ||
6414 | /* | ||
6415 | * Restart clause 37 autoneg, disable and re-enable | ||
6416 | * the tx laser, to clear & alert the link partner | ||
6417 | * that it needs to restart autotry | ||
6418 | */ | ||
6419 | hw->mac.autotry_restart = true; | ||
6420 | hw->mac.ops.flap_tx_laser(hw); | ||
6421 | } | ||
6422 | cancel_work_sync(&adapter->multispeed_fiber_task); | 6424 | cancel_work_sync(&adapter->multispeed_fiber_task); |
6423 | cancel_work_sync(&adapter->sfp_config_module_task); | 6425 | cancel_work_sync(&adapter->sfp_config_module_task); |
6424 | if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE || | 6426 | if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE || |