RELENG_8 -- shutdown -p no longer powers off boxes

Guido Falsi mad at madpilot.net
Fri Apr 23 11:33:24 UTC 2010


On Fri, Apr 23, 2010 at 01:54:01AM -0700, Jeremy Chadwick wrote:
> On Fri, Apr 23, 2010 at 11:46:06AM +0300, Kostik Belousov wrote:
> > On Fri, Apr 23, 2010 at 01:12:10AM +0300, Andriy Gapon wrote:
> > > on 22/04/2010 17:35 Jeremy Chadwick said the following:
> > > > I went digging through HEAD commits between the above dates and wasn't
> > > > able to find much other than this, which appears to be the HEAD commit
> > > > that was MFC'd to RELENG_8:
> > > > 
> > > > http://freshbsd.org/2010/04/02/23/04/31
> > > 
> > > I don't think this has been MFC-ed to 8.
> > > Most likely a red herring.
> > > 
> > > AFAIK, there were no ACPI-related changes in 8 for the last couple of months, so
> > > the issue must be elsewhere.
> > 
> > I have the 5046A-XB SuperWorkstation, and I can confirm that it restarts
> > shortly after power halt. On the other hand, I thought that this is a
> > hardware bug.
> 
> In my case, it's not a hardware nor BIOS (ACPI) bug.  Both of my systems
> have worked just fine with "shutdown -p now" until recent commits to
> RELENG_8.  Something broke this functionality between March 30th and
> April 22nd.
> 
> I'll try to spend some time this weekend tracking it down...

Since I find this quite annoying I tried some experiments.

First I tried an "ifconfig em0 -wol" and after that the PC was able to
power down and stay powered down (left it there for 2 minutes...It
powers back up in no more than a second otherwise).

Disabling WOL from the BIOS on this machine seems not to change
anything. the functionality is enabled anyway by the driver.

As a temporary workaround I commented out this piece of code in if_em.c
(lines 2710-2714):

	/* Enable All WOL methods by default */
/*	if (adapter->wol) {
		ifp->if_capabilities |= IFCAP_WOL;
		ifp->if_capenable |= IFCAP_WOL;
	} */


I had a look at if_em.c and diffs from previous versions and noticed
that the last update adds this snippet of code to unconditionally
enable WOL on em cards. Is this correct policy? I checked with
another machine with an older world and WOL used to be off by
default.

Anyway there is also a problem because even with WOL on the machine
should not turn on on ANY packet. I tried to make something out,
but I have no idea where to look at. I suspect something is incorrect
in the programming of the PHY to enable WOL.

It definitely is an em WOL problem though.

-- 
Guido Falsi <mad at madpilot.net>


More information about the freebsd-stable mailing list