1. 12 5月, 2013 5 次提交
    • R
      Driver core: Add offline/online device operations · 4f3549d7
      Rafael J. Wysocki 提交于
      In some cases, graceful hot-removal of devices is not possible,
      although in principle the devices in question support hotplug.
      For example, that may happen for the last CPU in the system or
      for memory modules holding kernel memory.
      
      In those cases it is nice to be able to check if the given device
      can be gracefully hot-removed before triggering a removal procedure
      that cannot be aborted or reversed.  Unfortunately, however, the
      kernel currently doesn't provide any support for that.
      
      To address that deficiency, introduce support for offline and
      online operations that can be performed on devices, respectively,
      before a hot-removal and in case when it is necessary (or convenient)
      to put a device back online after a successful offline (that has not
      been followed by removal).  The idea is that the offline will fail
      whenever the given device cannot be gracefully removed from the
      system and it will not be allowed to use the device after a
      successful offline (until a subsequent online) in analogy with the
      existing CPU offline/online mechanism.
      
      For now, the offline and online operations are introduced at the
      bus type level, as that should be sufficient for the most urgent use
      cases (CPUs and memory modules).  In the future, however, the
      approach may be extended to cover some more complicated device
      offline/online scenarios involving device drivers etc.
      
      The lock_device_hotplug() and unlock_device_hotplug() functions are
      introduced because subsequent patches need to put larger pieces of
      code under device_hotplug_lock to prevent race conditions between
      device offline and removal from happening.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Reviewed-by: NToshi Kani <toshi.kani@hp.com>
      4f3549d7
    • L
      ACPI / AC: Add sleep quirk for Thinkpad e530 · 0ab5bb64
      Lan Tianyu 提交于
      The Thinkpad e530's BIOS notifies the AC device first and then
      sleeps for certain amount of time before doing real work in the
      EC event handler (_Qxx):
      
       Method (_Q27, 0, NotSerialized)
       {
             Notify (AC, 0x80)
             Sleep (0x03E8)
             Store (Zero, PWRS)
             PNOT ()
       }
      
      This causes the AC driver to report an outdated AC state to user
      space, because it reads the state information from the device while
      the EC handler is sleeping.
      
      Introduce a quirk to cause the AC driver to wait in acpi_ac_notify()
      before calling acpi_ac_get_state() on systems known to have this
      problem and add Thinkpad e530 to the list of quirky machines (with
      a 1s delay which has been verified to be sufficient for that
      machine).
      
      [rjw: Changelog]
      References: https://bugzilla.kernel.org/show_bug.cgi?id=45221Signed-off-by: NLan Tianyu <tianyu.lan@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      0ab5bb64
    • L
      ACPI / EC: Restart transaction even when the IBF flag set · 28fe5c82
      Lan Tianyu 提交于
      The EC driver works abnormally with IBF flag always set.
      IBF means "The host has written a byte of data to the command
      or data port, but the embedded controller has not yet read it".
      If IBF is set in the EC status and not cleared, this will cause
      all subsequent EC requests to fail with a timeout error.
      
      Change the EC driver so that it doesn't refuse to restart a
      transaction if IBF is set in the status.  Also increase the
      number of transaction restarts to 5, as it turns out that 2
      is not sufficient in some cases.
      
      This bug happens on several different machines (Asus V1S,
      Dell Latitude E6530, Samsung R719, Acer Aspire 5930G,
      Sony Vaio SR19VN and others).
      
      [rjw: Changelog]
      References: https://bugzilla.kernel.org/show_bug.cgi?id=14733
      References: https://bugzilla.kernel.org/show_bug.cgi?id=15560
      References: https://bugzilla.kernel.org/show_bug.cgi?id=15946
      References: https://bugzilla.kernel.org/show_bug.cgi?id=42945
      References: https://bugzilla.kernel.org/show_bug.cgi?id=48221Signed-off-by: NLan Tianyu <tianyu.lan@intel.com>
      Cc: All <stable@vger.kernel.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      28fe5c82
    • A
      ACPI video: ignore BIOS initial backlight value for HP 1000 · 4ef366c5
      Alex Hung 提交于
      On HP 1000 lapops, BIOS reports minimum backlight on boot and
      causes backlight to dim completely. This ignores the initial backlight
      values and set to max brightness.
      
      References:: https://bugs.launchpad.net/bugs/1167760Signed-off-by: NAlex Hung <alex.hung@canonical.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      4ef366c5
    • R
      ACPI / PM: Move processor suspend/resume to syscore_ops · 0a3b15ac
      Rafael J. Wysocki 提交于
      The system suspend routine of the ACPI processor driver saves
      the BUS_MASTER_RLD register and its resume routine restores it.
      However, there can be only one such register in the system and it
      really should be saved after non-boot CPUs have been offlined and
      restored before they are put back online during resume.
      
      For this reason, move the saving and restoration of BUS_MASTER_RLD
      to syscore suspend and syscore resume, respectively, and drop the no
      longer necessary suspend/resume callbacks from the ACPI processor
      driver.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      0a3b15ac
  2. 10 5月, 2013 35 次提交