aboutsummaryrefslogtreecommitdiff
path: root/drivers/thunderbolt/clx.c
diff options
context:
space:
mode:
authorGravatar Mika Westerberg <mika.westerberg@linux.intel.com> 2023-03-24 13:04:39 +0200
committerGravatar Mika Westerberg <mika.westerberg@linux.intel.com> 2023-06-09 12:07:24 +0300
commit53ba2e16957b01eb7858e3ee5a3a8187a2892f15 (patch)
tree560427aa175bf95f9103d8314351818f7e271fdc /drivers/thunderbolt/clx.c
parentthunderbolt: Make tb_switch_clx_disable() return CL states that were enabled (diff)
downloadlinux-53ba2e16957b01eb7858e3ee5a3a8187a2892f15.tar.gz
linux-53ba2e16957b01eb7858e3ee5a3a8187a2892f15.tar.bz2
linux-53ba2e16957b01eb7858e3ee5a3a8187a2892f15.zip
thunderbolt: Disable CL states when a DMA tunnel is established
Tunnels between hosts should not have CL states enabled because otherwise they might enter a low power state without the other end noticing which causes packets to be lost. For this reason disable all CL states upon first DMA tunnel creation. Once the last DMA tunnel is torn down we try to re-enable them. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/clx.c')
-rw-r--r--drivers/thunderbolt/clx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thunderbolt/clx.c b/drivers/thunderbolt/clx.c
index 4f0cfbb24dd9..604cceb23659 100644
--- a/drivers/thunderbolt/clx.c
+++ b/drivers/thunderbolt/clx.c
@@ -317,7 +317,7 @@ int tb_switch_clx_enable(struct tb_switch *sw, unsigned int clx)
struct tb_port *up, *down;
int ret;
- if (!clx)
+ if (!clx || sw->clx == clx)
return 0;
if (!validate_mask(clx))