Date: Sun, 21 Nov 2004 08:28:12 -0700 (MST) From: "M. Warner Losh" <imp@bsdimp.com> To: nate@root.org Cc: acpi@FreeBSD.org Subject: Re: PATCH: power down acpi and pci devices in suspend/resume Message-ID: <20041121.082812.116352579.imp@bsdimp.com> In-Reply-To: <419EF7AD.8050007@root.org> References: <419EF7AD.8050007@root.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <419EF7AD.8050007@root.org> Nate Lawson <nate@root.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041121.082812.116352579.imp>