]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: mt76: mt7925: disable ASPM and runtime PM for MT7927
authorJavier Tia <floss@jetm.me>
Sat, 25 Apr 2026 19:49:59 +0000 (14:49 -0500)
committerFelix Fietkau <nbd@nbd.name>
Tue, 9 Jun 2026 10:15:21 +0000 (10:15 +0000)
Disable PCIe ASPM unconditionally for MT7927. The CONNINFRA power
domain and WFDMA register access are unreliable with PCIe L1 active,
causing throughput to drop from 1+ Gbps to ~200 Mbps.

Disable runtime PM and deep sleep for MT7927. The combo chip shares
a CONNINFRA power domain between WiFi (PCIe) and BT (USB).
SET_OWN/CLR_OWN transitions on the LPCTL register crash the BT
firmware, requiring a full power cycle to recover. PM enablement will
be addressed in a follow-up once safe power state transitions are
determined.

Reviewed-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Javier Tia <floss@jetm.me>
Link: https://patch.msgid.link/20260425195011.790265-10-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7925/init.c
drivers/net/wireless/mediatek/mt76/mt7925/pci.c

index c0c5cb9aff75a4707e14aa35f7c9f1bfc067ce48..a8c2ca7c0efc62e81dc58a4897d27dda49643843 100644 (file)
@@ -232,7 +232,8 @@ int mt7925_register_device(struct mt792x_dev *dev)
        dev->pm.idle_timeout = MT792x_PM_TIMEOUT;
        dev->pm.stats.last_wake_event = jiffies;
        dev->pm.stats.last_doze_event = jiffies;
-       if (!mt76_is_usb(&dev->mt76)) {
+       /* MT7927: runtime PM crashes BT firmware on the shared CONNINFRA domain */
+       if (!mt76_is_usb(&dev->mt76) && !is_mt7927(&dev->mt76)) {
                dev->pm.enable_user = true;
                dev->pm.enable = true;
                dev->pm.ds_enable_user = true;
index 7e0d0e247fa3e029cefad022b52a9f81971fdd35..3e2afa0dac7413a3bbb9dc995d6777b833b7fe07 100644 (file)
@@ -350,7 +350,10 @@ static int mt7925_pci_probe(struct pci_dev *pdev,
        if (ret)
                goto err_free_pci_vec;
 
-       if (mt7925_disable_aspm)
+       is_mt7927_hw = (pdev->device == 0x6639 || pdev->device == 0x7927);
+
+       /* MT7927: ASPM L1 causes unreliable WFDMA register access */
+       if (mt7925_disable_aspm || is_mt7927_hw)
                mt76_pci_disable_aspm(pdev);
 
        ops = mt792x_get_mac80211_ops(&pdev->dev, &mt7925_ops,
@@ -371,7 +374,6 @@ static int mt7925_pci_probe(struct pci_dev *pdev,
        dev = container_of(mdev, struct mt792x_dev, mt76);
        dev->fw_features = features;
        dev->hif_ops = &mt7925_pcie_ops;
-       is_mt7927_hw = (pdev->device == 0x6639 || pdev->device == 0x7927);
        dev->irq_map = is_mt7927_hw ? &mt7927_irq_map : &irq_map;
        mt76_mmio_init(&dev->mt76, pcim_iomap_table(pdev)[0]);
        tasklet_init(&mdev->irq_tasklet, mt792x_irq_tasklet, (unsigned long)dev);