Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Mar 2016 19:44:35 -0500
From:      Eric van Gyzen <vangyzen@FreeBSD.org>
To:        Guido Falsi <mad@madpilot.net>, freebsd-net@freebsd.org
Subject:   Re: Intel I219 V2 (if_em) Wake on LAN not working
Message-ID:  <56F489F3.7010208@FreeBSD.org>
In-Reply-To: <56F284A0.4050900@madpilot.net>
References:  <56F284A0.4050900@madpilot.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 03/23/16 06:57 AM, Guido Falsi wrote:
> Hi,
>
> I have a new machine with the I219 ethernet adapter. (PCI deviceID: 0x15b8).
>
> It works fine on the OS, but I cannot enable wake on lan on it in any way:
>
> # ifconfig em0
> em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
>
> options=4019b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,VLAN_HWTSO>
>         ether XXX
>         inet XXX netmask 0xffffff00 broadcast XXX
>         nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
>         media: Ethernet autoselect (100baseTX <full-duplex>)
>         status: active
> # ifconfig em0 wol
> # ifconfig em0
> em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
>
> options=4019b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,VLAN_HWTSO>
>         ether XXX
>         inet XXX netmask 0xffffff00 broadcast XXX
>         nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
>         media: Ethernet autoselect (100baseTX <full-duplex>)
>         status: active
> # sysctl dev.em.0.wake=1
> dev.em.0.wake: 0 -> 1
> # ifconfig em0
> em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
>
> options=4019b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,VLAN_HWTSO>
>         ether XXX
>         inet XXX netmask 0xffffff00 broadcast XXX
>         nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
>         media: Ethernet autoselect (100baseTX <full-duplex>)
>         status: active
> # ifconfig em0 wol
> # ifconfig em0
> em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
>
> options=4019b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,VLAN_HWTSO>
>         ether XXX
>         inet XXX netmask 0xffffff00 broadcast XXX
>         nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
>         media: Ethernet autoselect (100baseTX <full-duplex>)
>         status: active
> #
>
>
>
> Sending the WOL packet does not work after shutdown, while it works if
> turning off the machine from the BIOS (obviously appropriate flags in
> the BIOS are turned on) with the power button.

I have a new Dell XPS 8900 with the same NIC and the same problem.  I'm running
head (r297219).  I made the following two changes:

diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c
index 6f7458c..16c7495 100644
--- a/sys/dev/e1000/if_em.c
+++ b/sys/dev/e1000/if_em.c
@@ -5275,7 +5275,8 @@ em_get_wakeup(device_t dev)
                    NVM_INIT_CONTROL3_PORT_A, 1, &eeprom_data);
                break;
        }
-       if (eeprom_data & apme_mask)
+        device_printf(dev, "em_get_wakeup: eeprom_data %hu\n", eeprom_data);
+       //if (eeprom_data & apme_mask)
                adapter->wol = (E1000_WUFC_MAG | E1000_WUFC_MC);
        /*
          * We have the eeprom settings, now apply the special cases

>From that, I see that eeprom_data is 0, so adapter->wol stays zero, so ifconfig
doesn't show any WOL capabilities.  When I ignore the eeprom_data by commenting
out the "if" condition, WOL capabilities appear in ifconfig.  However, even when
I enable WOL with ifconfig, WOL still doesn't work after a "shutdown -p now". 
WOL only works after I power off using the power button before the kernel boots.

Eric



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?56F489F3.7010208>