1. 12 Jun, 2010 7 commits
    • Len Brown's avatar
      Merge branch 'acpi_pad' into release · a48ecc77
      Len Brown authored
      a48ecc77
    • Len Brown's avatar
      92634825
    • Rafael J. Wysocki's avatar
      ACPI / ACPICA: Fix sysfs GPE interface · 9d3c752d
      Rafael J. Wysocki authored
      The sysfs interface allowing user space to disable/enable GPEs
      doesn't work correctly, because a GPE disabled this way will be
      re-enabled shortly by acpi_ev_asynch_enable_gpe() if it was
      previosuly enabled by acpi_enable_gpe() (in which case the
      corresponding bit in its enable register's enable_for_run mask is
      set).
      
      To address this issue make the sysfs GPE interface use
      acpi_enable_gpe() and acpi_disable_gpe() instead of acpi_set_gpe()
      so that GPE reference counters are modified by it along with the
      values of GPE enable registers.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      9d3c752d
    • Rafael J. Wysocki's avatar
      ACPI / ACPICA: Fix GPE initialization · ce43ace0
      Rafael J. Wysocki authored
      While developing the GPE reference counting code we overlooked the
      fact that acpi_ev_update_gpes() could have enabled GPEs before
      acpi_ev_initialize_gpe_block() was called.  As a result, some GPEs
      are enabled twice during the initialization.
      
      To fix this issue avoid calling acpi_enable_gpe() from
      acpi_ev_initialize_gpe_block() for the GPEs that have nonzero
      runtime reference counters.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      ce43ace0
    • Rafael J. Wysocki's avatar
      ACPI / ACPICA: Avoid writing full enable masks to GPE registers · c9a8bbb7
      Rafael J. Wysocki authored
      ACPICA uses acpi_hw_write_gpe_enable_reg() to re-enable a GPE after
      an event signaled by it has been handled.  However, this function
      writes the entire GPE enable mask to the GPE's enable register which
      may not be correct.  Namely, if one of the other GPEs in the same
      register was previously enabled by acpi_enable_gpe() and subsequently
      disabled using acpi_set_gpe(), acpi_hw_write_gpe_enable_reg() will
      re-enable it along with the target GPE.
      
      To fix this issue rework acpi_hw_write_gpe_enable_reg() so that it
      calls acpi_hw_low_set_gpe() with a special action value,
      ACPI_GPE_COND_ENABLE, that will make it only enable the GPE if the
      corresponding bit in its register's enable_for_run mask is set.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      c9a8bbb7
    • Rafael J. Wysocki's avatar
      ACPI / ACPICA: Fix low-level GPE manipulation code · fd247447
      Rafael J. Wysocki authored
      ACPICA uses acpi_ev_enable_gpe() for enabling GPEs at the low level,
      which is incorrect, because this function only enables the GPE if the
      corresponding bit in its enable register's enable_for_run mask is set.
      This causes acpi_set_gpe() to work incorrectly if used for enabling
      GPEs that were not previously enabled with acpi_enable_gpe().  As a
      result, among other things, wakeup-only GPEs are never enabled by
      acpi_enable_wakeup_device(), so the devices that use them are unable
      to wake up the system.
      
      To fix this issue remove acpi_ev_enable_gpe() and its counterpart
      acpi_ev_disable_gpe() and replace acpi_hw_low_disable_gpe() with
      acpi_hw_low_set_gpe() that will be used instead to manipulate GPE
      enable bits at the low level.  Make the users of acpi_ev_enable_gpe()
      and acpi_ev_disable_gpe() call acpi_hw_low_set_gpe() instead and
      make sure that GPE enable masks are only updated by acpi_enable_gpe()
      and acpi_disable_gpe() when GPE reference counters change from 0
      to 1 and from 1 to 0, respectively.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      fd247447
    • Linus Torvalds's avatar
      Linux 2.6.35-rc3 · 7e27d6e7
      Linus Torvalds authored
      7e27d6e7
  2. 11 Jun, 2010 33 commits