summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2019-05-14 02:34:34 +0300
committerBjorn Helgaas <bhelgaas@google.com>2019-05-14 02:34:34 +0300
commitdb9d639fa127d9fb37a49df44c65cc42c88a213e (patch)
treea6157f357351c536653aa4afdfaf45e2eb03474f /drivers/pci
parent292c9396541399b83a4f6d9141b919cb29275c28 (diff)
parent6056bed93b4f93707b0564aa418b9c06b613ff04 (diff)
downloadlinux-db9d639fa127d9fb37a49df44c65cc42c88a213e.tar.xz
Merge branch 'pci/portdrv'
- Disable Link Management interrupt during suspend to prevent immediate wakeup (Mika Westerberg) * pci/portdrv: PCI/LINK: Disable bandwidth notification interrupt during suspend
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pcie/bw_notification.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/pci/pcie/bw_notification.c b/drivers/pci/pcie/bw_notification.c
index d2eae3b7cc0f..971eb7e90fb0 100644
--- a/drivers/pci/pcie/bw_notification.c
+++ b/drivers/pci/pcie/bw_notification.c
@@ -96,11 +96,25 @@ static void pcie_bandwidth_notification_remove(struct pcie_device *srv)
free_irq(srv->irq, srv);
}
+static int pcie_bandwidth_notification_suspend(struct pcie_device *srv)
+{
+ pcie_disable_link_bandwidth_notification(srv->port);
+ return 0;
+}
+
+static int pcie_bandwidth_notification_resume(struct pcie_device *srv)
+{
+ pcie_enable_link_bandwidth_notification(srv->port);
+ return 0;
+}
+
static struct pcie_port_service_driver pcie_bandwidth_notification_driver = {
.name = "pcie_bw_notification",
.port_type = PCIE_ANY_PORT,
.service = PCIE_PORT_SERVICE_BWNOTIF,
.probe = pcie_bandwidth_notification_probe,
+ .suspend = pcie_bandwidth_notification_suspend,
+ .resume = pcie_bandwidth_notification_resume,
.remove = pcie_bandwidth_notification_remove,
};