Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145518658
D15198.1778106081.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D15198.1778106081.diff
View Options
Index: sys/dev/acpi_support/acpi_wmi.c
===================================================================
--- sys/dev/acpi_support/acpi_wmi.c
+++ sys/dev/acpi_support/acpi_wmi.c
@@ -238,15 +238,16 @@
sc->wmi_dev = dev;
sc->wmi_handle = acpi_get_handle(dev);
TAILQ_INIT(&sc->wmi_info_list);
- /* XXX Only works with one EC, but nearly all systems only have one. */
+ /* XXX Only works with at most one EC, but nearly all systems only have one. */
if ((sc->ec_dev = devclass_get_device(devclass_find("acpi_ec"), 0))
- == NULL)
+ == NULL){
device_printf(dev, "cannot find EC device\n");
- else if (ACPI_FAILURE((status = AcpiInstallNotifyHandler(sc->wmi_handle,
+ }
+ if (ACPI_FAILURE((status = AcpiInstallNotifyHandler(sc->wmi_handle,
ACPI_DEVICE_NOTIFY, acpi_wmi_notify_handler, sc))))
device_printf(sc->wmi_dev, "couldn't install notify handler - %s\n",
AcpiFormatException(status));
- else if (ACPI_FAILURE((status = AcpiInstallAddressSpaceHandler(
+ else if (sc->ec_dev && ACPI_FAILURE((status = AcpiInstallAddressSpaceHandler(
sc->wmi_handle, ACPI_ADR_SPACE_EC, acpi_wmi_ec_handler,
NULL, sc)))) {
device_printf(sc->wmi_dev, "couldn't install EC handler - %s\n",
@@ -670,6 +671,12 @@
ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, (UINT32)address);
sc = (struct acpi_wmi_softc *)context;
+
+ if(sc->ec_dev == NULL){
+ device_printf(sc->wmi_dev,"EC not found but handler called\n");
+ return AE_ERROR;
+ }
+
if (width % 8 != 0 || value == NULL || context == NULL)
return (AE_BAD_PARAMETER);
if (address + (width / 8) - 1 > 0xFF)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, May 6, 10:21 PM (12 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28580191
Default Alt Text
D15198.1778106081.diff (1 KB)
Attached To
Mode
D15198: Make acpi_wmi module attached without single Embedded Controller.
Attached
Detach File
Event Timeline
Log In to Comment