NetBSD Problem Report #54493

From www@netbsd.org  Tue Aug 27 18:54:07 2019
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (unknown [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 08F557A1AB
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 27 Aug 2019 18:54:07 +0000 (UTC)
Message-Id: <20190827185328.11C5A7A1DD@mollari.NetBSD.org>
Date: Tue, 27 Aug 2019 18:53:28 +0000 (UTC)
From: jcs@openbsd.org
Reply-To: jcs@openbsd.org
To: gnats-bugs@NetBSD.org
Subject: acpi_i2c uses incorrect arguments for _DSM call
X-Send-Pr-Version: www-1.0

>Number:         54493
>Category:       kern
>Synopsis:       acpi_i2c uses incorrect arguments for _DSM call
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bouyer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 27 18:55:00 +0000 2019
>Closed-Date:    Sat Sep 28 13:01:25 +0000 2019
>Last-Modified:  Sat Sep 28 13:01:25 +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;

>Release-Note:

>Audit-Trail:
From: "Manuel Bouyer" <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/54493 CVS commit: src/sys/dev/acpi
Date: Sat, 28 Sep 2019 11:24:10 +0000

 Module Name:	src
 Committed By:	bouyer
 Date:		Sat Sep 28 11:24:10 UTC 2019

 Modified Files:
 	src/sys/dev/acpi: acpi_i2c.c

 Log Message:
 joshua stein, PR kern/54493: acpi_i2c uses incorrect arguments for _DSM call

 The last argument to the _DSM call has to be ACPI_TYPE_PACKAGE, as defined in in
 clude/acpredef.h for _DSM.

 Avoids an ACPI warning at boot.


 To generate a diff of this commit:
 cvs rdiff -u -r1.4 -r1.5 src/sys/dev/acpi/acpi_i2c.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: kern-bug-people->bouyer
Responsible-Changed-By: bouyer@NetBSD.org
Responsible-Changed-When: Sat, 28 Sep 2019 11:27:26 +0000
Responsible-Changed-Why:
.


State-Changed-From-To: open->pending-pullups
State-Changed-By: bouyer@NetBSD.org
State-Changed-When: Sat, 28 Sep 2019 11:27:26 +0000
State-Changed-Why:
patch commited to HEAD, pending pullup-9 #265


From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/54493 CVS commit: [netbsd-9] src/sys/dev/acpi
Date: Sat, 28 Sep 2019 12:39:23 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sat Sep 28 12:39:23 UTC 2019

 Modified Files:
 	src/sys/dev/acpi [netbsd-9]: acpi_i2c.c

 Log Message:
 Pull up following revision(s) (requested by bouyer in ticket #265):

 	sys/dev/acpi/acpi_i2c.c: revision 1.5

 joshua stein, PR kern/54493: acpi_i2c uses incorrect arguments for _DSM call

 The last argument to the _DSM call has to be ACPI_TYPE_PACKAGE, as defined in in
 clude/acpredef.h for _DSM.

 Avoids an ACPI warning at boot.


 To generate a diff of this commit:
 cvs rdiff -u -r1.4 -r1.4.8.1 src/sys/dev/acpi/acpi_i2c.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: pending-pullups->closed
State-Changed-By: bouyer@NetBSD.org
State-Changed-When: Sat, 28 Sep 2019 13:01:25 +0000
State-Changed-Why:
pullup done


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.