cvs commit: src/sys/dev/acpica acpi_ec.c

John Baldwin jhb at FreeBSD.org
Mon Jul 21 14:28:57 PDT 2003


On 21-Jul-2003 Nate Lawson wrote:
> 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

The magic part seems evil.  I'm not sure yet of a better way to handle
that though.

-- 

John Baldwin <jhb at FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


More information about the cvs-src mailing list