From owner-freebsd-stable@FreeBSD.ORG Fri Apr 23 11:33:24 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3500B1065674; Fri, 23 Apr 2010 11:33:24 +0000 (UTC) (envelope-from mad@madpilot.net) Received: from megatron.madpilot.net (megatron.madpilot.net [88.149.173.206]) by mx1.freebsd.org (Postfix) with ESMTP id 9A4588FC15; Fri, 23 Apr 2010 11:33:23 +0000 (UTC) Received: from megatron.madpilot.net (localhost [127.0.0.1]) by megatron.madpilot.net (Postfix) with ESMTP id 99FDA1C83; Fri, 23 Apr 2010 13:33:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=madpilot.net; h= user-agent:in-reply-to:content-disposition:content-type :content-type:mime-version:references:message-id:subject:subject :from:from:date:date:received:received; s=mail; t=1272022399; x= 1273836799; bh=lv+owNTJbnUBCJurqiZggXXI7X6yjWM4GXH09V1MUVM=; b=o lJNnXZiZgx00pdDmFOtAfqvj7jTcLxCQB9T7txEdGcaihWqHEDqCEK6uQBRDnrcN ynsiO/N1vc0m3FnYtqBaCt3eAhs+kJDmZSGv3OOgX2ODvi+6zQAVm3jEUQYV8yPz Uvtuozs25bCNaNdzfmxDUfqWV5fz++9TuzItHxLLlU= X-Virus-Scanned: amavisd-new at madpilot.net Received: from megatron.madpilot.net ([127.0.0.1]) by megatron.madpilot.net (megatron.madpilot.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id nW1J3DPE2xx6; Fri, 23 Apr 2010 13:33:19 +0200 (CEST) Received: by megatron.madpilot.net (Postfix, from userid 1000) id 9F2E91C7C; Fri, 23 Apr 2010 13:33:19 +0200 (CEST) Date: Fri, 23 Apr 2010 13:33:19 +0200 From: Guido Falsi To: Jeremy Chadwick Message-ID: <20100423113319.GA4925@megatron.madpilot.net> References: <20100422143542.GA2208@icarus.home.lan> <4BD0C9BA.2000405@icyb.net.ua> <20100423084606.GV2422@deviant.kiev.zoral.com.ua> <20100423085401.GA28720@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100423085401.GA28720@icarus.home.lan> X-Operating-System: FreeBSD 8.0-STABLE User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Kostik Belousov , freebsd-stable@freebsd.org, Andriy Gapon , jkim@freebsd.org Subject: Re: RELENG_8 -- shutdown -p no longer powers off boxes X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Apr 2010 11:33:24 -0000 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