In message <[EMAIL PROTECTED]>, Marcel Moolenaar wrote: >On Thu, Jan 23, 2003 at 07:50:36AM -0600, Ben Hockenhull wrote: >> > >> >Use acpidump(8) and grep(1) for MOUE. The definition of _HID is >> >the PnP id that you need to add. It probably is 0x0190d94d in >> >your case. You can add the PnP id, or checkout -rHEAD, because >> >it's fixed already. >> >> Exactly what I needed to know. I discovered that it's actually 0x090cd041 >> for my Vaio R505EC. I've added that to pcm.c and recompiled and it's now >> found and works normally. > >Hmmm.... That PnP id is a generic id (has the PNP prefix). A Sony >specific PnP id is 0x####d94d... Your Id is one for an ACPI embedded >controller and I don't think it has to be a mouse. I suspect there's >a _CID value as well and that it's a generic PS/2 mouse id...
Quick Hack for _CID.(Compiler passes, but not tested yet actually.) Index: acpi.c =================================================================== RCS file: /home/ncvs/src/sys/dev/acpica/acpi.c,v retrieving revision 1.83 diff -u -r1.83 acpi.c --- acpi.c 28 Dec 2002 14:58:50 -0000 1.83 +++ acpi.c 23 Jan 2003 23:17:05 -0000 @@ -113,6 +113,7 @@ static struct resource *acpi_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags); static int acpi_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r); +static u_int32_t acpi_isa_get_compatid(device_t dev); static u_int32_t acpi_isa_get_logicalid(device_t dev); static int acpi_isa_pnp_probe(device_t bus, device_t child, struct isa_pnp_id *ids); @@ -590,10 +591,11 @@ /* ISA compatibility */ case ISA_IVAR_VENDORID: case ISA_IVAR_SERIAL: - case ISA_IVAR_COMPATID: *(int *)result = -1; break; - + case ISA_IVAR_COMPATID: + *(int *)result = acpi_isa_get_compatid(child); + break; case ISA_IVAR_LOGICALID: *(int *)result = acpi_isa_get_logicalid(child); break; @@ -697,7 +699,32 @@ | (PNP_HEXTONUM(s[3]) << 20) \ | (PNP_HEXTONUM(s[6]) << 24) \ | (PNP_HEXTONUM(s[5]) << 28)) +#define MAX_VALID_EISAID 9 +static u_int32_t +acpi_isa_get_compatid(device_t dev) +{ + ACPI_HANDLE h; + ACPI_OBJECT *obj; + ACPI_BUFFER resbuf; + char resbufbody[sizeof(ACPI_OBJECT) + MAX_VALID_EISAID +1]; + + /* + *resbuf size is allocated so that it can hold ACPI_OBJECT + *with EISAID string + */ + obj = (ACPI_OBJECT *)resbufbody; + resbuf.Length = sizeof(resbufbody); + resbuf.Pointer = resbufbody; + h = acpi_get_handle(dev); + if(ACPI_FAILURE(AcpiEvaluateObject(h, "_CID", NULL, &resbuf))) + return 0; + if(obj->Type == ACPI_TYPE_INTEGER) + return obj->Integer.Value; + else if(obj->Type == ACPI_TYPE_STRING) + return PNP_EISAID(obj->String.Pointer); + return 0; +} static u_int32_t acpi_isa_get_logicalid(device_t dev) { To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message