• Joerg Roedel's avatar
    driver core: Add BUS_NOTIFY_REMOVED_DEVICE event · 599bad38
    Joerg Roedel authored
    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: default avatarJoerg Roedel <jroedel@suse.de>
    Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    Tested-by: default avatarJerry Hoemann <jerry.hoemann@hp.com>
    599bad38
core.c 54.2 KB