Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Dec 2011 23:12:24 +0700
From:      Eugene Grosbein <egrosbein@rdtc.ru>
To:        Stefan Bethke <stb@lassitu.de>
Cc:        FreeBSD Net <freebsd-net@freebsd.org>
Subject:   Re: "ifconfig media off"?
Message-ID:  <4EE77968.9040001@rdtc.ru>
In-Reply-To: <600A8C6C-DAB4-4E22-A034-38224017166B@lassitu.de>
References:  <600A8C6C-DAB4-4E22-A034-38224017166B@lassitu.de>

next in thread | previous in thread | raw e-mail | index | archive | help
13.12.2011 06:56, Stefan Bethke пишет:
> 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.

Some network drivers do not use our 'miibus' code, for example Intel em(4) and igb(4) drivers.
I run lots of FreeBSD routers with em/igb interfaces bundled as lagg(4) trunks
connected to Cisco core routers using PortChannels in LACP mode.

As I do not want to abide huge LACP timeouts when one of lagg ports should be brought down,
I've patched em/igb drivers to bring link down with "ifconfig down" command:

http://unix.derkeiler.com/Mailing-Lists/FreeBSD/net/2010-12/msg00058.html
http://unix.derkeiler.com/Mailing-Lists/FreeBSD/net/2010-12/msg00081.html

Eugene Grosbein



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4EE77968.9040001>