An error occurred fetching the project authors.
  1. 21 Jun, 2011 1 commit
    • Rafael J. Wysocki's avatar
      PCI / PM: Block races between runtime PM and system sleep · a5f76d5e
      Rafael J. Wysocki authored
      After commit e8665002
      (PM: Allow pm_runtime_suspend() to succeed during system suspend) it
      is possible that a device resumed by the pm_runtime_resume(dev) in
      pci_pm_prepare() will be suspended immediately from a work item,
      timer function or otherwise, defeating the very purpose of calling
      pm_runtime_resume(dev) from there.  To prevent that from happening
      it is necessary to increment the runtime PM usage counter of the
      device by replacing pm_runtime_resume() with pm_runtime_get_sync().
      Moreover, the incremented runtime PM usage counter has to be
      decremented by the corresponding pci_pm_complete(), via
      pm_runtime_put_sync().
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Cc: stable@kernel.org
      Acked-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      a5f76d5e
  2. 11 Apr, 2011 1 commit
    • Rafael J. Wysocki's avatar
      PM / Hibernate: Introduce CONFIG_HIBERNATE_CALLBACKS · 1f112cee
      Rafael J. Wysocki authored
      Xen save/restore is going to use hibernate device callbacks for
      quiescing devices and putting them back to normal operations and it
      would need to select CONFIG_HIBERNATION for this purpose.  However,
      that also would cause the hibernate interfaces for user space to be
      enabled, which might confuse user space, because the Xen kernels
      don't support hibernation.  Moreover, it would be wasteful, as it
      would make the Xen kernels include a substantial amount of code that
      they would never use.
      
      To address this issue introduce new power management Kconfig option
      CONFIG_HIBERNATE_CALLBACKS, such that it will only select the code
      that is necessary for the hibernate device callbacks to work and make
      CONFIG_HIBERNATION select it.  Then, Xen save/restore will be able to
      select CONFIG_HIBERNATE_CALLBACKS without dragging the entire
      hibernate code along with it.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Tested-by: default avatarShriram Rajagopalan <rshriram@cs.ubc.ca>
      1f112cee
  3. 14 Mar, 2011 1 commit
  4. 23 Dec, 2010 2 commits
  5. 30 Jul, 2010 1 commit
    • Alan Stern's avatar
      PCI: change device runtime PM settings for probe and remove · f3ec4f87
      Alan Stern authored
      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: default avatarAlan Stern <stern@rowland.harvard.edu>
      Acked-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      f3ec4f87
  6. 23 Feb, 2010 1 commit
  7. 14 Sep, 2009 2 commits
  8. 09 Sep, 2009 1 commit
  9. 20 Aug, 2009 1 commit
  10. 25 Jul, 2009 1 commit
  11. 23 Jul, 2009 1 commit
  12. 30 Mar, 2009 4 commits
  13. 20 Mar, 2009 2 commits
  14. 13 Mar, 2009 1 commit
  15. 05 Feb, 2009 4 commits
  16. 27 Jan, 2009 2 commits
    • Rafael J. Wysocki's avatar
      PCI PM: Fix hibernation breakage on EeePC 701 · 545ffd58
      Rafael J. Wysocki authored
      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: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Reported-and-tested-by: default avatarAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      545ffd58
    • Rafael J. Wysocki's avatar
      PCI PM: Fix suspend error paths and testing facility breakage · 418e4da3
      Rafael J. Wysocki authored
      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: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      418e4da3
  17. 16 Jan, 2009 1 commit
    • Rafael J. Wysocki's avatar
      PCI PM: Restore standard config registers of all devices early · aa8c6c93
      Rafael J. Wysocki authored
      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: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      aa8c6c93
  18. 07 Jan, 2009 11 commits
  19. 06 Jan, 2009 2 commits
    • Rafael J. Wysocki's avatar
      PCI: Rework default handling of suspend and resume · 355a72d7
      Rafael J. Wysocki authored
      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: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      355a72d7
    • Rafael J. Wysocki's avatar
      PM: Simplify the new suspend/hibernation framework for devices · adf09493
      Rafael J. Wysocki authored
      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: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarPavel Machek <pavel@suse.cz>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      adf09493