From owner-freebsd-net@freebsd.org Sun Mar 27 15:32:48 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F960ADF688 for ; Sun, 27 Mar 2016 15:32:48 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 692F61E13; Sun, 27 Mar 2016 15:32:48 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from [192.168.200.206] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 410A3192991; Sun, 27 Mar 2016 15:32:47 +0000 (UTC) Subject: Re: Intel I219 V2 (if_em) Wake on LAN not working To: freebsd-net@freebsd.org References: <56F284A0.4050900@madpilot.net> <56F489F3.7010208@FreeBSD.org> From: Sean Bruno Message-ID: <56F7FD1E.8000806@freebsd.org> Date: Sun, 27 Mar 2016 08:32:46 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56F489F3.7010208@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2016 15:32:48 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 03/24/16 17:44, Eric van Gyzen wrote: > 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 metric 0 mtu >> 1500 >> >> options=4019b >> >> ether XXX >> inet XXX netmask 0xffffff00 broadcast XXX nd6 >> options=29 media: Ethernet >> autoselect (100baseTX ) status: active # ifconfig >> em0 wol # ifconfig em0 em0: >> flags=8843 metric 0 mtu >> 1500 >> >> options=4019b >> >> ether XXX >> inet XXX netmask 0xffffff00 broadcast XXX nd6 >> options=29 media: Ethernet >> autoselect (100baseTX ) status: active # sysctl >> dev.em.0.wake=1 dev.em.0.wake: 0 -> 1 # ifconfig em0 em0: >> flags=8843 metric 0 mtu >> 1500 >> >> options=4019b >> >> ether XXX >> inet XXX netmask 0xffffff00 broadcast XXX nd6 >> options=29 media: Ethernet >> autoselect (100baseTX ) status: active # ifconfig >> em0 wol # ifconfig em0 em0: >> flags=8843 metric 0 mtu >> 1500 >> >> options=4019b >> >> ether XXX >> inet XXX netmask 0xffffff00 broadcast XXX nd6 >> options=29 media: Ethernet >> autoselect (100baseTX ) 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 I'm guessing that we have some kind of missing test case. Let's start a bugzilla report so I can bring it to Intel's attention. I'll need a testcase as well so we can add this to regressions in the la b. sean bcc intel folks -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJW9/0eXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5k/tsH/03pClNslQJ4PYPqlMFkmn5a 6WbhOs5cOrYza4MzjP9kQXVf05m+VLLXu65KTbV3loK00fiuTtaVCGZyTLv9xaWL D7KWqt4OG/3bMDub0GwT8IGIzUkKyTCSxj6d8MyNkScxUPbvuLw2yIEIn9DN8dKU 7HupT0XPGWW7vwT9i9kV+BHzs4a7Vv/9Ipb1/TFYfRphnF0043gOs/hJL72S6OjP 8Cq9JNwTfXfVZjZ5EeLFicYnJdPD/kNl1kTkFCuMQYGG8PydtmiuByJHyYZQLAYy UNurwZPluaxh296VHnR6fxmuzkgtRVvstE7+Y24mfwwZqM4KBwypcOmWqNRRVIQ= =vU3f -----END PGP SIGNATURE-----