lkml.org 
[lkml]   [2013]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.12 111/212] ACPI / hotplug: Fix conflicted PCI bridge notify handlers
    Date
    3.12-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Toshi Kani <toshi.kani@hp.com>

    commit ca499fc87ed945094d952da0eb7eea7dbeb1feec upstream.

    The PCI host bridge scan handler installs its own notify handler,
    handle_hotplug_event_root(), by itself. Nevertheless, the ACPI
    hotplug framework also installs the common notify handler,
    acpi_hotplug_notify_cb(), for PCI root bridges. This causes
    acpi_hotplug_notify_cb() to call _OST method with unsupported
    error as hotplug.enabled is not set.

    To address this issue, introduce hotplug.ignore flag, which
    indicates that the scan handler installs its own notify handler by
    itself. The ACPI hotplug framework does not install the common
    notify handler when this flag is set.

    Signed-off-by: Toshi Kani <toshi.kani@hp.com>
    [rjw: Changed the name of the new flag]
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/acpi/pci_root.c | 3 +++
    drivers/acpi/scan.c | 2 +-
    include/acpi/acpi_bus.h | 1 +
    3 files changed, 5 insertions(+), 1 deletion(-)

    --- a/drivers/acpi/pci_root.c
    +++ b/drivers/acpi/pci_root.c
    @@ -63,6 +63,9 @@ static struct acpi_scan_handler pci_root
    .ids = root_device_ids,
    .attach = acpi_pci_root_add,
    .detach = acpi_pci_root_remove,
    + .hotplug = {
    + .ignore = true,
    + },
    };

    static DEFINE_MUTEX(osc_lock);
    --- a/drivers/acpi/scan.c
    +++ b/drivers/acpi/scan.c
    @@ -1812,7 +1812,7 @@ static void acpi_scan_init_hotplug(acpi_
    */
    list_for_each_entry(hwid, &pnp.ids, list) {
    handler = acpi_scan_match_handler(hwid->id, NULL);
    - if (handler) {
    + if (handler && !handler->hotplug.ignore) {
    acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY,
    acpi_hotplug_notify_cb, handler);
    break;
    --- a/include/acpi/acpi_bus.h
    +++ b/include/acpi/acpi_bus.h
    @@ -100,6 +100,7 @@ enum acpi_hotplug_mode {
    struct acpi_hotplug_profile {
    struct kobject kobj;
    bool enabled:1;
    + bool ignore:1;
    enum acpi_hotplug_mode mode;
    };




    \
     
     \ /
      Last update: 2013-12-02 21:21    [W:3.444 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site