• B
    rtw88: don't hold all IRQs disabled for PS operations · 57fb39e2
    Brian Norris 提交于
    This driver generally only needs to ensure that
    (a) it doesn't try to process TX interrupts at the same time as
        power-save operations (and similar)
    (b) the device interrupt gets disabled while we're still handling the
        last set of interrupts
    
    For (a), all the operations (e.g., PS transitions, packet handling)
    happens in non-atomic contexts (e.g., threaded IRQ).
    
    For (b), we only need mutual exclusion for brief sections (i.e., while
    we're actually manipulating the interrupt mask/status).
    
    So, we can introduce a separate lock for handling (b), disabling IRQs
    while we do it. For (a), we can demote the locking to BH only, now that
    (b) (the only steps done in atomic context) and that has its own lock.
    
    This helps reduce the amount of time this driver spends with IRQs off.
    Notably, transitioning out of power-save modes can take >3 milliseconds,
    and this transition is done under the protection of 'irq_lock'.
    Signed-off-by: NBrian Norris <briannorris@chromium.org>
    Signed-off-by: NYan-Hsuan Chuang <yhchuang@realtek.com>
    Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
    Link: https://lore.kernel.org/r/20200312080852.16684-2-yhchuang@realtek.com
    57fb39e2
pci.h 6.1 KB