http://bugzilla.kernel.org/show_bug.cgi?id=12748
------- Comment #8 from yakui.z...@intel.com 2009-03-23 20:16 ------- > What I did was just a revert for ff24ba74b6d3befbfbafa142582211b5a6095d45 and > a > simple patch to always call the power resource setup, even if the device was > already at D0. The revert is trivial (but must be done by hand because the > code changed a bit in that area). The other part of it is just conceptual. Please attach it so that we can work on this issue together. > > The complete fix would require: > > 1. A set of proper hooks for enable/disable device, that are **ALWAYS** > called, Now there exists such a hook for PCI device(acpi_pci_set_power_state). When the PCI is switched to D0/D3, the corresponding power resource will be turned on/off if there exists the power resource. But there is no hook function for PNP device. If the power resource is also used by the PNP i8042 device, we can't turn on/off the power resource in course of suspend/resume. > regardless of initial power state, and regardless of whether the underlying > code has been fixed to place devices back at D3 or not. > > Without these hooks, we either fail to attach resources, or (MUCH WORSE) leak > resources and dangling pointers when devices are freed. > > 2. Using these hooks for power resource attach/detach. > > 3. Checking for any power resources that are enabled, but that have no users > at > ACPI start (as well as power resources that are disabled, but DO have users) > at > late suspend, early resume, and maybe other windows of opportunity. > For the ACPI device(eg: Fan), the power resource will be turned on/off according to the Fan state. And this is already realized in the current driver. In the course of boot phase the FAN device will be turned on/off according to the thermal zone temperature. In such case the power resource will be controlled correctly. For the PCI device: Only when the PCI state is changed between D0/D3, the hook function will be called and then the power resource can be controlled correctly. How about the following idea? a. the power resource will be put in off state in course of scanning ACPI device b. When the ACPI device is put into D0 state, the corresponding power resource will be turned on. Of course when it is put into the D3 state, the power resource will be turned off. c. For the PCI device: When the driver is loaded for the PCI device, the hook function is called to set the correct PCI power state.(For example: it can be called in the function of pci_enable_device. In fact it is already called in the current function of pci_enable_device). But the problem is for the PNP device. -- Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ acpi-bugzilla mailing list acpi-bugzilla@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/acpi-bugzilla