From owner-freebsd-current@FreeBSD.ORG Fri Mar 23 16:31:06 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F18D016A400 for ; Fri, 23 Mar 2007 16:31:06 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 8D04813C4C7 for ; Fri, 23 Mar 2007 16:31:06 +0000 (UTC) (envelope-from sam@errno.com) Received: from [10.0.0.248] (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id l2NFqRbr036689 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 23 Mar 2007 08:52:28 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <4603F7BB.80608@errno.com> Date: Fri, 23 Mar 2007 08:52:27 -0700 From: Sam Leffler User-Agent: Thunderbird 1.5.0.9 (X11/20070208) MIME-Version: 1.0 To: Yar Tikhiy References: <20070322173144.46C7D45047@ptavv.es.net> <20070323110315.GB19357@comp.chem.msu.su> In-Reply-To: <20070323110315.GB19357@comp.chem.msu.su> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: current@freebsd.org Subject: Re: ifconfig stopped loading driver X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Mar 2007 16:31:07 -0000 Yar Tikhiy wrote: > On Thu, Mar 22, 2007 at 10:31:44AM -0700, Kevin Oberman wrote: >>> Date: Thu, 22 Mar 2007 09:15:22 -0700 >>> From: "Kip Macy" >>> >>> On 3/22/07, Kevin Oberman wrote: >>>> For a long time under V6 and current (and probably V5), if I issued an >>>> ifconfig for my Atheros card, the driver (along with the HAL and rate >>>> modules) would auto-load and my card would be found. >>>> >>>> Starting with my March 19 build, this no longer happens. I need to boot >>>> single-user and manually load the module if I will need it. I don't want >>>> the card to start by default since I don't want the radio on when I am >>>> flying. >>>> >>>> Was this a deliberate change or did something break? It is a real pain. >> O.K. It is clearly a deliberate change, although I am not sure the >> effect is what was intended. >> >> The call to ifmaybeload(ifname) was moved inside of the if for a >> "create" which applies to pseudo-devices, but not "real" interfaces. As >> a result, the driver never gets loaded. I read the commit message, but I >> don't think that this is the right way to fix the problem >> described. (I'm not sure, what a better approach might be, though.) >> >> This breaks behavior that goes back over 7 years, having appeared in >> the first release of V4. I can work around it, but it's going to be a >> big surprise to many and it is sure a pain in the neck to me. > > I readily admit that my change provoked your trouble. When committing > it, I took into account only cloned interfaces, but not hardware > ones, perhaps because I had never used modules for hardware interfaces. > > Nevertheless, I still think that the practice of loading the module > on any ifconfig command is poor in spite of its age. It can be > worked around only by dirty hacks. One of them is an ifconfig > option not to load the module for devd scripts to use it when > shutting down the interface. Another one is to load the module > only on "positive" ifconfig commands, such as "up" and "alias" > (incl. the first address,) but not on "negative" ones, e.g., "down" > and "-alias" -- but what to do with "ifconfig -alias up" then? > > Perhaps it's time to have "ifconfig foo0 load" along with "ifconfig > bar0 create" to allow loading the module explicitly. People even > won't have to specify "load" in their rc.conf files as rc.d can add > it for them when, and only when, the interface is started. > > Comments? I'm not a big fan of auto-loading the module either but it does change existing practice. I've also considered having ifconfig auto-load the wlan_ modules when setting a crypto key so perhaps the best compromise is to leave auto-loading enabled by default and add an option to suppress it. Sam