From owner-freebsd-net@FreeBSD.ORG Thu Nov 11 18:10:22 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 8FB2B106566B for ; Thu, 11 Nov 2010 18:10:22 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 232778FC0A for ; Thu, 11 Nov 2010 18:10:20 +0000 (UTC) Received: by gwj20 with SMTP id 20so977568gwj.13 for ; Thu, 11 Nov 2010 10:10:20 -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=joJOpOfqkDXUfYgih7fbl8Z/NudgShJZ7rE02aGL8HE=; b=pkNA0un5XkTbhCrpMsKj9+s1pPpcoOqFJNm2v5PiHu87O8rsBW8vGAuoBjNpzbLdGq bA0Tn4dWCX84Df/MOL0MuppFsy91NJfoEnMem3rnkC3MAQ+U5ocXlVPQUvUnOtUiyD84 Hm2YQuJBF4jDy5AtyCP9fH2f88CnWNzsnJKc4= 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=NoL3y+0thviRy9esEFZbJFsq4rsOmuSIez2u+zcOp7/uCHTyhfU+AHrvs0ruSU3lZJ b8TbkZCXHJ4WL563NMVk48XQQgmOt/umUqkpcTEl0VpRqpvQbseBR7TdRGrjrtNlNkc6 MmHSta9A9eSpY+E/njMd5LgzC+Cv3PuiAWaEA= Received: by 10.151.14.7 with SMTP id r7mr2202722ybi.19.1289499019971; Thu, 11 Nov 2010 10:10:19 -0800 (PST) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id h68sm1689231yha.15.2010.11.11.10.10.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 11 Nov 2010 10:10:17 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Thu, 11 Nov 2010 10:09:22 -0800 From: Pyun YongHyeon Date: Thu, 11 Nov 2010 10:09:22 -0800 To: Yamagi Burmeister Message-ID: <20101111180922.GA17566@michelle.cdnetworks.com> References: <20101109011410.GB1275@michelle.cdnetworks.com> <20101109190713.GA7766@michelle.cdnetworks.com> <20101109213421.GE7766@michelle.cdnetworks.com> <20101110234128.GC13340@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: Thu, 11 Nov 2010 18:10:22 -0000 On Thu, Nov 11, 2010 at 08:08:25AM +0100, Yamagi Burmeister wrote: > On Wed, 10 Nov 2010, Pyun YongHyeon wrote: > > >On Tue, Nov 09, 2010 at 01:34:21PM -0800, Pyun YongHyeon wrote: > >>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. > >> > > > >Ok, I updated patch which will change link speed to 10/100Mps when > >shutdown/suspend is initiated. You can get the patch at the > >following URL. Please give it a try and let me know whether it > >really changes link speed to 10/100Mbps. If it does not work as > >expected, show me the dmesg output of your system. > > > >http://people.freebsd.org/~yongari/nfe/nfe.wol.patch2 > > Okay, that does the trick. At shutdown the link speed is changed to > 10/100Mbps, at boot - either via WOL magic packet or manuell startup - > it's changed back to 1000Mbps. > Thanks, patch committed(r215132), will MFC after a week. > Thanks again, > Yamagi > > -- > Homepage: www.yamagi.org > Jabber: yamagi@yamagi.org > GnuPG/GPG: 0xEFBCCBCB