From af589aba0afdc348f1e6283236fbf945363b5ce0 Mon Sep 17 00:00:00 2001 From: Patrik Jakobsson Date: Sun, 17 Mar 2019 22:54: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 fe91381..2b3f33d 100644 --- a/fthd_drv.c +++ b/fthd_drv.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -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;