facetimehd: Disable ASPM

Kernel commit: 5a8361f7ecceaed64b4064000d16cb703462be49
ACPICA: Integrate package handling with module-level code

The above commit fixed a problem with ACPI that previously prevented
ASPM to be enabled. Unfortunately our driver broke because the link to
the device went down while streaming. Fix this for now by disabling ASPM
for the device entirely.

Note: There is an ACPI method we're calling to "power on/off" the device
so the real solution here might be to get it working correctly. I will
need to investigate that further so no ASPM will have to do for now.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
This commit is contained in:
Patrik Jakobsson
2019-03-17 22:54:13 +01:00
parent a22f248eba
commit af589aba0a

View File

@@ -22,6 +22,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/pci-aspm.h>
#include <linux/io.h>
#include <linux/interrupt.h>
#include <linux/workqueue.h>
@@ -375,6 +376,10 @@ static int fthd_pci_init(struct fthd_private *dev_priv)
return ret;
}
/* ASPM must be disabled on the device or it hangs while streaming */
pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1 |
PCIE_LINK_STATE_CLKPM);
ret = fthd_pci_reserve_mem(dev_priv);
if (ret)
goto fail_enable;