1. 29 6月, 2012 3 次提交
  2. 04 6月, 2012 1 次提交
  3. 02 6月, 2012 3 次提交
  4. 31 5月, 2012 1 次提交
  5. 30 5月, 2012 4 次提交
    • R
      ACPI / PM: Make acpi_pm_device_sleep_state() follow the specification · dbe9a2ed
      Rafael J. Wysocki 提交于
      The comparison between the system sleep state being entered
      and the lowest system sleep state the given device may wake up
      from in acpi_pm_device_sleep_state() is reversed, because the
      specification (ACPI 5.0) says that for wakeup to work:
      
      "The sleeping state being entered must be less than or equal to the
       power state declared in element 1 of the _PRW object."
      
      In other words, the state returned by _PRW is the deepest
      (lowest-power) system sleep state the device is capable of waking up
      the system from.
      
      Moreover, acpi_pm_device_sleep_state() also should check if the
      wakeup capability is supported through ACPI, because in principle it
      may be done via native PCIe PME, for example, in which case _SxW
      should not be evaluated.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      dbe9a2ed
    • R
      ACPI / PM: Make __acpi_bus_get_power() cover D3cold correctly · 38c92fff
      Rafael J. Wysocki 提交于
      After recent changes of the ACPI device power states definitions, if
      power resources are not used for the device's power management, the
      state returned by __acpi_bus_get_power() cannot exceed D3hot, because
      the return values of _PSC are 0 through 3.  However, if the _PR3
      method is not present for the device and _PS3 returns 3, we have to
      assume that the device is in D3cold, so the value returned by
      __acpi_bus_get_power() in that case should be 4.
      
      Similarly, acpi_power_get_inferred_state() should take the power
      resources for the D3hot state into account in general, so that it
      can return 3 if those resources are "on" or 4 (D3cold) otherwise.
      
      Fix the the above two issues and make sure that if both _PSC and
      _PR3 are present for the device, the power resources listed by _PR3
      will be used to determine if the number 3 returned by _PSC is meant
      to represent D3cold or D3hot.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      38c92fff
    • R
      ACPI / PM: Fix error messages in drivers/acpi/bus.c · 63a1a765
      Rafael J. Wysocki 提交于
      After recent changes of the ACPI device low-power states definitions
      kernel messages in drivers/acpi/bus.c need to be updated so that they
      include the correct names of the states in question (currently is
      "D3" for D3hot and "D4" for D3cold, which is incorrect).
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      63a1a765
    • D
      ACPI / PM: Generate wakeup events on fixed power button · c10d7a13
      Daniel Drake 提交于
      When the system is woken up by the ACPI fixed power button, currently there
      is no way of userspace becoming aware that the power button was pressed.
      
      OLPC would like to know this, so that we can respond appropriately.
      For example, if the system was woken up by a network packet, we know
      we can go back to sleep very quickly. But if the user explicitly woke the
      system with the power button, we're going to want to stay awake for a
      while.
      
      The wakeup count mechanism seems like a good fit for communicating this.
      Mark the fixed power button as wakeup-enabled, and increment its wakeup
      counter when the system is woken with the power button. (The wakeup counter
      is also incremented when the power button is pressed during system
      operation; this is already handled by an existing acpi-button codepath).
      Signed-off-by: NDaniel Drake <dsd@laptop.org>
      Acked-by: NZhang Rui <rui.zhang@intel.com>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      c10d7a13
  6. 18 5月, 2012 1 次提交
    • R
      ACPI / PCI / PM: Fix device PM regression related to D3hot/D3cold · 5c7dd710
      Rafael J. Wysocki 提交于
      Commit 1cc0c998 ("ACPI: Fix D3hot v D3cold confusion") introduced a
      bug in __acpi_bus_set_power() and changed the behavior of
      acpi_pci_set_power_state() in such a way that it generally doesn't work
      as expected if PCI_D3hot is passed to it as the second argument.
      
      First off, if ACPI_STATE_D3 (equal to ACPI_STATE_D3_COLD) is passed to
      __acpi_bus_set_power() and the explicit_set flag is set for the D3cold
      state, the function will try to execute AML method called "_PS4", which
      doesn't exist.
      
      Fix this by adding a check to ensure that the name of the AML method
      to execute for transitions to ACPI_STATE_D3_COLD is correct in
      __acpi_bus_set_power().  Also make sure that the explicit_set flag
      for ACPI_STATE_D3_COLD will be set if _PS3 is present and modify
      acpi_power_transition() to avoid accessing power resources for
      ACPI_STATE_D3_COLD, because they don't exist.
      
      Second, if PCI_D3hot is passed to acpi_pci_set_power_state() as the
      target state, the function will request a transition to
      ACPI_STATE_D3_HOT instead of ACPI_STATE_D3.  However,
      ACPI_STATE_D3_HOT is now only marked as supported if the _PR3 AML
      method is defined for the given device, which is rare.  This causes
      problems to happen on systems where devices were successfully put
      into ACPI D3 by pci_set_power_state(PCI_D3hot) which doesn't work
      now.  In particular, some unused graphics adapters are not turned
      off as a result.
      
      To fix this issue restore the old behavior of
      acpi_pci_set_power_state(), which is to request a transition to
      ACPI_STATE_D3 (equal to ACPI_STATE_D3_COLD) if either PCI_D3hot or
      PCI_D3cold is passed to it as the argument.
      
      This approach is not ideal, because generally power should not
      be removed from devices if PCI_D3hot is the target power state,
      but since this behavior is relied on, we have no choice but to
      restore it at the moment and spend more time on designing a
      better solution in the future.
      
      References: https://bugzilla.kernel.org/show_bug.cgi?id=43228Reported-by: Nrocko <rockorequin@hotmail.com>
      Reported-by: NCristian Rodríguez <crrodriguez@opensuse.org>
      Reported-and-tested-by: NPeter <lekensteyn@gmail.com>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5c7dd710
  7. 17 5月, 2012 1 次提交
  8. 12 5月, 2012 2 次提交
  9. 09 5月, 2012 2 次提交
  10. 08 5月, 2012 3 次提交
  11. 05 5月, 2012 1 次提交
    • L
      ACPI: Fix D3hot v D3cold confusion · 1cc0c998
      Lin Ming 提交于
      Before this patch, ACPI_STATE_D3 incorrectly referenced D3hot
      in some places, but D3cold in other places.
      
      After this patch, ACPI_STATE_D3 always means ACPI_STATE_D3_COLD;
      and all references to D3hot use ACPI_STATE_D3_HOT.
      
      ACPI's _PR3 method is used to enter both D3hot and D3cold states.
      What distinguishes D3hot from D3cold is the presence _PR3
      (Power Resources for D3hot)  If these resources are all ON,
      then the state is D3hot.  If _PR3 is not present,
      or all _PR0 resources for the devices are OFF,
      then the state is D3cold.
      
      This patch applies after Linux-3.4-rc1.
      A future syntax cleanup may remove ACPI_STATE_D3
      to emphasize that it always means ACPI_STATE_D3_COLD.
      Signed-off-by: NLin Ming <ming.m.lin@intel.com>
      Acked-by: NRafael J. Wysocki <rjw@sisk.pl>
      Reviewed-by: NAaron Lu <aaron.lu@amd.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      1cc0c998
  12. 24 4月, 2012 1 次提交
  13. 21 4月, 2012 1 次提交
    • L
      Revert "ACPI: ignore FADT reset-reg-sup flag" · 19244ad0
      Linus Torvalds 提交于
      This reverts commit cf450136.
      
      It breaks reboot on at least one Thinkpad T43, as reported by Jörg Otte:
       "On reboot it shuts down as normal.
        The last lines displayed are:
      
        >Unmounting temporary filesystems.. [OK]
        >Deactivating swap...               [OK]
        >Unmounting local filesystems...    [OK]
        >Will now restart
        >    Restarting system
      
        Then I hear it accessing the cd-drive, but then it's being stuck."
      
      Jörg bisected the regression to this commit.
      
      That commit fixes another machine (see
      
        https://bugzilla.kernel.org/show_bug.cgi?id=11533
      
      for details) that has a BIOS bug and doesn't support ACPI reset.
      However, at least one of those other reporters no longer even has the
      machine in question, and had a different workaround to begin with.
      Besides, it clearly was a buggy BIOS.  Let's not break the correct case
      to fix that case.
      Reported-and-bisected-by: NJörg Otte <jrg.otte@googlemail.com>
      Cc: linux-acpi@vger.kernel.org
      Cc: Len Brown <lenb@kernel.org>
      Cc: Peter Anvin <hpa@zytor.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      19244ad0
  14. 19 4月, 2012 1 次提交
    • T
      Revert "ACPI: Make ACPI interrupt threaded" · 9ecf8c0d
      Thomas Gleixner 提交于
      This reverts commit 6fe0d062.
      
      Paul bisected this regression.
      
      The conversion was done blindly and is wrong, as it does not provide a
      primary handler to disable the level type irq on the device level.
      Neither does it set the IRQF_ONESHOT flag which handles that at the irq
      line level.  This can't be done as the interrupt might be shared, though
      we might extend the core to force it.
      
      So an interrupt on this line will wake up the thread, but immediately
      unmask the irq after that.  Due to the interrupt being level type the
      hardware interrupt is raised over and over and prevents the irq thread
      from handling it.  Fail.
      
      request_irq() unfortunately does not refuse such a request and the patch
      was obviously never tested with real interrupts.
      Bisected-by: NPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9ecf8c0d
  15. 06 4月, 2012 2 次提交
  16. 31 3月, 2012 3 次提交
  17. 30 3月, 2012 10 次提交