Skip to content
  • Jan Kiszka's avatar
    CAPI: Rework controller state notifier · ef69bb2e
    Jan Kiszka authored
    
    
    Another step towards proper locking: Rework the callback provided to
    capidrv for controller state changes. This is so far attached to an
    application, which would require us to hold the corresponding lock
    across notification calls.
    
    But there is no direct relation between a controller up/down event and
    an application, so let's decouple them and provide a notifier call chain
    for those events instead. This notifier chain is first of all used
    internally. Here we request the highest priority to unsure that
    housekeeping work is done before any other notifications. The chain is
    exported via [un]register_capictr_notifier to our only user, capidrv, to
    replace the racy and unfixable capi20_set_callback.
    
    Signed-off-by: default avatarJan Kiszka <jan.kiszka@web.de>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    ef69bb2e