1. 27 Jan, 2009 6 commits
    • Rafael J. Wysocki's avatar
      SATA PIIX: Blacklist system that spins off disks during ACPI power off · 5f451fe1
      Rafael J. Wysocki authored
      Some notebooks from HP have the problem that their BIOSes attempt to
      spin down hard drives before entering ACPI system states S4 and S5.
      This leads to a yo-yo effect during system power-off shutdown and the
      last phase of hibernation when the disk is first spun down by the
      kernel and then almost immediately turned on and off by the BIOS.
      This, in turn, may result in shortening the disk's life times.
      
      To prevent this from happening we can blacklist the affected systems
      using DMI information.
      
      Blacklist HP 2510p that uses the ata_piix driver.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      5f451fe1
    • Rafael J. Wysocki's avatar
      SATA Sil: Blacklist system that spins off disks during ACPI power off · e57db7bd
      Rafael J. Wysocki authored
      Some notebooks from HP have the problem that their BIOSes attempt to
      spin down hard drives before entering ACPI system states S4 and S5.
      This leads to a yo-yo effect during system power-off shutdown and the
      last phase of hibernation when the disk is first spun down by the
      kernel and then almost immediately turned on and off by the BIOS.
      This, in turn, may result in shortening the disk's life times.
      
      To prevent this from happening we can blacklist the affected systems
      using DMI information.
      
      Blacklist HP nx6325 that uses the sata_sil driver.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      e57db7bd
    • Rafael J. Wysocki's avatar
      SATA AHCI: Blacklist system that spins off disks during ACPI power off · 1fd68434
      Rafael J. Wysocki authored
      Some notebooks from HP have the problem that their BIOSes attempt to
      spin down hard drives before entering ACPI system states S4 and S5.
      This leads to a yo-yo effect during system power-off shutdown and the
      last phase of hibernation when the disk is first spun down by the
      kernel and then almost immediately turned on and off by the BIOS.
      This, in turn, may result in shortening the disk's life times.
      
      To prevent this from happening we can blacklist the affected systems
      using DMI information.
      
      Blacklist HP nx6310 that uses the AHCI driver.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      1fd68434
    • Rafael J. Wysocki's avatar
      SATA: Blacklisting of systems that spin off disks during ACPI power off · 2a6e58d2
      Rafael J. Wysocki authored
      Introduce new libata flags ATA_FLAG_NO_POWEROFF_SPINDOWN and
      ATA_FLAG_NO_HIBERNATE_SPINDOWN that, if set, will prevent disks from
      being spun off during system power off and hibernation, respectively
      (to handle the hibernation case we need the new system state
      SYSTEM_HIBERNATE_ENTER that can be checked against by libata, in
      analogy with SYSTEM_POWER_OFF).
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      2a6e58d2
    • Rafael J. Wysocki's avatar
      DMI: Introduce dmi_first_match to make the interface more flexible · d7b1956f
      Rafael J. Wysocki authored
      Some notebooks from HP have the problem that their BIOSes attempt to
      spin down hard drives before entering ACPI system states S4 and S5.
      This leads to a yo-yo effect during system power-off shutdown and the
      last phase of hibernation when the disk is first spun down by the
      kernel and then almost immediately turned on and off by the BIOS.
      This, in turn, may result in shortening the disk's life times.
      
      To prevent this from happening we can blacklist the affected systems
      using DMI information.  However, only the on-board controlles should
      be blacklisted and their PCI slot numbers can be used for this
      purpose.  Unfortunately the existing interface for checking DMI
      information of the system is not very convenient for this purpose,
      because to use it, we would have to define special callback functions
      or create a separate struct dmi_system_id table for each blacklisted
      system.
      
      To overcome this difficulty introduce a new function
      dmi_first_match() returning a pointer to the first entry in an array
      of struct dmi_system_id elements that matches the system DMI
      information.  Then, we can use this pointer to access the entry's
      .driver_data field containing the additional information, such as
      the PCI slot number, allowing us to do the desired blacklisting.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      d7b1956f
    • Rafael J. Wysocki's avatar
      Hibernation: Introduce system_entering_hibernation · abfe2d7b
      Rafael J. Wysocki authored
      Introduce boolean function system_entering_hibernation() returning
      'true' during the last phase of hibernation, in which devices are
      being put into low power states and the sleep state (for example,
      ACPI S4) is finally entered.
      
      Some device drivers need such a function to check if the system is
      in the final phase of hibernation.  In particular, some SATA drivers
      are going to use it for blacklisting systems in which the disks
      should not be spun down during the last phase of hibernation (the
      BIOS will do that anyway).
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      abfe2d7b
  2. 17 Jan, 2009 5 commits
  3. 16 Jan, 2009 29 commits