wifi: mt76: mt7915: firmware restart on devices with a second pcie link
BugLink: https://bugs.launchpad.net/bugs/2111953
[ Upstream commit 9b60e2ae511c959024ecf6578b3fbe85cd06d7cc ]
It seems that the firmware checks the register used for detecting matching
PCIe links in order to figure out if a secondary PCIe link is enabled.
Write the register again just before starting the firmware on hw reset,
in order to fix an issue that left the second band unusable after restart.
Fixes: 9093cfff72 ("mt76: mt7915: add support for using a secondary PCIe link for gen1")
Link: https://patch.msgid.link/20241230194202.95065-11-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Manuel Diewald <manuel.diewald@canonical.com>
Signed-off-by: Mehmet Basaran <mehmet.basaran@canonical.com>
This commit is contained in:
committed by
Mehmet Basaran
parent
33a31dc823
commit
4cc038e73f
@@ -1383,6 +1383,8 @@ mt7915_mac_restart(struct mt7915_dev *dev)
|
||||
if (dev_is_pci(mdev->dev)) {
|
||||
mt76_wr(dev, MT_PCIE_MAC_INT_ENABLE, 0xff);
|
||||
if (dev->hif2) {
|
||||
mt76_wr(dev, MT_PCIE_RECOG_ID,
|
||||
dev->hif2->index | MT_PCIE_RECOG_ID_SEM);
|
||||
if (is_mt7915(mdev))
|
||||
mt76_wr(dev, MT_PCIE1_MAC_INT_ENABLE, 0xff);
|
||||
else
|
||||
|
||||
@@ -191,6 +191,7 @@ struct mt7915_hif {
|
||||
struct device *dev;
|
||||
void __iomem *regs;
|
||||
int irq;
|
||||
u32 index;
|
||||
};
|
||||
|
||||
struct mt7915_phy {
|
||||
|
||||
@@ -42,6 +42,7 @@ static struct mt7915_hif *mt7915_pci_get_hif2(u32 idx)
|
||||
continue;
|
||||
|
||||
get_device(hif->dev);
|
||||
hif->index = idx;
|
||||
goto out;
|
||||
}
|
||||
hif = NULL;
|
||||
|
||||
Reference in New Issue
Block a user