From owner-freebsd-current@freebsd.org Sun Nov 15 21:57:23 2015 Return-Path: Delivered-To: freebsd-current@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 678A0A2FC82 for ; Sun, 15 Nov 2015 21:57:23 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 49F971992 for ; Sun, 15 Nov 2015 21:57:23 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: by mailman.ysv.freebsd.org (Postfix) id 49EBDA2FC81; Sun, 15 Nov 2015 21:57:23 +0000 (UTC) Delivered-To: current@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 49849A2FC80 for ; Sun, 15 Nov 2015 21:57:23 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "alchemy.franken.de", Issuer "alchemy.franken.de" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B82971991 for ; Sun, 15 Nov 2015 21:57:22 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.15.2/8.15.2/ALCHEMY.FRANKEN.DE) with ESMTPS id tAFLv6nX020652 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 15 Nov 2015 22:57:06 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.15.2/8.15.2/Submit) id tAFLv6Bm020651; Sun, 15 Nov 2015 22:57:06 +0100 (CET) (envelope-from marius) Date: Sun, 15 Nov 2015 22:57:06 +0100 From: Marius Strobl To: David Wolfskill , current@freebsd.org Subject: Re: Wake on LAN broken (probably between r290542 - r290606)? Message-ID: <20151115215706.GH31931@alchemy.franken.de> References: <20151111143337.GN1235@albert.catwhisker.org> <20151114175636.GX91465@albert.catwhisker.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Qxx1br4bt0+wmkIi" Content-Disposition: inline In-Reply-To: <20151114175636.GX91465@albert.catwhisker.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (alchemy.franken.de [0.0.0.0]); Sun, 15 Nov 2015 22:57:06 +0100 (CET) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2015 21:57:23 -0000 --Qxx1br4bt0+wmkIi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Nov 14, 2015 at 09:56:36AM -0800, David Wolfskill wrote: > On Wed, Nov 11, 2015 at 06:33:37AM -0800, David Wolfskill wrote: > > ... > > But a quick perusal of > > doesn't show > > anything especially like a "smoking gun" -- to me, anyway. > > > > Can anyone else confirm or refute my observations? Or suggest a > > hint? I'll try narrowing it down myself, but I need to do it during > > times I'm at home (so I can manually power the machine back up when > > it fails to respond to WoL), so it may be a few days before I can > > accomplish much that way. > > .... > > r290565 still works; r290566 fails -- in my case. r290566 changed some > re(4) behavior, and the NIC on my affected machine is an re(4): > > re0@pci0:3:0:0: class=0x020000 card=0x05b71028 chip=0x816810ec rev=0x0c > hdr=0x00 > vendor = 'Realtek Semiconductor Co., Ltd.' > device = 'RTL8111/8168/8411 PCI Express Gigabit Ethernet > Controller' > class = network > subclass = ethernet > > from "pciconf -lv" while running: > > D freebeast.catwhisker.org 11.0-CURRENT FreeBSD 11.0-CURRENT #1904 r290565M/290565:1100089: Sat Nov 14 09:44:33 PST 2015 root@freebeast.catwhisker.org:/common/S3/obj/usr/src/sys/GENERIC amd64 > > I've placed a copy of a verbose dmes.boot in > . > > I'm happy to test suggested changes. > *sigh* Okay, could you please test whether the attached patch restores WOL capability for you? Marius --Qxx1br4bt0+wmkIi Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="re.diff" Index: if_re.c =================================================================== --- if_re.c (revision 290566) +++ if_re.c (working copy) @@ -3851,6 +3852,11 @@ re_setwol(struct rl_softc *sc) CSR_READ_1(sc, RL_GPIO) & ~0x01); } if ((ifp->if_capenable & IFCAP_WOL) != 0) { + if ((sc->rl_flags & RL_FLAG_8168G_PLUS) != 0) { + /* Disable RXDV gate. */ + CSR_WRITE_4(sc, RL_MISC, CSR_READ_4(sc, RL_MISC) & + ~0x00080000); + } re_set_rxmode(sc); if ((sc->rl_flags & RL_FLAG_WOL_MANLINK) != 0) re_set_linkspeed(sc); --Qxx1br4bt0+wmkIi--