[Bug 227191] Cannot check battery status after upgrading to 12-CURRENT after r330957 (ACPI _STA method removed)

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 06 Dec 2018 12:35:14 +0000
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227191

--- Comment #20 from commit-hook_at_freebsd.org ---
A commit references this bug:

Author: avg
Date: Thu Dec  6 12:34:34 UTC 2018
New revision: 341632
URL: https://svnweb.freebsd.org/changeset/base/341632

Log:
  acpi_{Device,Battery}IsPresent: restore pre-r330957 behaviour

  Specifically, assume that the device is present if evaluation of _STA
  method fails.

  Before r330957 we ignored any _STA evaluation failure (which was
  performed by AcpiGetObjectInfo in ACPICA contrib code) for the purpose
  of acpi_DeviceIsPresent and acpi_BatteryIsPresent.  ACPICA 20180313
  removed evaluation of _STA from AcpiGetObjectInfo.  So, we added
  evaluation of _STA to acpi_DeviceIsPresent and acpi_BatteryIsPresent.
  One important difference is that the new code ignored a failure only if
  _STA did not exist (AE_NOT_FOUND).  Any other kind of failure was
  treated as a fatal failure.  Apparently, on some systems we can get
  AE_NOT_EXIST when evaluating _STA.  And that error is not an evil twin
  of AE_NOT_FOUND, despite a very similar name, but a distinct error
  related to a missing handler for an ACPI operation region.

  It's possible that for some people the problem was already fixed by
  changes in ACPICA and/or in acpi_ec driver (or even in BIOS) that fixed
  the AE_NOT_EXIST failure related to EC operation region.

  This work is based on a great analysis by cem and an earlier patch by
  Ali Abdallah <aliovx_at_gmail.com>.

  PR:           227191
  Reported by:  0mp
  MFC after:    2 weeks

Changes:
  head/sys/dev/acpica/acpi.c

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Thu Dec 06 2018 - 11:35:18 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:19 UTC