From owner-freebsd-acpi@FreeBSD.ORG Sun Nov 21 15:28:46 2004 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA18216A4CE for ; Sun, 21 Nov 2004 15:28:46 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 563DF43D2F for ; Sun, 21 Nov 2004 15:28:46 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (harmony.village.org [10.0.0.6]) by harmony.village.org (8.13.1/8.13.1) with ESMTP id iALFRblk022869; Sun, 21 Nov 2004 08:27:40 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 21 Nov 2004 08:28:12 -0700 (MST) Message-Id: <20041121.082812.116352579.imp@bsdimp.com> To: nate@root.org From: "M. Warner Losh" In-Reply-To: <419EF7AD.8050007@root.org> References: <419EF7AD.8050007@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: acpi@FreeBSD.org Subject: Re: PATCH: power down acpi and pci devices in suspend/resume X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Nov 2004 15:28:46 -0000 In message: <419EF7AD.8050007@root.org> Nate Lawson writes: : The attached patch implements setting power states for ACPI (i.e. ISA) : and PCI devices in the suspend/resume path. This may help with some : problems; it's quite likely it may introduce problems. That's why I'd : like it tested. If you have a system that suspends/resumes ok or that : fails, please try it. The likely failure case is a hang in suspend or : resume or a device that doesn't work afterwords. It's pretty : heavy-handed, only avoiding changing power for serial ports since those : are known to cause a hang (which can possibly be fixed by making : sio/uart more aware of power states.) I suspect devices like PCI : bridges may have problems with power changes. : : If you have problems, please let me know the info it prints before the : hang so I can figure out what the problem device is. I suspect that we'll need finer grain control over the APM case. For APM Bioses, the OS isn't supposed to put devices into lower power states. The APM BIOS generally does this and restores things on resume. APM is somewhat more limited in what it can do, so this makes sense. /* - * Save the pci configuration space for each child. We don't need - * to do this, unless the BIOS suspend code powers down the bus and - * the devices on the bus. + * Save the PCI configuration space for each child and set the + * device in the appropriate power state for this sleep state. */ So if APM implemented the ACPI_PWR_FOR_SLEEP interface, we'd be set. However, there's at leas two problems with this. One is that we don't have a way to get the 'power management' device generically (witness the hacks to get acpi in generic pci code). Second, we don't have a generic power interface, so having APM implement ACPI_ named methods seems a little unsatisfying at best. I'm not sure what powermacs do for their PM stuff, but I'm pretty sure it isn't acpi. Warner