From owner-freebsd-current@FreeBSD.ORG Wed Apr 14 13:15:04 2004 Return-Path: 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 A92AB16A4D0 for ; Wed, 14 Apr 2004 13:15:04 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id A350B43D3F for ; Wed, 14 Apr 2004 13:15:00 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.10/8.12.9) with ESMTP id i3EKExkj028019; Wed, 14 Apr 2004 14:14:59 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 14 Apr 2004 14:15:51 -0600 (MDT) Message-Id: <20040414.141551.08404874.imp@bsdimp.com> To: nate@root.org From: "M. Warner Losh" In-Reply-To: <20040414101436.H83899@root.org> References: <20040414101436.H83899@root.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: current@freebsd.org Subject: Re: PCI powerstate issues X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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, 14 Apr 2004 20:15:04 -0000 In message: <20040414101436.H83899@root.org> Nate Lawson writes: : Thanks for your work on this. My laptop functions as normal, including : good suspend/resume. There are some minor issues I've found when running : with hw.pci.do_powerstate=1. : : It appears my winmodem can't be put in D3. Here's the portion of the : boot: : : pcib2: at device 30.0 on pci0 : pci2: on pcib2 : pcib2: slot 0 INTA is routed to irq 11 : pcib2: slot 0 INTB is routed to irq 11 : pcib2: slot 2 INTA is routed to irq 11 : pcib2: slot 8 INTA is routed to irq 11 : cbb0: mem 0x50000000-0x50000fff irq 11 at device 0.0 on pci2 : cbb0: Reserved 0x1000 bytes for rid 0x10 type 3 at 0x50000000 : cardbus0: on cbb0 : pccard0: <16-bit PCCard bus> on cbb0 : cbb1: mem 0x51000000-0x51000fff irq 11 at device 0.1 on pci2 : cbb1: Reserved 0x1000 bytes for rid 0x10 type 3 at 0x51000000 : cardbus1: on cbb1 : pccard1: <16-bit PCCard bus> on cbb1 : pci2: at device 2.0 (no driver attached) : pci2:2:0: Transition from D0 to D3 : pci2: Failed to set ACPI power state D3 on (null): AE_BAD_PARAMETER : : This device is: : none5@pci2:2:0: class=0x078000 card=0x04101468 chip=0x044911c1 rev=0x01 hdr=0x00 : vendor = 'Lucent/Agere Systems (Was: AT&T MicroElectronics)' : device = 'LT Winmodem 56k' : class = simple comms : : In looking at my ASL, I can't seem to find this driver defined there. It : appears pci2 is not listed. I tested and indeed it had a null handle. I : just committed a check for this to acpi_pci.c. I don't think the acpi : power functions are safe against a null pointer (looks like it adds a : consumer with that handle). I added a check for that so now it's ok there : too. : : Also, I tried loading a usb driver after boot to see if it powered on the : devices properly: : : pci0: driver added : pci0:29:0: reprobing on driver added : uhci0: port 0x1800-0x181f irq 11 : at device 29.0 on pci0 : uhci0: Reserved 0x20 bytes for rid 0x20 type 4 at 0x1800 : uhci0: [GIANT-LOCKED] : usb0: on uhci0 : usb0: USB revision 1.0 : uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 : uhub0: 2 ports with 2 removable, self powered : pci0:29:1: reprobing on driver added : uhci1: port 0x1820-0x183f irq 11 : at device 29.1 on pci0 : uhci1: Reserved 0x20 bytes for rid 0x20 type 4 at 0x1820 : uhci1: [GIANT-LOCKED] : usb1: on uhci1 : usb1: USB revision 1.0 : uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 : uhub1: 2 ports with 2 removable, self powered : pci0:29:2: reprobing on driver added : uhci2: port 0x1840-0x185f irq 11 : at device 29.2 on pci0 : uhci2: Reserved 0x20 bytes for rid 0x20 type 4 at 0x1840 : uhci2: [GIANT-LOCKED] : usb2: on uhci2 : usb2: USB revision 1.0 : uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 : uhub2: 2 ports with 2 removable, self powered : pci0:31:5: reprobing on driver added : pci0:31:5: Transition from D0 to D3 : pci1: driver added : pci1:0:0: reprobing on driver added : pci2: driver added : pci2:2:0: reprobing on driver added : pci2:2:0: Transition from D0 to D3 : pci2: Failed to set ACPI power state D3 on (null): AE_BAD_PARAMETER : pci0: driver added : pci0:31:5: reprobing on driver added : pci0:31:5: Transition from D0 to D3 : pci1: driver added : pci1:0:0: reprobing on driver added : pci2: driver added : pci2:2:0: reprobing on driver added : pci2:2:0: Transition from D3 to D0 : pci0: driver added : pci0:31:5: reprobing on driver added : pci0:31:5: Transition from D0 to D3 : pci1: driver added : pci1:0:0: reprobing on driver added : pci2: driver added : pci2:2:0: reprobing on driver added : pci2:2:0: Transition from D3 to D0 : : This is weird. It appears you don't power devices up to D0 for the scan. : Isn't that necessary so they can respond to the probe? Or are the config : registers guaranteed to be valid even when the device is in D3. Also, : since all these devices were already in D3, it's redundant to do the : D0->D3 transition on them. Does that mean we're not properly tracking : current state? Or were these silently switched to D0 before the probe? I do power the devices up for the scan. At least that's what I think the above says. driver added >pci0:31:5: reprobing on driver added >pci0:31:5: Transition from D0 to D3 driver added >pci0:31:5: reprobing on driver added >pci0:31:5: Transition from D0 to D3 driver added >pci0:31:5: reprobing on driver added >pci0:31:5: Transition from D0 to D3 Hmmm, that definitely looks odd to me. I only do the transition if it is necessary, so maybe 0.31.5 doesn't support D3 state and is never going to sleep. Don't know how to explain the 2.2.0 never waking up... Warner