ixgbe: fix disabling of Tx laser at probe

register_netdev() calls ndo_set_features() which may result in HW reset
which in turn will bring the laser back up.

This patch moves ixgbe_laser_tx_disable() below register_netdev()
in ixgbe_probe() to make sure laser is shut off on load.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
Emil Tantilov 2011-10-19 07:59:55 +00:00 committed by Jeff Kirsher
parent 232ef6bc45
commit 93d3ce8faf

View File

@ -7588,13 +7588,6 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
goto err_eeprom;
}
/* power down the optics for multispeed fiber and 82599 SFP+ fiber */
if (hw->mac.ops.disable_tx_laser &&
((hw->phy.multispeed_fiber) ||
((hw->mac.ops.get_media_type(hw) == ixgbe_media_type_fiber) &&
(hw->mac.type == ixgbe_mac_82599EB))))
hw->mac.ops.disable_tx_laser(hw);
setup_timer(&adapter->service_timer, &ixgbe_service_timer,
(unsigned long) adapter);
@ -7692,6 +7685,13 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
if (err)
goto err_register;
/* power down the optics for multispeed fiber and 82599 SFP+ fiber */
if (hw->mac.ops.disable_tx_laser &&
((hw->phy.multispeed_fiber) ||
((hw->mac.ops.get_media_type(hw) == ixgbe_media_type_fiber) &&
(hw->mac.type == ixgbe_mac_82599EB))))
hw->mac.ops.disable_tx_laser(hw);
/* carrier off reporting is important to ethtool even BEFORE open */
netif_carrier_off(netdev);