Message ID | 1334393478-31885-3-git-send-email-jeffrey.t.kirsher@intel.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
Jeff Kirsher wrote: > From: Don Skidmore<donald.c.skidmore@intel.com> > > 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. I'm ever-so-sorry if this is a silly question, but: WOL is receive-only, right? Why does the laser need to be on? Thanks, Jan -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
>-----Original Message----- >From: Jan Ceuleers [mailto:jan.ceuleers@computer.org] >Sent: Saturday, April 14, 2012 11:48 AM >To: Kirsher, Jeffrey T >Cc: davem@davemloft.net; Skidmore, Donald C; netdev@vger.kernel.org; >gospo@redhat.com; sassmann@redhat.com >Subject: Re: [net 2/2] ixgbe: fix WoL issue with fiber > >Jeff Kirsher wrote: >> From: Don Skidmore<donald.c.skidmore@intel.com> >> >> 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. > >I'm ever-so-sorry if this is a silly question, but: > >WOL is receive-only, right? Why does the laser need to be on? > >Thanks, Jan Without the laser on we can't get link and without link we can't get the magic packet to wake us up. Thanks, -Don Skidmore <donald.c.skidmore@intel.com> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 3e26b1f..dac7c01 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -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);