]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
ixgbe: fix WoL issue with fiber
authorDon Skidmore <donald.c.skidmore@intel.com>
Thu, 5 Apr 2012 08:12:05 +0000 (08:12 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 14 Apr 2012 08:47:11 +0000 (01:47 -0700)
There are times we turn of the laser before shutdown.  This is a bad thing
if we want to wake on lan to work so now we make sure the laser is on
before shutdown if we support WoL.

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>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

index 3e26b1f9ac75f0811e9b6e4662b4b77c94a77c25..dac7c01f833230ae5112fb726ed042629903ce57 100644 (file)
@@ -4893,6 +4893,16 @@ static int __ixgbe_shutdown(struct pci_dev *pdev, bool *enable_wake)
        if (wufc) {
                ixgbe_set_rx_mode(netdev);
 
+               /*
+                * enable the optics for both mult-speed fiber and
+                * 82599 SFP+ fiber as we can WoL.
+                */
+               if (hw->mac.ops.enable_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.enable_tx_laser(hw);
+
                /* turn on all-multi mode if wake on multicast is enabled */
                if (wufc & IXGBE_WUFC_MC) {
                        fctrl = IXGBE_READ_REG(hw, IXGBE_FCTRL);