• Toshi Kani's avatar
    ACPI: Update _OST handling for notify · 2cbb14fb
    Toshi Kani authored
    When the kernel calls _OSC with OSC_SB_HOTPLUG_OST_SUPPORT bit
    set at boot-time, the OS is responsible for calling _OST for
    ACPI hotplug events.  However, when hotplug.enabled attribute
    is unset for ACPI scan drivers, their notify handlers are removed
    and _OST is not called for ACPI hotplug events as a result.
    This patch keeps the notify handler of ACPI scan drivers,
    acpi_hotplug_notify_cb(), installed regardless of the state of
    hotplug.enabled.  The notify handler then checks if hotplug.enabled
    is set for the associated scan handler.  If unset, the notify
    handler calls _OST with a proper error code.  The patch also
    eliminates ACPI namespace walk when hotplug.enabled is changed
    via sysfs.
    Signed-off-by: default avatarToshi Kani <toshi.kani@hp.com>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
scan.c 52.6 KB