1. 24 12月, 2010 1 次提交
  2. 31 7月, 2010 1 次提交
    • A
      PCI: change device runtime PM settings for probe and remove · f3ec4f87
      Alan Stern 提交于
      This patch (as1388) changes the way the PCI core handles runtime PM
      settings when probing or unbinding drivers.  Now the core will make
      sure the device is enabled for runtime PM, with a usage count >= 1,
      when a driver is probed.  It does the same when calling a driver's
      remove method.
      
      If the driver wants to use runtime PM, all it has to do is call
      pm_runtime_pu_noidle() near the end of its probe routine (to cancel
      the core's usage increment) and pm_runtime_get_noresume() near the
      start of its remove routine (to restore the usage count).  It does not
      need to mess around with setting the runtime state to enabled,
      disabled, active, or suspended.
      
      The patch updates e1000e and r8169, the only PCI drivers that already
      use the existing runtime PM interface.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      f3ec4f87
  3. 23 2月, 2010 1 次提交
  4. 15 9月, 2009 2 次提交
  5. 10 9月, 2009 1 次提交
  6. 21 8月, 2009 1 次提交
  7. 25 7月, 2009 1 次提交
  8. 24 7月, 2009 1 次提交
  9. 31 3月, 2009 4 次提交
  10. 21 3月, 2009 2 次提交
  11. 13 3月, 2009 1 次提交
  12. 05 2月, 2009 4 次提交
  13. 28 1月, 2009 2 次提交
    • R
      PCI PM: Fix hibernation breakage on EeePC 701 · 545ffd58
      Rafael J. Wysocki 提交于
      Hibernation breaks on EeePC 701 as a result of attempting to put one
      of its (driverless) devices into a low power state.  Avoid that by
      not attepmting to power manage driverless devices during hibernation.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Reported-and-tested-by: NAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      545ffd58
    • R
      PCI PM: Fix suspend error paths and testing facility breakage · 418e4da3
      Rafael J. Wysocki 提交于
      If one of device drivers refuses to suspend by returning error code
      from its ->suspend() callback, the devices that have already been
      suspended are resumed by executing their drivers' ->resume()
      callbacks.  Some of these callbacks expect the device's
      configuration space to be restored if the device has been put into
      D3 before they are called.  Unfortunately, this mechanism has been
      broken by recent changes moving the restoration of config spaces
      of some devices (most importantly, USB controllers and HDA Intel)
      into the resume callbacks executed with interrupts off.  Obviously,
      these callbacks are not invoked in the suspend error path and, as a
      result, the system cannot be successfully brought back into the
      working state in case of a suspend error.  The same thing happens
      in the hibernation error path right before putting the system into
      S4.
      
      Similarly, the suspend testing facility associated with the
      /sys/power/pm_test file is broken, because it uses the very same
      mechanism that is used in the suspend and hibernation error paths.
      
      Fix the breakage by making the PCI core restore the configuration
      spaces of PCI devices that haven't been restored already before
      pci_pm_resume() is called for those devices by the PM core.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      418e4da3
  14. 17 1月, 2009 1 次提交
    • R
      PCI PM: Restore standard config registers of all devices early · aa8c6c93
      Rafael J. Wysocki 提交于
      There is a problem in our handling of suspend-resume of PCI devices that
      many of them have their standard config registers restored with
      interrupts enabled and they are put into the full power state with
      interrupts enabled as well.  This may lead to the following scenario:
        * an interrupt vector is shared between two or more devices
        * one device is resumed earlier and generates an interrupt
        * the interrupt handler of another device tries to handle it and
          attempts to access the device the config space of which hasn't been
          restored yet and/or which still is in a low power state
        * the system crashes as a result
      
      To prevent this from happening we should restore the standard
      configuration registers of all devices with interrupts disabled and we
      should put them into the D0 power state right after that.
      Unfortunately, this cannot be done using the existing
      pci_set_power_state(), because it can sleep.  Also, to do it we have to
      make sure that the config spaces of all devices were actually saved
      during suspend.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      aa8c6c93
  15. 08 1月, 2009 11 次提交
  16. 07 1月, 2009 2 次提交
    • R
      PCI: Rework default handling of suspend and resume · 355a72d7
      Rafael J. Wysocki 提交于
      Rework the handling of suspend and resume of PCI devices which have
      no drivers or the drivers of which do not provide any suspend-resume
      callbacks in such a way that their standard PCI configuration
      registers will be saved and restored with interrupts disabled.  This
      should prevent such devices, including PCI bridges, from being
      resumed too late to be able to function correctly during the resume
      of the other PCI devices that may depend on them.
      
      Also, to remove one possible source of future confusion, drop the
      default handling of suspend and resume for PCI devices with drivers
      providing the 'pm' object introduced by the new suspend-resume
      framework (there are no such PCI drivers at the moment).
      
      This patch addresses the regression from 2.6.26 tracked as
      http://bugzilla.kernel.org/show_bug.cgi?id=12121 .
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      355a72d7
    • R
      PM: Simplify the new suspend/hibernation framework for devices · adf09493
      Rafael J. Wysocki 提交于
      PM: Simplify the new suspend/hibernation framework for devices
      
      Following the discussion at the Kernel Summit, simplify the new
      device PM framework by merging 'struct pm_ops' and
      'struct pm_ext_ops' and removing pointers to 'struct pm_ext_ops'
      from 'struct platform_driver' and 'struct pci_driver'.
      
      After this change, the suspend/hibernation callbacks will only
      reside in 'struct device_driver' as well as at the bus type/
      device class/device type level.  Accordingly, PCI and platform
      device drivers are now expected to put their suspend/hibernation
      callbacks into the 'struct device_driver' embedded in
      'struct pci_driver' or 'struct platform_driver', respectively.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@suse.cz>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      adf09493
  17. 21 10月, 2008 2 次提交
  18. 11 6月, 2008 2 次提交