• Alex Elder's avatar
    net: ipa: clear pending interrupts before enabling · 94ad8f3a
    Alex Elder authored
    We enable the completion interrupt for channel or event ring
    commands only when we issue them.  The interrupt is disabled after
    the interrupt has fired, or after we have timed out waiting for it.
    
    If we time out, the command could complete after the interrupt has
    been disabled, causing a state change in the channel or event ring.
    The interrupt associated with that state change would be delivered
    the next time the completion interrupt is enabled.
    
    To avoid previous command completions interfering with new commands,
    clear all pending completion interrupts before re-enabling them for
    a new command.
    
    Fixes: b4175f87 ("net: ipa: only enable GSI event control IRQs when needed")
    Signed-off-by: default avatarAlex Elder <elder@linaro.org>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    94ad8f3a
gsi.c 63.7 KB