Skip to content

Commit

Permalink
ACPI / hotplug / PCI: Register all devices under the given bridge
Browse files Browse the repository at this point in the history
Rework register_slot() to create a struct acpiphp_func object for
every function it is called for and to create acpiphp slots for all
of them.  Although acpiphp_register_hotplug_slot() is only called for
the slots whose functions are identified as "ejectable", so that user
space can manipulate them, the ACPIPHP notify handler,
handle_hotplug_event(), is now installed for all of the registered
functions (that aren't dock stations) and hotplug events may be
handled for all of them.

As a result, essentially, all PCI bridges represented by objects in
the ACPI namespace are now going to be "hotplug" bridges and that may
affect resources allocation in general, although it shouldn't lead to
problems.

This allows the code to be simplified substantially and addresses
the problem where bus check or device check notifications for some
PCI bridges or devices are not handled, because those devices are
not recognized as "ejectable" or there appear to be no "ejectable"
devices under those bridges.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
  • Loading branch information
Rafael J. Wysocki committed Jul 23, 2013
1 parent ac37233 commit bbd34fc
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 157 deletions.
1 change: 0 additions & 1 deletion drivers/pci/hotplug/acpiphp.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ struct acpiphp_context {
struct acpiphp_func *func;
struct acpiphp_bridge *bridge;
unsigned int refcount;
bool handler_for_func;
};

/*
Expand Down
Loading

0 comments on commit bbd34fc

Please sign in to comment.