Re: [PATCH v7 1/2] ACPI / bus: Introduce a list of ids for "always present" devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 21-04-17 12:40, Rafael J. Wysocki wrote:
On Friday, April 21, 2017 12:42:31 PM Hans de Goede wrote:
HI,


[cut]

And in that path, which I seem to have overlooked before, the
acpi_set_device_status() call is too early for invoking
acpi_device_always_present(adev), so the latter should be called
directly from acpi_add_single_object() like

       acpi_init_device_object(device, handle, type, sta);
       if (acpi_device_always_present(adev))
           acpi_set_device_status(adev, ACPI_STA_DEFAULT);

That is not necessary, the place(s) where we care about status being
fixed-up for always-present devices, so that they get scanned / their
platform device initiated, is in acpi_bus_attach() which
already calls acpi_bus_get_status() and thus gets the
acpi_device_always_present() check applied before checking.

For hotplugged devices there are acpi_scan_bus_check and
acpi_scan_device_check but those both also already call
acpi_bus_get_status() before checking adev->status.

OK

Which probably means that we don't need to initialize adev->status
in acpi_init_device_object() to anything meaningful, do we?

Right, I don't think that is necessary. But maybe it is necessary
for some special cases (e.g. power resources) ?

For power resources _STA is defined differently at all and we don't
even call acpi_add_single_object() for them. :-)

Are there any other special cases in which that may matter?

Not that I'm aware of, but I'm in no way an expert when it comes
to the ACPI subsystem.

Regards,

Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux