• Hans de Goede's avatar
    ACPI / scan: Initialize status to ACPI_STA_DEFAULT · 24165131
    Hans de Goede authored
    [ Upstream commit 5971b0c1594d6c34e257101ed5fdffec65205c50 ]
    
    Since commit 63347db0affa "ACPI / scan: Use acpi_bus_get_status() to
    initialize ACPI_TYPE_DEVICE devs" the status field of normal acpi_devices
    gets set to 0 by acpi_bus_type_and_status() and filled with its actual
    value later when acpi_add_single_object() calls acpi_bus_get_status().
    
    This means that any acpi_match_device_ids() calls in between will always
    fail with -ENOENT.
    
    We already have a workaround for this, which temporary forces status to
    ACPI_STA_DEFAULT in drivers/acpi/x86/utils.c: acpi_device_always_present()
    and the next commit in this series adds another acpi_match_device_ids()
    call between status being initialized as 0 and the acpi_bus_get_status()
    call.
    
    Rather then adding another workaround, this commit makes
    acpi_bus_type_and_status() initialize status to ACPI_STA_DEFAULT, this is
    safe to do as the only code looking at status between the initialization
    and the acpi_bus_get_status() call is those acpi_match_device_ids() calls.
    
    Note this does mean that we need to (re)set status to 0 in case the
    acpi_bus_get_status() call fails.
    Signed-off-by: 's avatarHans de Goede <hdegoede@redhat.com>
    Signed-off-by: 's avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    Signed-off-by: 's avatarSasha Levin <alexander.levin@microsoft.com>
    Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    24165131
Name
Last commit
Last update
..
acpica Loading commit data...
apei Loading commit data...
arm64 Loading commit data...
dptf Loading commit data...
nfit Loading commit data...
pmic Loading commit data...
x86 Loading commit data...
Kconfig Loading commit data...
Makefile Loading commit data...
ac.c Loading commit data...
acpi_amba.c Loading commit data...
acpi_apd.c Loading commit data...
acpi_cmos_rtc.c Loading commit data...
acpi_configfs.c Loading commit data...
acpi_dbg.c Loading commit data...
acpi_extlog.c Loading commit data...
acpi_ipmi.c Loading commit data...
acpi_lpat.c Loading commit data...
acpi_lpss.c Loading commit data...
acpi_memhotplug.c Loading commit data...
acpi_pad.c Loading commit data...
acpi_platform.c Loading commit data...
acpi_pnp.c Loading commit data...
acpi_processor.c Loading commit data...
acpi_video.c Loading commit data...
acpi_watchdog.c Loading commit data...
battery.c Loading commit data...
battery.h Loading commit data...
bgrt.c Loading commit data...
blacklist.c Loading commit data...
bus.c Loading commit data...
button.c Loading commit data...
cm_sbs.c Loading commit data...
container.c Loading commit data...
cppc_acpi.c Loading commit data...
custom_method.c Loading commit data...
debugfs.c Loading commit data...
device_pm.c Loading commit data...
device_sysfs.c Loading commit data...
dock.c Loading commit data...
ec.c Loading commit data...
ec_sys.c Loading commit data...
event.c Loading commit data...
evged.c Loading commit data...
fan.c Loading commit data...
glue.c Loading commit data...
hed.c Loading commit data...
internal.h Loading commit data...
ioapic.c Loading commit data...
irq.c Loading commit data...
numa.c Loading commit data...
nvs.c Loading commit data...
osi.c Loading commit data...
osl.c Loading commit data...
pci_irq.c Loading commit data...
pci_link.c Loading commit data...
pci_mcfg.c Loading commit data...
pci_root.c Loading commit data...
pci_slot.c Loading commit data...
power.c Loading commit data...
proc.c Loading commit data...
processor_core.c Loading commit data...
processor_driver.c Loading commit data...
processor_idle.c Loading commit data...
processor_pdc.c Loading commit data...
processor_perflib.c Loading commit data...
processor_thermal.c Loading commit data...
processor_throttling.c Loading commit data...
property.c Loading commit data...
reboot.c Loading commit data...
resource.c Loading commit data...
sbs.c Loading commit data...
sbshc.c Loading commit data...
sbshc.h Loading commit data...
scan.c Loading commit data...
sleep.c Loading commit data...
sleep.h Loading commit data...
spcr.c Loading commit data...
sysfs.c Loading commit data...
tables.c Loading commit data...
thermal.c Loading commit data...
utils.c Loading commit data...
video_detect.c Loading commit data...
wakeup.c Loading commit data...