提交 bf3747ae 编写于 作者: S Sean Wang 提交者: Felix Fietkau

mt76: mt7921: enable aspm by default

mt7921 is mainly used in NB, CE and IoT application where battery life is
much concerned so the patch enabled PCIe ASPM by default to shut off the
clocks related PCIe as much as possible when MT7921 is either in suspend
state or in runtime pm to lower power consumption.

We still leave disable aspm as an option with module_param for users to
disable ASPM if necessary.
Signed-off-by: NSean Wang <sean.wang@mediatek.com>
Signed-off-by: NFelix Fietkau <nbd@nbd.name>
上级 d741abea
...@@ -17,6 +17,10 @@ static const struct pci_device_id mt7921_pci_device_table[] = { ...@@ -17,6 +17,10 @@ static const struct pci_device_id mt7921_pci_device_table[] = {
{ }, { },
}; };
static bool mt7921_disable_aspm;
module_param_named(disable_aspm, mt7921_disable_aspm, bool, 0644);
MODULE_PARM_DESC(disable_aspm, "disable PCI ASPM support");
static void static void
mt7921_rx_poll_complete(struct mt76_dev *mdev, enum mt76_rxq_id q) mt7921_rx_poll_complete(struct mt76_dev *mdev, enum mt76_rxq_id q)
{ {
...@@ -132,7 +136,8 @@ static int mt7921_pci_probe(struct pci_dev *pdev, ...@@ -132,7 +136,8 @@ static int mt7921_pci_probe(struct pci_dev *pdev,
if (ret) if (ret)
goto err_free_pci_vec; goto err_free_pci_vec;
mt76_pci_disable_aspm(pdev); if (mt7921_disable_aspm)
mt76_pci_disable_aspm(pdev);
mdev = mt76_alloc_device(&pdev->dev, sizeof(*dev), &mt7921_ops, mdev = mt76_alloc_device(&pdev->dev, sizeof(*dev), &mt7921_ops,
&drv_ops); &drv_ops);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册