mt76: mt76x2e: disable pcie_aspm by default
authorLorenzo Bianconi <lorenzo@kernel.org>
Sun, 27 Oct 2019 19:53:08 +0000 (20:53 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 30 Oct 2019 14:59:46 +0000 (16:59 +0200)
commitf37f05503575c59020dacd36e999f4e8b3dbc115
tree2984b7e1df447180642c0d7254a976a3ebb37203
parentb43f4a169f220e459edf3ea8f8cd3ec4ae7fa82d
mt76: mt76x2e: disable pcie_aspm by default

On same device (e.g. U7612E-H1) PCIE_ASPM causes continuous mcu hangs and
instability. Since mt76x2 series does not manage PCIE PS states, first we
try to disable ASPM using pci_disable_link_state. If it fails, we will
disable PCIE PS configuring PCI registers.
This patch has been successfully tested on U7612E-H1 mini-pice card

Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/mediatek/mt76/Makefile
drivers/net/wireless/mediatek/mt76/mt76.h
drivers/net/wireless/mediatek/mt76/mt76x2/pci.c
drivers/net/wireless/mediatek/mt76/pci.c [new file with mode: 0644]