1. 26 8月, 2014 2 次提交
    • L
      ACPI / EC: Add support to disallow QR_EC to be issued before completing previous QR_EC · 558e4736
      Lv Zheng 提交于
      There is platform refusing to respond QR_EC when SCI_EVT isn't set
      which is Acer Aspire V5-573G.
      
      By disallowing QR_EC to be issued before the previous one has been
      completed we are able to reduce the possibilities to trigger issues on
      such platforms.
      
      Note that this fix can only reduce the occurrence rate of this issue, but
      this issue may still occur when such a platform doesn't clear SCI_EVT
      before or immediately after completing the previous QR_EC transaction.
      This patch cannot fix the CLEAR_ON_RESUME quirk which also relies on
      the assumption that the platforms are able to respond even when SCI_EVT
      isn't set.
      
      But this patch is still useful as it can help to reduce the number of
      scheduled QR_EC work items.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=82611Reported-and-tested-by: NAlexander Mezin <mezin.alexander@gmail.com>
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Cc: 3.16+ <stable@vger.kernel.org> # 3.16+
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      558e4736
    • L
      ACPI / EC: Add support to disallow QR_EC to be issued when SCI_EVT isn't set · 3afcf2ec
      Lv Zheng 提交于
      There is a platform refusing to respond QR_EC when SCI_EVT isn't set
      (Acer Aspire V5-573G).
      
      Currently, we rely on the behaviour that the EC firmware can respond
      something (for example, 0x00 to indicate "no outstanding events") to
      QR_EC even when SCI_EVT is not set, but the reporter has complained
      about AC/battery pluging/unpluging and video brightness change delay
      on that platform.
      
      This is because the work item that has issued QR_EC has to wait until
      timeout in this case, and the _Qxx method evaluation work item queued
      after QR_EC one is delayed.
      
      It sounds reasonable to fix this issue by:
       1. Implementing SCI_EVT sanity check before issuing QR_EC in the EC
          driver's main state machine.
       2. Moving QR_EC issuing out of the work queue used by _Qxx evaluation
          to a seperate IRQ handling thread.
      
      This patch fixes this issue using solution 1.
      
      By disallowing QR_EC to be issued when SCI_EVT isn't set, we are able to
      handle such platform in the EC driver's main state machine. This patch
      enhances the state machine in this way to survive with such malfunctioning
      EC firmware.
      
      Note that this patch can also fix CLEAR_ON_RESUME quirk which also relies
      on the assumption that the platforms are able to respond even when SCI_EVT
      isn't set.
      
      Fixes: c0d65341 ACPI / EC: Fix race condition in ec_transaction_completed()
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=82611Reported-and-tested-by: NAlexander Mezin <mezin.alexander@gmail.com>
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Cc: 3.16+ <stable@vger.kernel.org> # 3.16+
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      3afcf2ec
  2. 07 7月, 2014 7 次提交
  3. 30 4月, 2014 1 次提交
  4. 06 3月, 2014 1 次提交
  5. 06 1月, 2014 1 次提交
  6. 19 12月, 2013 1 次提交
  7. 07 12月, 2013 1 次提交
    • L
      ACPI: Clean up inclusions of ACPI header files · 8b48463f
      Lv Zheng 提交于
      Replace direct inclusions of <acpi/acpi.h>, <acpi/acpi_bus.h> and
      <acpi/acpi_drivers.h>, which are incorrect, with <linux/acpi.h>
      inclusions and remove some inclusions of those files that aren't
      necessary.
      
      First of all, <acpi/acpi.h>, <acpi/acpi_bus.h> and <acpi/acpi_drivers.h>
      should not be included directly from any files that are built for
      CONFIG_ACPI unset, because that generally leads to build warnings about
      undefined symbols in !CONFIG_ACPI builds.  For CONFIG_ACPI set,
      <linux/acpi.h> includes those files and for CONFIG_ACPI unset it
      provides stub ACPI symbols to be used in that case.
      
      Second, there are ordering dependencies between those files that always
      have to be met.  Namely, it is required that <acpi/acpi_bus.h> be included
      prior to <acpi/acpi_drivers.h> so that the acpi_pci_root declarations the
      latter depends on are always there.  And <acpi/acpi.h> which provides
      basic ACPICA type declarations should always be included prior to any other
      ACPI headers in CONFIG_ACPI builds.  That also is taken care of including
      <linux/acpi.h> as appropriate.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Acked-by: Bjorn Helgaas <bhelgaas@google.com> (drivers/pci stuff)
      Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> (Xen stuff)
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8b48463f
  8. 16 11月, 2013 1 次提交
  9. 25 9月, 2013 1 次提交
  10. 29 8月, 2013 1 次提交
  11. 08 8月, 2013 1 次提交
  12. 15 7月, 2013 1 次提交
  13. 28 6月, 2013 1 次提交
  14. 12 5月, 2013 1 次提交
  15. 26 1月, 2013 1 次提交
  16. 15 11月, 2012 3 次提交
  17. 07 10月, 2012 2 次提交
  18. 30 3月, 2012 1 次提交
  19. 21 3月, 2012 1 次提交
  20. 29 5月, 2011 2 次提交
  21. 26 4月, 2011 1 次提交
  22. 01 4月, 2011 1 次提交
  23. 12 1月, 2011 2 次提交
  24. 10 12月, 2010 1 次提交
  25. 22 10月, 2010 1 次提交
    • T
      ACPI: Make Embedded Controller command timeout delay configurable · 7a18e96d
      Thomas Renninger 提交于
      Here and then there show up machines which need higher timeout values.
      Finding this on affected machines can be cumbersome, because
      ACPI_EC_DELAY is a compile option -> make it configurable via boot param.
      
      This can even be provided writable at runtime via:
      /sys/modules/acpi/parameters/ec_delay
      
      Known machines where this helps:
      Some HP machines where for whatever reasons specific EC accesses take
      very long at resume from S3 (in _WAK function).
      The AE_TIME error is passed upwards and the ACPI interpreter will
      not execute the rest of the _WAK function which results in not properly
      initialized devices/variables with different side-effects.
      
      Afaik, on some MSI machines this helped as well.
      
      If this param is needed there probably are underlying problems like:
        - EC firmware bug
        - A kernel EC driver bug
        - An ACPI interpreter behavior (e.g. timings when specific
          EC accesses happen and how) which the EC does not like
        - ...
      which should get evaluated further, but often are nasty or
      impossible to fix from OS side.
      Signed-off-by: NThomas Renninger <trenn@suse.de>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      7a18e96d
  26. 03 8月, 2010 3 次提交
    • T
      acpi ec: Fix possible double io port registration · de4f1046
      Thomas Renninger 提交于
      which will result in a harmless but ugly WARN message on
      some machines.
      Signed-off-by: NThomas Renninger <trenn@suse.de>
      CC: mjg59@srcf.ucam.org
      CC: platform-driver-x86@vger.kernel.org
      CC: linux-acpi@vger.kernel.org
      CC: astarikovskiy@suse.de
      CC: akpm@linux-foundation.org
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      de4f1046
    • T
      ACPI: Register EC io ports in /proc/ioports · b52e0421
      Thomas Renninger 提交于
      Formerly these have been exposed through /proc/..
      Better register them where all IO ports should get registered
      and scream loud if someone else claims to use them.
      
      EC data and command port typically should show up like this
      then:
      ...
        0060-0060 : keyboard
        0062-0062 : EC data
        0064-0064 : keyboard
        0066-0066 : EC command
        0070-0071 : rtc0
      ...
      Signed-off-by: NThomas Renninger <trenn@suse.de>
      
      CC: Alexey Starikovskiy <astarikovskiy@suse.de>
      CC: Len Brown <lenb@kernel.org>
      CC: linux-kernel@vger.kernel.org
      CC: linux-acpi@vger.kernel.org
      CC: Bjorn Helgaas <bjorn.helgaas@hp.com>
      CC: platform-driver-x86@vger.kernel.org
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      b52e0421
    • T
      ACPI: Provide /sys/kernel/debug/ec/... · 1195a098
      Thomas Renninger 提交于
      This patch provides the same information through debugfs, which previously was
      provided through /proc/acpi/embedded_controller/*/info
      
      This is the gpe the EC is connected to and whether the global lock
      gets used.
      The io ports used are added to /proc/ioports in another patch.
      Beside the fact that /proc/acpi is deprecated for quite some time,
      this info is not needed for applications and thus can be moved
      to debugfs instead of a public interface like /sys.
      Signed-off-by: NThomas Renninger <trenn@suse.de>
      
      CC: Alexey Starikovskiy <astarikovskiy@suse.de>
      CC: Len Brown <lenb@kernel.org>
      CC: linux-kernel@vger.kernel.org
      CC: linux-acpi@vger.kernel.org
      CC: Bjorn Helgaas <bjorn.helgaas@hp.com>
      CC: platform-driver-x86@vger.kernel.org
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      1195a098