From 9190f7d3b8e26179149a90b3d0138e6bc179afab Mon Sep 17 00:00:00 2001 From: Patrik Jakobsson Date: Sun, 17 Mar 2019 22:45:13 +0100 Subject: [PATCH] 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 --- fthd_drv.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fthd_drv.c b/fthd_drv.c index f8377f6..95afbac 100644 --- a/fthd_drv.c +++ b/fthd_drv.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -376,6 +377,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;