summaryrefslogtreecommitdiff
path: root/drivers/thunderbolt
diff options
context:
space:
mode:
authorGil Fine <gil.fine@linux.intel.com>2026-05-06 15:37:04 +0300
committerMika Westerberg <mika.westerberg@linux.intel.com>2026-05-20 11:54:34 +0200
commit0ab47718345dc58a6e2ff4c1c23a9026a2cf1310 (patch)
treeded71e425984e51ec19b4f2fad44220325fc6e6c /drivers/thunderbolt
parent95c4379e37a0abea72dfd389cfe2c54452523690 (diff)
thunderbolt: Fix lane bonding log when bonding not possible
Currently if lane bonding is not possible or not supported, we continue and read the updated number of Total Buffers from lane adapters unnecessarily and incorrectly log the bonding as successful. Fix this by bailing out early when bonding is not possible, avoiding the unnecessary read and the misleading log message. Signed-off-by: Gil Fine <gil.fine@linux.intel.com> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt')
-rw-r--r--drivers/thunderbolt/switch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
index ad0ec8f8ee28..f421997c298d 100644
--- a/drivers/thunderbolt/switch.c
+++ b/drivers/thunderbolt/switch.c
@@ -2977,14 +2977,14 @@ static int tb_switch_lane_bonding_enable(struct tb_switch *sw)
int ret;
if (!tb_switch_lane_bonding_possible(sw))
- return 0;
+ return -EOPNOTSUPP;
up = tb_upstream_port(sw);
down = tb_switch_downstream_port(sw);
if (!tb_port_width_supported(up, TB_LINK_WIDTH_DUAL) ||
!tb_port_width_supported(down, TB_LINK_WIDTH_DUAL))
- return 0;
+ return -EOPNOTSUPP;
/*
* Both lanes need to be in CL0. Here we assume lane 0 already be in