Re: Wake on LAN broken (probably between r290542 - r290606)?

2015-11-15 Thread Marius Strobl
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=0x02 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 
> r...@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

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) &
+			~0x0008);
+		}
 		re_set_rxmode(sc);
 		if ((sc->rl_flags & RL_FLAG_WOL_MANLINK) != 0)
 			re_set_linkspeed(sc);
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Re: Wake on LAN broken (probably between r290542 - r290606)?

2015-11-15 Thread David Wolfskill
On Sun, Nov 15, 2015 at 10:57:06PM +0100, Marius Strobl wrote:
> ...
> > 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?
> 

Aye; that worked for me.

I used the slice where I had tested r290566 and r290565 (most recently,
the latter), used "svn update -r290566" to update sources to r290566
first, then used "svn patch" to apply the aptch, then re-built world &
kernel & re-installed kernel & world, then rebooted, then "shutdown -p
now" to power off.

Once serial console reported:

...
re0: link state changed to DOWN
re0: link state changed to UP
acpi0: Powering system off


I used /usr/local/bin/wol on the machine that is supposed to wake the
build machine up, and it powered right up as it did before.

Thanks!

Peace,
david
-- 
David H. Wolfskill  da...@catwhisker.org
Those who would murder in the name of God or prophet are blasphemous cowards.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.


signature.asc
Description: PGP signature


Re: Wake on LAN broken (probably between r290542 - r290606)?

2015-11-14 Thread David Wolfskill
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=0x02 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 
r...@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.

Peace,
david
-- 
David H. Wolfskill  da...@catwhisker.org
Those who would murder in the name of God or prophet are blasphemous cowards.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.


signature.asc
Description: PGP signature


Re: Wake on LAN broken (probably between r290542 - r290606)?

2015-11-12 Thread Yuri

On 11/11/2015 06:33, David Wolfskill wrote:

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.


Did you confirm (for ex. with Wireshark) that wol actually sends the packet?
If you are trying to wake the machine that is not booted, this is 
primarily dependent on the BIOS of the target machine to wake it up.
In my experience, BIOSes are prone to losing settings, due to low 
battery, or other (sometimes mysterious) reasons.

Please confirm that BIOS setting "Wake On LAN" is on on target.

Yuri

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Wake on LAN broken (probably between r290542 - r290606)?

2015-11-12 Thread David Wolfskill
On Thu, Nov 12, 2015 at 05:02:27PM -0800, Yuri wrote:
> ...
> Did you confirm (for ex. with Wireshark) that wol actually sends the packet?
> If you are trying to wake the machine that is not booted, this is 
> primarily dependent on the BIOS of the target machine to wake it up.
> In my experience, BIOSes are prone to losing settings, due to low 
> battery, or other (sometimes mysterious) reasons.
> Please confirm that BIOS setting "Wake On LAN" is on on target.
> 

I confirmed it by successfully using the /usr/local/bin/wol program on
the target machine when the latter had last been booted to run FreeBSD
stable/10.

Previously, this worked whether the target machine had been running
stable/10 or head; now it only works if it had been running stable/10 at
the time the "shutdown -p now" command was issued.

Peace,
david
-- 
David H. Wolfskill  da...@catwhisker.org
Those who would murder in the name of God or prophet are blasphemous cowards.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.


signature.asc
Description: PGP signature


Wake on LAN broken (probably between r290542 - r290606)?

2015-11-11 Thread David Wolfskill
My build machine ("freebeast") spends most of the time powered off.

One of my "always on" machines has a crontab entry for 23:47 to use
/usr/local/bin/wol (from ports/net/wol) to wake it up in time to do some
periodinc "daily" things, update its local mirror of the SVN repos, and
update it ports working copy; after I've updated stable/10 & head on it,
I set it to boot from the stable/10 slice & power it off -- and the
cycle repeats.

At least, that's what happened with this machine's predecessor for
several years, and with this one since its deployment several months
ago, until yesterday morning.

Yesterday morning, the machine did not power on; I figured someone had
managed to manually power it off (vs. "shutdown -p"), took evasive
action, and resumed normal operations.

Upon a recurrence this morning -- and after the evasive action &
resumption of normal operations, I decided to test a bit.  The machine
was last running:

FreeBSD 11.0-CURRENT #1897  r290667M/290668:1100089: Wed Nov 11 04:45:58 PST 
2015 r...@freebeast.catwhisker.org:/common/S4/obj/usr/src/sys/GENERIC  amd64

I manually ran the /sur/local/bin/wol command... and Nothing Happened.

Went over to the machine; no lights.  Manualy turned it on (booting

FreeBSD 10.2-STABLE #1851  r290668M/290668:1002501: Wed Nov 11 04:20:05 PST 
2015 r...@freebeast.catwhisker.org:/common/S1/obj/usr/src/sys/GENERIC  amd64

-- just to be clear); once it came up, "shutdown -p now".  After seeing

...
acpi0: Powering system off

on serial console, re-issued /usr/local/bin/wol; machine came right up.

OK.  So /usr/local/bin/wol itself seems to be working, and freebeast's
hardware also seems OK.

Checking the log of builds for head on that machine, the last several
entries are:

FreeBSD 11.0-CURRENT #1892  r290439M/290439:1100086: Fri Nov  6 05:12:44 PST 
2015 r...@freebeast.catwhisker.org:/common/S4/obj/usr/src/sys/GENERIC  amd64
FreeBSD 11.0-CURRENT #1893  r290486M/290488:1100087: Sat Nov  7 07:48:26 PST 
2015 r...@freebeast.catwhisker.org:/common/S4/obj/usr/src/sys/GENERIC  amd64
FreeBSD 11.0-CURRENT #1894  r290542M/290542:1100089: Sun Nov  8 06:19:02 PST 
2015 r...@freebeast.catwhisker.org:/common/S4/obj/usr/src/sys/GENERIC  amd64
FreeBSD 11.0-CURRENT #1895  r290606M/290609:1100089: Mon Nov  9 04:44:14 PST 
2015 r...@freebeast.catwhisker.org:/common/S4/obj/usr/src/sys/GENERIC  amd64
FreeBSD 11.0-CURRENT #1896  r290647M/290647:1100089: Tue Nov 10 04:37:17 PST 
2015 r...@freebeast.catwhisker.org:/common/S4/obj/usr/src/sys/GENERIC  amd64
FreeBSD 11.0-CURRENT #1897  r290667M/290668:1100089: Wed Nov 11 04:45:58 PST 
2015 r...@freebeast.catwhisker.org:/common/S4/obj/usr/src/sys/GENERIC  amd64

and since I'm pretty sure I would have recalled had the "wake on
LAN" failed on Monday (and I don't recall that), it seems likely that
some change made that day (thus, a commit between r290542 - r290606)
is what would have done it.

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.

Peace,
david
-- 
David H. Wolfskill  da...@catwhisker.org
Those who would murder in the name of God or prophet are blasphemous cowards.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.


signature.asc
Description: PGP signature