NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/54493: acpi_i2c uses incorrect arguments for _DSM call



>Number:         54493
>Category:       kern
>Synopsis:       acpi_i2c uses incorrect arguments for _DSM call
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 27 18:55:00 +0000 2019
>Originator:     joshua stein
>Release:        HEAD, around 2019-07-19
>Organization:
>Environment:
>Description:
(This was sent to bouyer@ in July but I never heard back, so I'm filing this here so it doesn't get lost.)

I noticed this warning while debugging ihidev:

   ACPI Warning: \_SB.PCI0.I2C1.TPL1._DSM: Insufficient arguments - Caller passed 3, ACPI requires 4 (20190405/nsarguments-309)

The last argument to the _DSM call has to be ACPI_TYPE_PACKAGE, as defined in include/acpredef.h for _DSM.
>How-To-Repeat:
Boot an x86 machine with an i2c HID device.
>Fix:
diff --git sys/dev/acpi/acpi_i2c.c sys/dev/acpi/acpi_i2c.c
index ea1d63bf22f4..68e1de35a95d 100644
--- sys/dev/acpi/acpi_i2c.c
+++ sys/dev/acpi/acpi_i2c.c
@@ -68,7 +68,7 @@ acpi_enter_i2c_hid(struct acpi_devnode *devnode, prop_dictionary_t dev)
        obj[2].Type = ACPI_TYPE_INTEGER;
        obj[2].Integer.Value = 1;

-       obj[3].Type = ACPI_TYPE_ANY;
+       obj[3].Type = ACPI_TYPE_PACKAGE;
        obj[3].Buffer.Length = 0;

        buf.Pointer = NULL;



Home | Main Index | Thread Index | Old Index