freebsd-dev/sys/dev/acpica
Andriy Gapon 817b71bbb9 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@gmail.com>.

PR:		227191
Reported by:	0mp
MFC after:	2 weeks
2018-12-06 12:34:34 +00:00
..
Osd remove unneeded inclusion of sys/interrupt.h from several files 2018-07-04 09:07:18 +00:00
acpi_acad.c Distinguish _CID match and _HID match and make lower priority probe 2018-10-26 00:05:46 +00:00
acpi_battery.c Add support for none ACPI battery method batteries 2018-11-23 12:03:01 +00:00
acpi_bus_if.m Add the start of INTRNG support for ACPI. 2018-01-11 17:09:12 +00:00
acpi_button.c Distinguish _CID match and _HID match and make lower priority probe 2018-10-26 00:05:46 +00:00
acpi_cmbat.c Distinguish _CID match and _HID match and make lower priority probe 2018-10-26 00:05:46 +00:00
acpi_container.c Distinguish _CID match and _HID match and make lower priority probe 2018-10-26 00:05:46 +00:00
acpi_cpu.c Distinguish _CID match and _HID match and make lower priority probe 2018-10-26 00:05:46 +00:00
acpi_dock.c
acpi_ec.c acpi/ec: Fix regression caused by r340644 2018-11-26 19:41:13 +00:00
acpi_hpet.c Fix off by one in hpet_mmap() csw method. 2018-12-02 13:27:36 +00:00
acpi_hpet.h
acpi_if.m Distinguish _CID match and _HID match and make lower priority probe 2018-10-26 00:05:46 +00:00
acpi_isab.c Distinguish _CID match and _HID match and make lower priority probe 2018-10-26 00:05:46 +00:00
acpi_lid.c Distinguish _CID match and _HID match and make lower priority probe 2018-10-26 00:05:46 +00:00
acpi_package.c
acpi_pci_link.c Distinguish _CID match and _HID match and make lower priority probe 2018-10-26 00:05:46 +00:00
acpi_pci.c
acpi_pcib_acpi.c Add support for NUMA domains to bus dma tags. This causes all memory 2018-01-12 23:34:16 +00:00
acpi_pcib_pci.c
acpi_pcib.c acpica: rework INTRNG interrupts 2018-11-19 03:02:47 +00:00
acpi_pcibvar.h
acpi_pcivar.h
acpi_perf.c
acpi_powerres.c
acpi_quirk.c
acpi_quirks
acpi_resource.c pci_host_generic, acpi_resource: drop unneeded code 2018-11-19 03:34:15 +00:00
acpi_smbat.c Distinguish _CID match and _HID match and make lower priority probe 2018-10-26 00:05:46 +00:00
acpi_smbus.h
acpi_thermal.c Make timespecadd(3) and friends public 2018-07-30 15:46:40 +00:00
acpi_throttle.c
acpi_timer.c
acpi_video.c
acpi.c acpi_{Device,Battery}IsPresent: restore pre-r330957 behaviour 2018-12-06 12:34:34 +00:00
acpiio.h
acpivar.h acpica: rework INTRNG interrupts 2018-11-19 03:02:47 +00:00