• Brian Russell's avatar
    uio: Request/free irq separate from dev lifecycle · a087146c
    Brian Russell authored
    Separate irq request/free from the device lifecycle.
    After device unregister the parent module can call pci_disable_msi.
    >From the PCI MSI how to:
    
    "Before calling this function, a device driver must always call free_irq()
    on any interrupt for which it previously called request_irq().
    Failure to do so results in a BUG_ON(), leaving the device with
    MSI enabled and thus leaking its vector."
    
    So we need to separately free the irq at unregister to allow the device
    to be kept around in the case of it still having open FDs.
    Signed-off-by: default avatarBrian Russell <brussell@brocade.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    a087146c
uio.c 19.6 KB