Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

thunderbolt: Add module parameter for CLx disabling

Add a module parameter that allows user to completely disable CLx
functionality in case problems are found.

Signed-off-by: Gil Fine <gil.fine@intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>

authored by

Gil Fine and committed by
Mika Westerberg
fa487b2a 43f977bc

+11
+11
drivers/thunderbolt/switch.c
··· 13 13 #include <linux/sched/signal.h> 14 14 #include <linux/sizes.h> 15 15 #include <linux/slab.h> 16 + #include <linux/module.h> 16 17 17 18 #include "tb.h" 18 19 ··· 26 25 uuid_t uuid; 27 26 u32 status; 28 27 }; 28 + 29 + static bool clx_enabled = true; 30 + module_param_named(clx, clx_enabled, bool, 0444); 31 + MODULE_PARM_DESC(clx, "allow low power states on the high-speed lanes (default: true)"); 29 32 30 33 /* 31 34 * Hold NVM authentication failure status per switch This information ··· 3483 3478 { 3484 3479 struct tb_switch *root_sw = sw->tb->root_switch; 3485 3480 3481 + if (!clx_enabled) 3482 + return 0; 3483 + 3486 3484 /* 3487 3485 * CLx is not enabled and validated on Intel USB4 platforms before 3488 3486 * Alder Lake. ··· 3547 3539 */ 3548 3540 int tb_switch_disable_clx(struct tb_switch *sw, enum tb_clx clx) 3549 3541 { 3542 + if (!clx_enabled) 3543 + return 0; 3544 + 3550 3545 switch (clx) { 3551 3546 case TB_CL0S: 3552 3547 return tb_switch_disable_cl0s(sw);