From owner-freebsd-net@FreeBSD.ORG Tue Nov 9 21:35:18 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C316106564A for ; Tue, 9 Nov 2010 21:35:18 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-px0-f182.google.com (mail-px0-f182.google.com [209.85.212.182]) by mx1.freebsd.org (Postfix) with ESMTP id 566098FC13 for ; Tue, 9 Nov 2010 21:35:18 +0000 (UTC) Received: by pxi1 with SMTP id 1so1612843pxi.13 for ; Tue, 09 Nov 2010 13:35:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=6qtJw81wgP7PApwaXigyndjjq5CBChkvAISFy5nTIh0=; b=XHt98HWUM/gVxQeqDuUfcMGrwYNr+qFG9b/+aLm8ebAJCmaCq+nsV71ZHHxiB3Xugh h004SJxR5b28yq9xxE0uz2h8vy8dYZIPd8VfJyB2U80LM62OJmMdfikNqiw4krf46K3x JCnCefO2SR1SGK+nwK6jF9o6+Me/5pfguswNA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=T/IXXJrKiS0hrTkMmGv2NX3hJmg5jMR+QZU9AnNU8gSwfCyCPgdBo6FkohBeYw+yBU iYY+igaYAKSje08hsUjjrzGPsyn4U4g0h4yuBffxFasm/gWWAzdb/VXAzlZ0N859ZDEb a/7qvAeFRIHuQHIUdzyio4+MpNqc9ItgX/YMo= Received: by 10.142.51.14 with SMTP id y14mr6409182wfy.306.1289338517806; Tue, 09 Nov 2010 13:35:17 -0800 (PST) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id w3sm1756771wfd.14.2010.11.09.13.35.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 09 Nov 2010 13:35:16 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Tue, 9 Nov 2010 13:34:21 -0800 From: Pyun YongHyeon Date: Tue, 9 Nov 2010 13:34:21 -0800 To: Yamagi Burmeister Message-ID: <20101109213421.GE7766@michelle.cdnetworks.com> References: <20101109011410.GB1275@michelle.cdnetworks.com> <20101109190713.GA7766@michelle.cdnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-net@freebsd.org Subject: Re: [patch] WOL support for nfe(4) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Nov 2010 21:35:18 -0000 On Tue, Nov 09, 2010 at 10:01:36PM +0100, Yamagi Burmeister wrote: > On Tue, 9 Nov 2010, Pyun YongHyeon wrote: > > >>No, the link stays at 1000Mbps so the driver must manually switch back > >>to 10/100Mbps. > >> > > > >Hmm, this is real problem for WOL. Establishing 1000Mbps link to > >accept WOL frames is really bad idea since it can draw more power > >than 375mA. Consuming more power than 375mA is violation of > >PCI specification and some system may completely shutdown the power > >to protect hardware against over-current damage which in turn means > >WOL wouldn't work anymore. Even if WOL work with 1000Mbps link for > >all nfe(4) controllers, it would dissipate much more power. > > > >Because nfe(4) controllers are notorious for using various PHYs, > >it's hard to write a code to reliably establish 10/100Mbps link in > >driver. In addition, nfe(4) is known to be buggy in link state > >handling such that forced media selection didn't work well. I'll > >see what could be done in this week if I find spare time. > > Hmm... Maybe just add a hint to the manpage that WOL is possible broken? I think this may not be enough. Because it can damage your hardware under certain conditions if protection circuit was not there. > Nevertheless thanks for your work it's much appreciated :) > > >>>o When you put your box into suspend mode, can you wake up your box > >>>with WOL magic packet? > >> > >>I'm sorry but I can't test that since none of those boxes supports > >>suspend: > >> > >> % sysctl hw.acpi.suspend_state > >> hw.acpi.suspend_state: NONE > >> > > > >You can switch to suspend mode with "acpiconf -s1". If all goes > >well, driver would put the controller into suspend mode after > >reprogramming controller to accept WOL frames. After that, you can > >wakeup the box by sending a WOL magic packet. > > Okay, It thought that S3 is required. Put the box into S1, waited some > minutes and send the magic packet. The video didn't resume but I was > able to login via SSH. So waking up by sending the WOL magic packet > works. > Thanks for testing. Probably you want to poke jkim@ to address video resume issue.