]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/base/core.c
driver core: Add BUS_NOTIFY_REMOVED_DEVICE event
authorJoerg Roedel <jroedel@suse.de>
Tue, 30 Sep 2014 11:02:02 +0000 (13:02 +0200)
committerJoerg Roedel <jroedel@suse.de>
Thu, 2 Oct 2014 09:14:34 +0000 (11:14 +0200)
commit599bad38cf7163123af7c9efea0fcf228bc74fe1
tree876f2845a2c02b0d1f23eb6ca02aad986807132e
parenteecbad7d0306b9ee4f621517052913d1adaea753
driver core: Add BUS_NOTIFY_REMOVED_DEVICE event

This event closes an important gap in the bus notifiers.
There is already the BUS_NOTIFY_DEL_DEVICE event, but that
is sent when the device is still bound to its device driver.

This is too early for the IOMMU code to destroy any mappings
for the device, as they might still be in use by the driver.

The new BUS_NOTIFY_REMOVED_DEVICE event introduced with this
patch closes this gap as it is sent when the device is
already unbound from its device driver and almost completly
removed from the driver core.

With this event the IOMMU code can safely destroy any
mappings and other data structures when a device is removed.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tested-by: Jerry Hoemann <jerry.hoemann@hp.com>
drivers/base/core.c
include/linux/device.h