1. 27 Feb, 2010 23 commits
  2. 26 Feb, 2010 17 commits
    • Konrad Rzeszutek Wilk's avatar
      ibft: Update MAINTAINERS file. · c4d1409b
      Konrad Rzeszutek Wilk authored
      Provide the right e-mail and names for me and Peter.
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad@kernel.org>
      c4d1409b
    • Joe Perches's avatar
      drivers/firmware/iscsi_ibft.c: remove NIPQUAD_FMT, use %pI4 · 00e7825b
      Joe Perches authored
      Convert netmask to __be32 and format it with %pI4
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarKonrad Rzeszutek <ketuzsezr@darnok.org>
      Reviewed-by: default avatarMike Christie <michaelc@cs.wisc.edu>
      Cc: Peter Jones <pjones@redhat.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      00e7825b
    • Alex Elder's avatar
      Merge branch 'linux-2.6.33' · 398007f8
      Alex Elder authored
      398007f8
    • Rafael J. Wysocki's avatar
      PM / Hibernate: Fix preallocating of memory · a9c9b442
      Rafael J. Wysocki authored
      The hibernate memory preallocation code allocates memory to push some
      user space data out of physical RAM, so that the hibernation image is
      not too large.  It allocates more memory than necessary for creating
      the image, so it has to release some pages to make room for
      allocations made while suspending devices and disabling nonboot CPUs,
      or the system will hang due to the lack of free pages to allocate
      from.  Unfortunately, the function used for freeing these pages,
      free_unnecessary_pages(), contains a bug that prevents it from doing
      the job on all systems without highmem.
      
      Fix this problem, which is a regression from the 2.6.30 kernel, by
      using the right condition for the termination of the loop in
      free_unnecessary_pages().
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Reported-and-tested-by: default avatarAlan Jenkins <sourcejedi.lkml@googlemail.com>
      Cc: stable@kernel.org
      a9c9b442
    • Jiri Slaby's avatar
      PM / Hibernate: Remove swsusp.c finally · f8bb0db8
      Jiri Slaby authored
      Its contents and entry in Makefile were already removed in
      8e60c6a1
      (Shift remaining code from swsusp.c to hibernate.c)
      but somehow it remained in-place (rjw: which most likely was my
      mistake).
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      Acked-by: default avatarNigel Cunningham <nigel@tuxonice.net>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      f8bb0db8
    • Frans Pop's avatar
      PM / Hibernate: Remove trailing space in message · 07c3bb57
      Frans Pop authored
      Remove a trailing space from a message in swsusp_save().
      Signed-off-by: default avatarFrans Pop <elendil@planet.nl>
      Acked-by: default avatarPavel Machek <pavel@ucw.cz>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      07c3bb57
    • Rafael J. Wysocki's avatar
      PM: Allow SCSI devices to suspend/resume asynchronously · 4cb077d9
      Rafael J. Wysocki authored
      Set power.async_suspend for all SCSI devices, targets and hosts, so
      that they can be suspended and resumed in parallel with the main
      suspend/resume thread and possibly with other devices they don't
      depend on in a known way (i.e. devices which are not their parents or
      children).
      
      The power.async_suspend flag is also set for devices that don't have
      suspend or resume callbacks, because otherwise they would make the
      main suspend/resume thread wait for their "asynchronous" children
      (during suspend) or parents (during resume), effectively negating the
      possible gains from executing these devices' suspend and resume
      callbacks asynchronously.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      4cb077d9
    • Rafael J. Wysocki's avatar
      PM: Allow USB devices to suspend/resume asynchronously · 927bc916
      Rafael J. Wysocki authored
      Set power.async_suspend for USB devices, endpoints and interfaces,
      allowing them to be suspended and resumed asynchronously during
      system sleep transitions.
      
      The power.async_suspend flag is also set for devices that don't have
      suspend or resume callbacks, because otherwise they would make the
      main suspend/resume thread wait for their "asynchronous" children
      (during suspend) or parents (during resume), effectively negating the
      possible gains from executing these devices' suspend and resume
      callbacks asynchronously.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      927bc916
    • Alan Stern's avatar
      USB: implement non-tree resume ordering constraints for PCI host controllers · 6d19c009
      Alan Stern authored
      This patch (as1331) adds non-tree ordering constraints needed for
      proper resume of PCI USB host controllers from hibernation.  The main
      issue is that non-high-speed devices must not be resumed before the
      high-speed root hub, because it is the ehci_bus_resume() routine which
      takes care of handing the device connection over to the companion
      controller.  If the device resume is attempted before the handover
      then the device won't be found and it will be treated as though it had
      disconnected.
      
      The patch adds a new field to the usb_bus structure; for each
      full/low-speed bus this field will contain a pointer to the companion
      high-speed bus (if one exists).  It is used during normal device
      resume; if the hs_companion pointer isn't NULL then we wait for the
      root-hub device on the hs_companion bus.
      
      A secondary issue is that an EHCI controlller shouldn't be resumed
      before any of its companions.  On some machines I have observed
      handovers failing if the companion controller is reinitialized after
      the handover.  Thus, the EHCI resume routine must wait for the
      companion controllers to be resumed.
      
      The patch also fixes a small bug in usb_hcd_pci_probe(); an error path
      jumps to the wrong label, causing a memory leak.
      
      [rjw: Fixed compilation for CONFIG_PM_SLEEP unset.]
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      6d19c009
    • Rafael J. Wysocki's avatar
      PM: Allow PCI devices to suspend/resume asynchronously · a1e4d72c
      Rafael J. Wysocki authored
      Set power.async_suspend for all PCI devices and PCIe port services,
      so that they can be suspended and resumed in parallel with other
      devices they don't depend on in a known way (i.e. devices which are
      not their parents or children).
      
      This only affects the "regular" suspend and resume stages, which
      means in particular that the restoration of the PCI devices' standard
      configuration registers during resume will still be carried out
      synchronously (at the "early" resume stage).
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      a1e4d72c
    • Jiri Slaby's avatar
      PM / Hibernate: Swap, remove useless check from swsusp_read() · 09c09bc6
      Jiri Slaby authored
      It will never reach here if the sws_resume_bdev is erratic.
      swsusp_read() is called only from software_resume(), but after
      swsusp_check() which would catch the error state.
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      09c09bc6
    • Jiri Slaby's avatar
      PM / Hibernate: Really deprecate deprecated user ioctls · b694e52e
      Jiri Slaby authored
      They were deprecated and removed from exported headers more than 2
      years ago. Inform users about their removal in the future now.
      
      (Switch cases needed to be reorderded for an easy fall through.)
      
      And add an entry to feature-removal-schedule.
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      Acked-by: default avatarPavel Machek <pavel@ucw.cz>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      b694e52e
    • Rafael J. Wysocki's avatar
      PM: Allow device drivers to use dpm_wait() · f8824cee
      Rafael J. Wysocki authored
      There are some dependencies between devices (in particular, between
      EHCI USB controllers and their OHCI/UHCI siblings) which are not
      reflected by the structure of the device tree.  With synchronous
      suspend and resume these dependencies are taken into accout
      automatically, because the devices in question are always registered
      in the right order, but to meet these constraints with asynchronous
      suspend and resume the drivers of these devices will need to use
      dpm_wait() in their suspend/resume routines, so introduce a helper
      function allowing them to do that.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      f8824cee
    • Rafael J. Wysocki's avatar
      PM: Start asynchronous resume threads upfront · 97df8c12
      Rafael J. Wysocki authored
      It has been shown by testing that total device resume time can be
      reduced significantly (by as much as 50% or more) if the async
      threads executing some devices' resume routines are all started
      before the main resume thread starts to handle the "synchronous"
      devices.
      
      This is a consequence of the fact that the slowest devices tend to be
      located at the end of dpm_list, so their resume routines are started
      very late.  Consequently, they have to wait for all the preceding
      "synchronous" devices before their resume routines can be started
      by the main resume thread, even if they are "asynchronous".  By
      starting their async threads upfront we effectively move those
      devices towards the beginning of dpm_list, without breaking their
      ordering with respect to their parents and children.  As a result,
      their resume routines are started much earlier and we are able to
      save much more device resume time this way.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      97df8c12
    • Rafael J. Wysocki's avatar
      PM: Add facility for advanced testing of async suspend/resume · 5a2eb858
      Rafael J. Wysocki authored
      Add configuration switch CONFIG_PM_ADVANCED_DEBUG for compiling in
      extra PM debugging/testing code allowing one to access some
      PM-related attributes of devices from the user space via sysfs.
      
      If CONFIG_PM_ADVANCED_DEBUG is set, add sysfs attribute power/async
      for every device allowing the user space to access the device's
      power.async_suspend flag and modify it, if desired.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      5a2eb858
    • Rafael J. Wysocki's avatar
      PM: Add a switch for disabling/enabling asynchronous suspend/resume · 0e06b4a8
      Rafael J. Wysocki authored
      Add sysfs attribute /sys/power/pm_async allowing the user space to
      disable/enable asynchronous suspend/resume of devices.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      0e06b4a8
    • Rafael J. Wysocki's avatar
      PM: Asynchronous suspend and resume of devices · 5af84b82
      Rafael J. Wysocki authored
      Theoretically, the total time of system sleep transitions (suspend
      to RAM, hibernation) can be reduced by running suspend and resume
      callbacks of device drivers in parallel with each other.  However,
      there are dependencies between devices such that we're not allowed
      to suspend the parent of a device before suspending the device
      itself.  Analogously, we're not allowed to resume a device before
      resuming its parent.
      
      The most straightforward way to take these dependencies into accout
      is to start the async threads used for suspending and resuming
      devices at the core level, so that async_schedule() is called for
      each suspend and resume callback supposed to be executed
      asynchronously.
      
      For this purpose, introduce a new device flag, power.async_suspend,
      used to mark the devices whose suspend and resume callbacks are to be
      executed asynchronously (ie. in parallel with the main suspend/resume
      thread and possibly in parallel with each other) and helper function
      device_enable_async_suspend() allowing one to set power.async_suspend
      for given device (power.async_suspend is unset by default for all
      devices).  For each device with the power.async_suspend flag set the
      PM core will use async_schedule() to execute its suspend and resume
      callbacks.
      
      The async threads started for different devices as a result of
      calling async_schedule() are synchronized with each other and with
      the main suspend/resume thread with the help of completions, in the
      following way:
      (1) There is a completion, power.completion, for each device object.
      (2) Each device's completion is reset before calling async_schedule()
          for the device or, in the case of devices with the
          power.async_suspend flags unset, before executing the device's
          suspend and resume callbacks.
      (3) During suspend, right before running the bus type, device type
          and device class suspend callbacks for the device, the PM core
          waits for the completions of all the device's children to be
          completed.
      (4) During resume, right before running the bus type, device type and
          device class resume callbacks for the device, the PM core waits
          for the completion of the device's parent to be completed.
      (5) The PM core completes power.completion for each device right
          after the bus type, device type and device class suspend (or
          resume) callbacks executed for the device have returned.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      5af84b82