From owner-freebsd-current@FreeBSD.ORG Mon Jul 11 22:32:00 2005 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B14ED16A41C; Mon, 11 Jul 2005 22:32:00 +0000 (GMT) (envelope-from nate@root.org) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 264D843D4C; Mon, 11 Jul 2005 22:32:00 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.5.50] (adsl-64-171-184-89.dsl.snfc21.pacbell.net [64.171.184.89]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id j6BMVwo5028129 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 11 Jul 2005 15:31:59 -0700 Message-ID: <42D2F177.3070101@root.org> Date: Mon, 11 Jul 2005 15:23:51 -0700 From: Nate Lawson User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: John Baldwin References: <4.3.2.7.2.20050711121036.02caa348@mail.qconline.com> <4.3.2.7.2.20050711135352.01edd3f0@mail.qconline.com> <200507111626.25124.jhb@FreeBSD.org> In-Reply-To: <200507111626.25124.jhb@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org, Harry Coin Subject: Re: mss.c pcm fix to ' attach returned 6 ' load failure for v5.x acpi and up X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2005 22:32:00 -0000 John Baldwin wrote: > Also, can you upload your acpidump somewhere and provide a URL? I'm curious > if you have ACPI devices like thermal zones that don't have _HID's and only > have _CIDs. In fact, here's a patch to fix acpi_get_logicalid() in that > case. Give this a try first and let me know if it fixes it. I would rather you directly call acpi_isa_get_compatid() rather than duplicating its logic here. There's no guarantee that the first CID will match the single ID passed in. -Nate > Index: acpi.c > =================================================================== > RCS file: /usr/cvs/src/sys/dev/acpica/acpi.c,v > retrieving revision 1.214 > diff -u -r1.214 acpi.c > --- acpi.c 3 Jun 2005 20:12:12 -0000 1.214 > +++ acpi.c 11 Jul 2005 20:23:14 -0000 > @@ -1138,6 +1138,7 @@ > ACPI_HANDLE h; > ACPI_STATUS error; > u_int32_t pnpid; > + int i; > > ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); > > @@ -1153,8 +1154,24 @@ > goto out; > devinfo = (ACPI_DEVICE_INFO *)buf.Pointer; > > - if ((devinfo->Valid & ACPI_VALID_HID) != 0) > + if ((devinfo->Valid & ACPI_VALID_HID) != 0) { > pnpid = PNP_EISAID(devinfo->HardwareId.Value); > + goto out; > + } > + > + /* > + * If we don't have a HID but do have at least one CID, return the first > + * CID. This is so that ISA drivers that use isa_get_logicalid() to > + * determine if a device is a PnP device or not will work correctly. > + */ > + if ((devinfo->Valid & ACPI_VALID_CID) != 0) { > + for (i = 0; i < devinfo->CompatibilityId.Count; i++) { > + if (strncmp(devinfo->CompatibilityId.Id[i].Value, "PNP", 3) != 0) > + continue; > + pnpid = PNP_EISAID(devinfo->CompatibilityId.Id[i].Value); > + goto out; > + } > + } > > out: > if (buf.Pointer != NULL) > > -- Nate