mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-12 08:46:38 +07:00
ixgbe: fix WoL issue with fiber
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>
This commit is contained in:
parent
92fe173391
commit
c509e754af
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user