diff options
author | Felix Fietkau <nbd@nbd.name> | 2020-04-09 14:37:50 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-05-12 19:52:31 +0200 |
commit | 9b90ab32f871eae0de982a6567fe32039a756af5 (patch) | |
tree | 03e779c920d3481663ce99869b0ec7a6e7ec8780 /drivers/net/wireless/mediatek/mt76/mmio.c | |
parent | 89829c9e65ab680f7e5a1658cb74bc6316ab036e (diff) | |
download | linux-stable-9b90ab32f871eae0de982a6567fe32039a756af5.tar.gz linux-stable-9b90ab32f871eae0de982a6567fe32039a756af5.tar.bz2 linux-stable-9b90ab32f871eae0de982a6567fe32039a756af5.zip |
mt76: mt7615: rework IRQ handling to prepare for MSI support
With MSI interrupts, IRQs must not be enabled from within the IRQ handler,
because that can lead to lost events.
Defer IRQ processing to a tasklet, which is also responsible for enabling
IRQs (to avoid race conditions against the handler)
Co-developed-by: Soul Huang <Soul.Huang@mediatek.com>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Soul Huang <soul.huang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mmio.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mmio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mmio.c b/drivers/net/wireless/mediatek/mt76/mmio.c index 7ead6620bb8b..26353b6bce97 100644 --- a/drivers/net/wireless/mediatek/mt76/mmio.c +++ b/drivers/net/wireless/mediatek/mt76/mmio.c @@ -73,7 +73,8 @@ void mt76_set_irq_mask(struct mt76_dev *dev, u32 addr, spin_lock_irqsave(&dev->mmio.irq_lock, flags); dev->mmio.irqmask &= ~clear; dev->mmio.irqmask |= set; - mt76_mmio_wr(dev, addr, dev->mmio.irqmask); + if (addr) + mt76_mmio_wr(dev, addr, dev->mmio.irqmask); spin_unlock_irqrestore(&dev->mmio.irq_lock, flags); } EXPORT_SYMBOL_GPL(mt76_set_irq_mask); |