From owner-cvs-src@FreeBSD.ORG Mon Jul 21 13:38:14 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4D62F37B405 for ; Mon, 21 Jul 2003 13:38:14 -0700 (PDT) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 4937243FD7 for ; Mon, 21 Jul 2003 13:38:11 -0700 (PDT) (envelope-from nate@rootlabs.com) Received: (qmail 34751 invoked by uid 1000); 21 Jul 2003 20:38:12 -0000 Date: Mon, 21 Jul 2003 13:38:12 -0700 (PDT) From: Nate Lawson To: John Baldwin In-Reply-To: Message-ID: <20030721133301.P34741@root.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: RE: cvs commit: src/sys/dev/acpica acpi_ec.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 20:38:14 -0000 On Mon, 21 Jul 2003, John Baldwin wrote: > On 20-Jul-2003 Nate Lawson wrote: > > Modified files: > > sys/dev/acpica acpi_ec.c > > Log: > > Do not call acpi_MatchHid() for all probe cases since it accesses the > > namespace. To compensate for it only being used in the !ECDT case, use > > a more robust approach to indicate a device was probed via ECDT by setting > > the private ivar to be &acpi_ec_devclass. Without the acpi_MatchHid() call > > now, it might have been possible for a non-EC device to have had its magic > > match our previous flag. > > > > Pointed out by: takawata > > Assuming you are doing a device_add_child() to add the ec, you could add it > with the name "acpi_ec" and then only the ec driver would probe it. I do add it with that name but that doesn't prevent it from getting a duplicate probe when the namespace is evaluated (much later). The sequence with ECDT is: acpi_attach() acpi_ec_ecdt_probe() if ECDT present device_add_child("acpi_ec") device_probe_and_attach() acpi_ec_probe() if ECDT magic set in ivars done acpi_ec_attach() allocate resources ... namespace started ... walk all devices, _STA, _INI acpi_ec_probe() <===== same device as already probed above if lookup devclass finds duplicate for _UID ENXIO; don't attach again -Nate