From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 16 09:13:44 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D721F106566B; Thu, 16 Aug 2012 09:13:44 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 6917F8FC08; Thu, 16 Aug 2012 09:13:44 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id q7G9Da5h046490; Thu, 16 Aug 2012 11:13:37 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id q7G9DaJK046489; Thu, 16 Aug 2012 11:13:36 +0200 (CEST) (envelope-from marius) Date: Thu, 16 Aug 2012 11:13:36 +0200 From: Marius Strobl To: Adrian Chadd Message-ID: <20120816091336.GA28757@alchemy.franken.de> References: 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: David Duchscher , Marius Strobl , hackers@freebsd.org Subject: Re: Disabling ethernet link on an Intel nic? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2012 09:13:44 -0000 On Mon, Aug 13, 2012 at 01:47:01PM -0700, Adrian Chadd wrote: > Hi, > > On 11 August 2012 06:35, David Duchscher wrote: > > Greetings, > > > > I have a need to turn off the link of an ethernet port on a Intel nic. The issue is not a big deal but one we would like to solve. we have no way of signaling an upstream router that a path is down but via turning off the link of the ethernet port. This would only be used when something goes wrong. The hope is that we could automate some problems and handle other situations remotely avoiding having to visit the system in person. > > > > Any thoughts? We can modify the system so if it means modifying the driver or some other code, I am willing to try. Just need a little direction. > > Marius talked about doing this. Maybe it's time we added it as a > device option, so people can have the PHY disabled when the NIC is > brought down? > I'm working on adding support to mii(4) for powering down PHYs when the network interface is down, but as you have noticed this non- trivial to get right, i.e. so they actually come out of power down mode again when bringing up the interface regardless of the media options used. We also clearly need a way to disable this behavior for the known-broken PHYs. This is orthogonal to the 1 and 10 Gigabit Intel Ethernet drivers so as these don't take advantage of mii(4). Some time ago someone posted patches to net@ implementing/activating powering down the PHYs when these interfaces are down though. Marius