Skip to content

Commit

Permalink
mt76: mt7921: fix the base of PCIe interrupt
Browse files Browse the repository at this point in the history
Should use 0x10000 as the base to operate PCIe interrupt according
to the vendor reference driver.

Fixes: ffa1bf9 ("mt76: mt7921: introduce PM support")
Co-developed-by: YN Chen <YN.Chen@mediatek.com>
Signed-off-by: YN Chen <YN.Chen@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Tested-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
Sean Wang authored and Felix Fietkau committed Apr 11, 2021
1 parent 3ab0269 commit 23c1d2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/mediatek/mt76/mt7921/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ static int mt7921_pci_probe(struct pci_dev *pdev,

mt76_wr(dev, MT_WFDMA0_HOST_INT_ENA, 0);

mt7921_l1_wr(dev, MT_PCIE_MAC_INT_ENABLE, 0xff);
mt76_wr(dev, MT_PCIE_MAC_INT_ENABLE, 0xff);

ret = devm_request_irq(mdev->dev, pdev->irq, mt7921_irq_handler,
IRQF_SHARED, KBUILD_MODNAME, dev);
Expand Down Expand Up @@ -248,7 +248,7 @@ static int mt7921_pci_resume(struct pci_dev *pdev)
return err;

/* enable interrupt */
mt7921_l1_wr(dev, MT_PCIE_MAC_INT_ENABLE, 0xff);
mt76_wr(dev, MT_PCIE_MAC_INT_ENABLE, 0xff);
mt7921_irq_enable(dev, MT_INT_RX_DONE_ALL | MT_INT_TX_DONE_ALL |
MT_INT_MCU_CMD);

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/mediatek/mt76/mt7921/regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@
#define MT_HW_CHIPID 0x70010200
#define MT_HW_REV 0x70010204

#define MT_PCIE_MAC_BASE 0x74030000
#define MT_PCIE_MAC_BASE 0x10000
#define MT_PCIE_MAC(ofs) (MT_PCIE_MAC_BASE + (ofs))
#define MT_PCIE_MAC_INT_ENABLE MT_PCIE_MAC(0x188)

Expand Down

0 comments on commit 23c1d2d

Please sign in to comment.