Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Nov 2010 08:08:25 +0100 (CET)
From:      Yamagi Burmeister <lists@yamagi.org>
To:        Pyun YongHyeon <pyunyh@gmail.com>
Cc:        freebsd-net@freebsd.org, Yamagi Burmeister <lists@yamagi.org>
Subject:   Re: [patch] WOL support for nfe(4)
Message-ID:  <alpine.BSF.2.00.1011110805280.2753@saya.home.yamagi.org>
In-Reply-To: <20101110234128.GC13340@michelle.cdnetworks.com>
References:  <alpine.BSF.2.00.1011051057350.9984@saya.home.yamagi.org> <20101109011410.GB1275@michelle.cdnetworks.com> <alpine.BSF.2.00.1011090932550.2751@saya.home.yamagi.org> <20101109190713.GA7766@michelle.cdnetworks.com> <alpine.BSF.2.00.1011092141190.37352@maka.home.yamagi.org> <20101109213421.GE7766@michelle.cdnetworks.com> <20101110234128.GC13340@michelle.cdnetworks.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 again,
Yamagi

-- 
Homepage:     www.yamagi.org
Jabber:       yamagi@yamagi.org
GnuPG/GPG:    0xEFBCCBCB



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1011110805280.2753>