Date: Fri, 06 Apr 2018 15:27:14 +0000 From: bugzilla-noreply@freebsd.org To: acpi@FreeBSD.org Subject: [Bug 227191] Cannot check battery status after upgrading to 12-CURRENT from r330529 to r331748 (ACPI problems) Message-ID: <bug-227191-16045-HzVaWQ28cY@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-227191-16045@https.bugs.freebsd.org/bugzilla/> References: <bug-227191-16045@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D227191 --- Comment #4 from Conrad Meyer <cem@freebsd.org> --- Your dmesg line seems related (BAT0): ACPI Error: Method parse/execution failed \134_SB.PCI0.LPCB.EC0.BAT0._STA, AE_NOT_EXIST Nothing changed in any of the dmesg-mentioned files (evregion, exfldio, psparse) in that commit. Hmm. However, these changes are suspect: sys/contrib/dev/acpica/components/namespace/nsxfname.c - * For Device and Processor objects, run the Device _HID, _UID, _CID, _STA, + * For Device and Processor objects, run the Device _HID, _UID, _CID, ... - * this was the fate of the _SUB method which was found to cause such - * problems and was removed (11/2015). + * Because of this reason support for the following methods has been remov= ed: + * 1) _SUB method was removed (11/2015) + * 2) _STA method was removed (02/2018) - * - * For _STA, if the method does not exist, then (as per the ACPI - * specification), the returned CurrentStatus flags will indicate - * that the device is present/functional/enabled. Otherwise, the - * CurrentStatus flags reflect the value returned from _STA. */ - /* Execute the Device._STA method */ - - Status =3D AcpiUtExecute_STA (Node, &Info->CurrentStatus); - if (ACPI_SUCCESS (Status)) - { - Valid |=3D ACPI_VALID_STA; - } sys/contrib/dev/acpica/changes.txt +AcpiGetObjectInfo - removed support for the _STA method. This was causing +problems on some platforms. And removing it clearly causes problems on others, so... sys/dev/acpica/acpi.c BOOLEAN acpi_DeviceIsPresent(device_t dev) { - ACPI_DEVICE_INFO *devinfo; - ACPI_HANDLE h; - BOOLEAN present; + ACPI_HANDLE h; + UINT32 s; + ACPI_STATUS status; - if ((h =3D acpi_get_handle(dev)) =3D=3D NULL || - ACPI_FAILURE(AcpiGetObjectInfo(h, &devinfo))) - return (FALSE); + h =3D acpi_get_handle(dev); + if (h =3D=3D NULL) + return (FALSE); + status =3D acpi_GetInteger(h, "_STA", &s); - /* If no _STA method, must be present */ - present =3D (devinfo->Valid & ACPI_VALID_STA) =3D=3D 0 || - ACPI_DEVICE_PRESENT(devinfo->CurrentStatus) ? TRUE : FALSE; + /* If no _STA method, must be present */ + if (ACPI_FAILURE(status)) + return (status =3D=3D AE_NOT_FOUND ? TRUE : FALSE); ... + return (ACPI_DEVICE_PRESENT(s) ? TRUE : FALSE); Ok, this function should behave more or less the same as before... A similar change was made to acpi_BatteryIsPresent(), but again I don't see= the problem. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-227191-16045-HzVaWQ28cY>