From owner-freebsd-net@FreeBSD.ORG Tue Dec 13 09:44:10 2011 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 F057B1065672 for ; Tue, 13 Dec 2011 09:44:10 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 5637A8FC16 for ; Tue, 13 Dec 2011 09:44:09 +0000 (UTC) Received: (qmail 96803 invoked from network); 13 Dec 2011 08:13:49 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 13 Dec 2011 08:13:49 -0000 Message-ID: <4EE71E65.7090406@freebsd.org> Date: Tue, 13 Dec 2011 10:44:05 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: pyunyh@gmail.com References: <600A8C6C-DAB4-4E22-A034-38224017166B@lassitu.de> <20111213025041.GF3705@michelle.cdnetworks.com> In-Reply-To: <20111213025041.GF3705@michelle.cdnetworks.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Net , Stefan Bethke Subject: Re: "ifconfig media off"? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2011 09:44:11 -0000 On 13.12.2011 03:50, YongHyeon PYUN wrote: > On Tue, Dec 13, 2011 at 12:56:22AM +0100, Stefan Bethke wrote: >> I'm currently writing a driver to configure an ethernet switch chip (see TL-WR1043ND on -embedded). >> >> I noticed that there doesn't seem to be a way to power down a phy right now through the ifconfig media command. >> >> Would there be objections to extend the media subtype definitions to include an "off", "poweroff" or "down" media subtype, and add code to the relevant phy drivers to power down the phy for this media subtype? >> >> The difference between media subtype "none" and this new one would be that there will be no link, even if there is a physical connection. With media subtype "none", a 10 MBit/s half-duplex connection is established, potentially confusing the remote end about the availability of this link. On the local side, the link is down, so no packets are exchanged. >> > > I think "none" means "isolated" so should have no established link > and probably you can also power down the PHY. > I vaguely guess the PHY of switch chip does not correctly support > isolated mode so you may have wanted to power down. There is a difference between "none" with "status: no carrier" where no ethernet connection is established, but can be brought up the moment a cable is plugged in, and "poweroff" where the PHY itself is powered down and won't notice a cable being plugged in unless configure to auto-select or a particular speed. Considering that PHY devices are relatively power hungry a poweroff state may be quite useful to conserve battery power. -- Andre