From owner-freebsd-current@FreeBSD.ORG Wed Oct 25 17:33:36 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DF5C716A47B; Wed, 25 Oct 2006 17:33:36 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E24943D5D; Wed, 25 Oct 2006 17:33:35 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id k9PHXRDm019571; Wed, 25 Oct 2006 13:33:29 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-current@freebsd.org Date: Wed, 25 Oct 2006 13:19:59 -0400 User-Agent: KMail/1.9.1 References: <20061022064322.GU53114@obiwan.tataz.chchile.org> <1161512742.71755.9.camel@localhost> <1161552443.41580.26.camel@genius.i.cz> In-Reply-To: <1161552443.41580.26.camel@genius.i.cz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200610251320.00498.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 25 Oct 2006 13:33:30 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/2098/Wed Oct 25 09:14:20 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Michal Mertl , Jeremie Le Hen , Florent Thoumie Subject: Re: Cannot unload if_iwi module 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: Wed, 25 Oct 2006 17:33:37 -0000 On Sunday 22 October 2006 17:27, Michal Mertl wrote: > Florent Thoumie wrote: > > On Sun, 2006-10-22 at 08:43 +0200, Jeremie Le Hen wrote: > > > Hi, > > > > > > when I try to unload if_iwi module, here is what happens: > > > > > > % jarjarbinks:/<3>dev/iwi:118# kldunload if_iwi > > > % iwi0: detached > > > % jarjarbinks:/<3>dev/iwi:119# iwi0: mem 0xc8218000-0xc8218fff irq 11 at device 3.0 on pci6 > > > % iwi0: Ethernet address: 00:12:f0:2c:f3:6e > > > % iwi0: [GIANT-LOCKED] > > > > > > The kld is reloaded automatically (I am sure it is reloaded because > > > the id showed in kldstat(8) changes each time): > > > > > > % jarjarbinks:/<1>share/mk:137# kldstat > > > % Id Refs Address Size Name > > > % 1 20 0xc0400000 4ef910 kernel > > > % 2 1 0xc08f0000 e5dc if_bge.ko > > > % 3 1 0xc08ff000 4ce4 ums.ko > > > % 4 1 0xc0904000 b180 umass.ko > > > % 5 2 0xc382e000 25000 linux.ko > > > % 6 1 0xc38cb000 2000 rtc.ko > > > % 9 1 0xc3acf000 e000 if_iwi.ko > > > % 10 2 0xc3add000 3000 firmware.ko > > > > > > % jarjarbinks:/<3>dev/iwi:122# kldstat > > > % Id Refs Address Size Name > > > % 1 19 0xc0400000 4ef910 kernel > > > % 2 1 0xc08f0000 e5dc if_bge.ko > > > % 3 1 0xc08ff000 4ce4 ums.ko > > > % 4 1 0xc0904000 b180 umass.ko > > > % 5 2 0xc382e000 25000 linux.ko > > > % 6 1 0xc38cb000 2000 rtc.ko > > > % 11 1 0xc3acf000 e000 if_iwi.ko > > > % 12 1 0xc3add000 3000 firmware.ko > > > > > > Any clue how to disable this unwanted behaviour ? > > > > No idea, but the same behavior can be seen with ipw(4) and experimental > > wpi(4). I seem to recall this didn't happen before the the support for > > firmware(9) was added. > > It also happens with em(4) to me. I found out it doesn't happen when > devd is not running. I find it rather strange that the 'pciconf -l' > command shows driver name (e.g. em0@pci...) even after (successfully and > permanently) unloading the module for a device. The 'devinfo' command > does not. I bet devd is running /etc/pccard_ether which tries to use ifconfig to down your interface, and when ifconfig em0 down happens, ifconfig notices if_em isn't in the kernel and tries to load it. Handy. :) -- John Baldwin