]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
UBUNTU: SAUCE: rtw88: don't hold all IRQs disabled for PS operations
authorBrian Norris <briannorris@chromium.org>
Mon, 13 Jan 2020 19:38:15 +0000 (11:38 -0800)
committerSeth Forshee <seth.forshee@canonical.com>
Fri, 20 Mar 2020 21:31:29 +0000 (16:31 -0500)
commita70b3e149d3ef53dad647b63a415aec8c9b3432d
tree7b3e7cabb53440dc7479a7e6a095131a83cec1b4
parentd290727d5b07bf345a23ee5afab78b1edffa2355
UBUNTU: SAUCE: rtw88: don't hold all IRQs disabled for PS operations

BugLink: https://bugs.launchpad.net/bugs/1780590
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'.

Change-Id: Ibb201afb9551e57587c09a19d393c129f8ec2143
Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/net/wireless/realtek/rtw88/pci.c
drivers/net/wireless/realtek/rtw88/pci.h