From owner-freebsd-net@FreeBSD.ORG Tue Dec 13 19:12:56 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 B38E81065677 for ; Tue, 13 Dec 2011 19:12:56 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6D1628FC08 for ; Tue, 13 Dec 2011 19:12:56 +0000 (UTC) Received: by ghrr19 with SMTP id r19so1073717ghr.13 for ; Tue, 13 Dec 2011 11:12:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; 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; bh=L9yR6IPi1nQrw7cLgEi3nl+bVHgUZIMggAZ9vr1V3tA=; b=Fm3ym6gAClSzmjqn143DeTuTmPfkPq7ClrXNLBfjQxhlTndTeaKgTulZH6sqHI8GLq nmTkAct3nmzbUzuvlcs10SREhUEtHxl5DcGZNO5GhEh8oAj/hvuwGU3moVNUYOvw3zVP /WN/ro+Qp8+yRn5cNMT5HlMu6Hb9De11y0Wag= Received: by 10.50.181.136 with SMTP id dw8mr20775375igc.71.1323803575297; Tue, 13 Dec 2011 11:12:55 -0800 (PST) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id d19sm66962815ibh.8.2011.12.13.11.12.52 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 13 Dec 2011 11:12:54 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Tue, 13 Dec 2011 11:11:51 -0800 From: YongHyeon PYUN Date: Tue, 13 Dec 2011 11:11:51 -0800 To: Andre Oppermann Message-ID: <20111213191151.GB7546@michelle.cdnetworks.com> References: <600A8C6C-DAB4-4E22-A034-38224017166B@lassitu.de> <20111213025041.GF3705@michelle.cdnetworks.com> <4EE71E65.7090406@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4EE71E65.7090406@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: FreeBSD Net , Stefan Bethke Subject: Re: "ifconfig media off"? 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, 13 Dec 2011 19:12:56 -0000 On Tue, Dec 13, 2011 at 10:44:05AM +0100, Andre Oppermann wrote: > 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. > Many gigabit PHY drivers already puts the PHY into powerdown state when you select 'none'. > Considering that PHY devices are relatively power hungry a poweroff state > may be > quite useful to conserve battery power. > Powering down the PHY would be the minimal and easy way that achieves some power. But more power saving should be implemented in ethernet controller side(i.e. removing clock to MII/PHY module etc). In addition, you shall always have to use network so powering down may not be available option. Implementing EEE framework for various PHYs would be the way to go. > -- > Andre