<yhchuang@xxxxxxxxxxx> wrote: > From: Brian Norris <briannorris@xxxxxxxxxxxx> > > 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: Brian Norris <briannorris@xxxxxxxxxxxx> > Signed-off-by: Yan-Hsuan Chuang <yhchuang@xxxxxxxxxxx> 5 patches applied to wireless-drivers-next.git, thanks. 57fb39e24775 rtw88: don't hold all IRQs disabled for PS operations da14a0409e3f rtw88: extract alloc rsvd_page and h2c skb routines 895c096dab36 rtw88: associate reserved pages with each vif a5697a65ecd1 rtw88: pci: define a mask for TX/RX BD indexes aaab5d0e6737 rtw88: kick off TX packets once for higher efficiency -- https://patchwork.kernel.org/patch/11433447/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches