]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: pciehp: Publish to user space last on probe
authorLukas Wunner <lukas@wunner.de>
Thu, 19 Jul 2018 22:27:43 +0000 (17:27 -0500)
committerBjorn Helgaas <helgaas@kernel.org>
Mon, 23 Jul 2018 22:04:14 +0000 (17:04 -0500)
commitad9a2c34028e4f7215225b785d9f3d6c5713c61d
treeccc8d8e53605b76fb8316da188787ebe08414e46
parenta3dedd0d10b64f660a808b2ac6c333fa8acb4e4f
PCI: pciehp: Publish to user space last on probe

The PCI hotplug core has just been refactored to separate slot
initialization for in-kernel use from publication to user space.

Take advantage of it in pciehp by publishing to user space last on
probe.  This will allow enable/disablement of the slot exclusively from
the IRQ thread because the IRQ is requested after initialization for
in-kernel use (thereby getting its unique name needed by the IRQ thread)
but before user space is able to submit enable/disable requests.

On teardown, the order is the same in reverse:  The user space interface
is removed prior to freeing the IRQ and destroying the slot.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/hotplug/pciehp_core.c