From owner-freebsd-mobile@FreeBSD.ORG Thu Apr 17 13:14:21 2008 Return-Path: Delivered-To: freebsd-mobile@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3ED961065670 for ; Thu, 17 Apr 2008 13:14:21 +0000 (UTC) (envelope-from dan@langille.org) Received: from nyi.unixathome.org (nyi.unixathome.org [64.147.113.42]) by mx1.freebsd.org (Postfix) with ESMTP id D6E0D8FC13 for ; Thu, 17 Apr 2008 13:14:20 +0000 (UTC) (envelope-from dan@langille.org) Received: from localhost (localhost [127.0.0.1]) by nyi.unixathome.org (Postfix) with ESMTP id ACD585083F; Thu, 17 Apr 2008 14:14:15 +0100 (BST) X-Virus-Scanned: amavisd-new at unixathome.org Received: from nyi.unixathome.org ([127.0.0.1]) by localhost (nyi.unixathome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Nh0xHK3DosTE; Thu, 17 Apr 2008 14:14:13 +0100 (BST) Received: from laptop.unixathome.org (ismtp.afilias.com [216.217.55.254]) by nyi.unixathome.org (Postfix) with ESMTPSA id B58D95083E; Thu, 17 Apr 2008 14:14:12 +0100 (BST) Message-ID: <48074D2F.4050602@langille.org> Date: Thu, 17 Apr 2008 09:14:23 -0400 From: Dan Langille Organization: The FreeBSD Diary User-Agent: Thunderbird 2.0.0.12 (X11/20080321) MIME-Version: 1.0 To: Takashi Inoue References: <4805E5A2.1070705@sophia.ac.jp> <200804161037.26572.jhb@freebsd.org> <1208358909.10448.1.camel@RabbitsDen> <20080416.183606.-772296126.imp@bsdimp.com> <4806FD1D.9030706@sophia.ac.jp> In-Reply-To: <4806FD1D.9030706@sophia.ac.jp> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-mobile@FreeBSD.org Subject: Re: pciconf -w X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2008 13:14:21 -0000 Takashi Inoue wrote: > M. Warner Losh wrote: > >> In message: <1208358909.10448.1.camel@RabbitsDen> >> "Alexandre \"Sunny\" Kovalenko" writes: >> : On Wed, 2008-04-16 at 10:37 -0400, John Baldwin wrote: >> : > On Wednesday 16 April 2008 07:40:18 am Takashi Inoue wrote: >> : > > Hi friends, >> : > > >> : > > Does anyone know how to trun off a pci device using pciconf -w ? >> : > > >> : > > Becase my MiniPCI Express wireless card is realy hot, >> : > > I want to turn off when I don't need it. >> : > > >> : > > >> : > > ath0@pci0:3:0:0: class=0x020000 card=0x058a1014 >> chip=0x1014168c >> : > > rev=0x01 hdr=0x00 >> : > > vendor = 'Atheros Communications Inc.' >> : > > device = 'AR5212 Atheros AR5212 802.11abg wireless' >> : > > class = network >> : > > subclass = ethernet >> : > > cap 01[40] = powerspec 2 supports D0 D3 current D0 >> : > > cap 05[50] = MSI supports 1 message >> : > > cap 10[60] = PCI-Express 1 legacy endpoint >> : > > cap 11[90] = MSI-X supports 1 message in map 0x10 >> : > : > Bug warner (imp@FreeBSD.org) for his devctl patch and use that >> to turn it off. >> : > : Just out of curiosity... would setting >> hw.pci.do_power_nodriver="3" and >> : unloading if_ath.ko do the trick? >> >> Yes. > > No. > > none1@pci0:3:0:0: class=0x020000 card=0x058a1014 chip=0x1014168c > rev=0x01 hdr=0x00 > vendor = 'Atheros Communications Inc.' > device = 'AR5212 Atheros AR5212 802.11abg wireless' > class = network > subclass = ethernet > cap 01[40] = powerspec 2 supports D0 D3 current D0 > cap 05[50] = MSI supports 1 message > cap 10[60] = PCI-Express 1 legacy endpoint > cap 11[90] = MSI-X supports 1 message in map 0x10 > > As you see, even in case without driver, > it's power status is D0 and the device is hot. > Setting hw.....nodriver=3 has no effect. > I think I need to write D3 by hand. I have a ThinkPad X61s. Here is what I see when ath0 is up: ath0@pci0:3:0:0: class=0x020000 card=0x058a1014 chip=0x1014168c rev=0x01 hdr=0x00 vendor = 'Atheros Communications Inc.' device = 'AR5212 Atheros AR5212 802.11abg wireless' class = network subclass = ethernet cap 01[40] = powerspec 2 supports D0 D3 current D0 cap 05[50] = MSI supports 1 message cap 10[60] = PCI-Express 1 legacy endpoint cap 11[90] = MSI-X supports 1 message in map 0x10 After an ifconfig ath0 down: ath0@pci0:3:0:0: class=0x020000 card=0x058a1014 chip=0x1014168c rev=0x01 hdr=0x00 vendor = 'Atheros Communications Inc.' device = 'AR5212 Atheros AR5212 802.11abg wireless' class = network subclass = ethernet cap 01[40] = powerspec 2 supports D0 D3 current D0 cap 05[50] = MSI supports 1 message cap 10[60] = PCI-Express 1 legacy endpoint cap 11[90] = MSI-X supports 1 message in map 0x10 after hw.pci.do_power_nodriver="3" ath0@pci0:3:0:0: class=0x020000 card=0x058a1014 chip=0x1014168c rev=0x01 hdr=0x00 vendor = 'Atheros Communications Inc.' device = 'AR5212 Atheros AR5212 802.11abg wireless' class = network subclass = ethernet cap 01[40] = powerspec 2 supports D0 D3 current D0 cap 05[50] = MSI supports 1 message cap 10[60] = PCI-Express 1 legacy endpoint cap 11[90] = MSI-X supports 1 message in map 0x10 As for loaded modules: [root@laptop ~]# kldstat | grep ath [root@laptop ~]# HTH