1. 23 2月, 2010 1 次提交
    • R
      PCI / ACPI / PM: Platform support for PCI PME wake-up · b67ea761
      Rafael J. Wysocki 提交于
      Although the majority of PCI devices can generate PMEs that in
      principle may be used to wake up devices suspended at run time,
      platform support is generally necessary to convert PMEs into wake-up
      events that can be delivered to the kernel.  If ACPI is used for this
      purpose, PME signals generated by a PCI device will trigger the ACPI
      GPE associated with the device to generate an ACPI wake-up event that
      we can set up a handler for, provided that everything is configured
      correctly.
      
      Unfortunately, the subset of PCI devices that have GPEs associated
      with them is quite limited.  The devices without dedicated GPEs have
      to rely on the GPEs associated with other devices (in the majority of
      cases their upstream bridges and, possibly, the root bridge) to
      generate ACPI wake-up events in response to PME signals from them.
      
      Add ACPI platform support for PCI PME wake-up:
      o Add a framework making is possible to use ACPI system notify
        handlers for run-time PM.
      o Add new PCI platform callback ->run_wake() to struct
        pci_platform_pm_ops allowing us to enable/disable the platform to
        generate wake-up events for given device.  Implemet this callback
        for the ACPI platform.
      o Define ACPI wake-up handlers for PCI devices and PCI root buses and
        make the PCI-ACPI binding code register wake-up notifiers for all
        PCI devices present in the ACPI tables.
      o Add function pci_dev_run_wake() which can be used by PCI drivers to
        check if given device is capable of generating wake-up events at
        run time.
      
      Developed in cooperation with Matthew Garrett <mjg@redhat.com>.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      b67ea761
  2. 17 12月, 2009 1 次提交
    • R
      PCI/PM: Propagate wake-up enable for PCIe devices too · dc1a94ae
      Rafael J. Wysocki 提交于
      Having read the PM part of the PCIe 2.0 specification more carefully
      I think that it was a mistake to restrict the wake-up enable
      propagation to non-PCIe devices, because if we do not request
      control of the root ports' PME registers via OSC, PCIe PME is
      supposed to be handled by the platform, just like the non-PCIe PME.
      Even if we do that, the wake-up propagation is done to allow the
      devices to wake up the system from sleep states which involves the
      platform anyway, so it won't hurt.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      dc1a94ae
  3. 25 11月, 2009 1 次提交
  4. 10 9月, 2009 3 次提交
  5. 27 3月, 2009 1 次提交
  6. 20 3月, 2009 1 次提交
  7. 08 1月, 2009 6 次提交
  8. 31 12月, 2008 1 次提交
  9. 12 11月, 2008 1 次提交
    • K
      PCI: ignore bit0 of _OSC return code · 2485b867
      Kenji Kaneshige 提交于
      Currently acpi_run_osc() checks all the bits in _OSC result code (the
      first DWORD in the capabilities buffer) to see error condition. But the
      bit 0, which doesn't indicate any error, must be ignored.
      
      The bit 0 is used as the query flag at _OSC invocation time. Some
      platforms clear it during _OSC evaluation, but the others don't. On
      latter platforms, current acpi_run_osc() mis-detects error when _OSC is
      evaluated with query flag set because it doesn't ignore the bit 0.
      Because of this, the __acpi_query_osc() always fails on such platforms.
      
      And this is the cause of the problem that pci_osc_control_set() doesn't
      work since the commit 4e39432f which
      changed pci_osc_control_set() to use __acpi_query_osc().
      Tested-by: N"Tomasz Czernecki <czernecki@gmail.com>
      Signed-off-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      2485b867
  10. 25 10月, 2008 1 次提交
  11. 23 10月, 2008 4 次提交
  12. 29 7月, 2008 1 次提交
  13. 17 7月, 2008 2 次提交
  14. 08 7月, 2008 3 次提交
    • R
      PCI ACPI: Rework PCI handling of wake-up · eb9d0fe4
      Rafael J. Wysocki 提交于
      * Introduce function acpi_pm_device_sleep_wake() for enabling and
        disabling the system wake-up capability of devices that are power
        manageable by ACPI.
      
      * Introduce function acpi_bus_can_wakeup() allowing other (dependent)
        subsystems to check if ACPI is able to enable the system wake-up
        capability of given device.
      
      * Introduce callback .sleep_wake() in struct pci_platform_pm_ops and
        for the ACPI PCI 'driver' make it use acpi_pm_device_sleep_wake().
      
      * Introduce callback .can_wakeup() in struct pci_platform_pm_ops and
        for the ACPI 'driver' make it use acpi_bus_can_wakeup().
      
      * Move the PME# handlig code out of pci_enable_wake() and split it
        into two functions, pci_pme_capable() and pci_pme_active(),
        allowing the caller to check if given device is capable of
        generating PME# from given power state and to enable/disable the
        device's PME# functionality, respectively.
      
      * Modify pci_enable_wake() to use the new ACPI callbacks and the new
        PME#-related functions.
      
      * Drop the generic .platform_enable_wakeup() callback that is not
        used any more.
      
      * Introduce device_set_wakeup_capable() that will set the
        power.can_wakeup flag of given device.
      
      * Rework PCI device PM initialization so that, if given device is
        capable of generating wake-up events, either natively through the
        PME# mechanism, or with the help of the platform, its
        power.can_wakeup flag is set and its power.should_wakeup flag is
        unset as appropriate.
      
      * Make ACPI set the power.can_wakeup flag for devices found to be
        wake-up capable by it.
      
      * Make the ACPI wake-up code enable/disable GPEs for devices that
        have the wakeup.flags.prepared flag set (which means that their
        wake-up power has been enabled).
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      eb9d0fe4
    • R
      PCI: rework pci_set_power_state function to call platform first · 44e4e66e
      Rafael J. Wysocki 提交于
      Rework pci_set_power_state() so that the platform callback is
      invoked before the native mechanism, if necessary.  Also, make
      the function check if the device is power manageable by the
      platform before invoking the platform callback.
      
      This may matter if the device dependent on additional power
      resources controlled by the platform is being put into D0, in which
      case those power resources must be turned on before we attempt to
      handle the device itself.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@suse.cz>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      44e4e66e
    • R
      PCI: Introduce platform_pci_power_manageable function · 961d9120
      Rafael J. Wysocki 提交于
      Introduce function pointer platform_pci_power_manageable to be used
      by the platform-related code to point to a function allowing us to
      check if given device is power manageable by the platform.
      
      Introduce acpi_pci_power_manageable() playing that role for ACPI.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      961d9120
  15. 28 6月, 2008 1 次提交
    • T
      Fix forcedeth hibernate/wake-on-lan problems · f5ccbcfa
      Tobias Diedrich 提交于
      This patch is the minimal amount of code needed to support
      wake-on-lan in platform mode properly (i.e. "ethtool -s eth0 wol g"
      is sufficient, no additional magic needed) for me.
      
      This is derived from David Brownells patch
      (http://lists.laptop.org/pipermail/devel/2007-April/004691.html).
      However I decided to move the hook into pci-acpi.c since the other
      two pci hooks also live there and pci and acpi are the only users of
      the platform_enable_wakeup-hook.
      
      As a 'side-effect' this also makes wake on usb activity work for me
      and I had to disable usb wakeup (which is enabled by default) using
      the power/wakeup sysfs functionality ("echo disabled >
      ${sysfs_path_to_device}/power/wakeup").
      
      (BTW I first thought the 'immediate reboot because of usb wake' effect is
      caused by the optical mouse generating a wake event, but it rather
      seems to be a problem with a flaky secondary usb host controller,
      which sees a connected device where nothing is attached)
      Signed-off-by: NTobias Diedrich <ranma+kernel@tdiedrich.de>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      f5ccbcfa
  16. 12 6月, 2008 2 次提交
  17. 11 6月, 2008 5 次提交
  18. 14 5月, 2008 4 次提交
  19. 23 2月, 2008 1 次提交