[PATCH] thunderbolt: Always generate the host router UUID

From: Mario Limonciello

Date: Thu Dec 03 2026 - 12:18:35 EST


The software connection manager derives the UUID of the host router
from its UID (or the fused link controller UUID on older Thunderbolt
hardware) with the upper two words filled with ones to match what ICM
does. The USB4 spec however requires the Domain UUID used in
inter-domain communication to be generated according to ISO/IEC 9834-8,
and the host router UID is not guaranteed to be unique either.

If the IDs are not unique then when two of these hosts are connected
together each side sees its own UUID in the inter-domain UUID response,
treats the link as a loop and never bonds the lanes, which caps the
host-to-host link at a single lane.

Always generate a random UUID for the host router instead. Device
routers keep the UID-derived UUID so that their unique_id stays stable
across boots and matches what ICM reports.

Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxx>
---
drivers/thunderbolt/switch.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
index 8899fea713ac2..6cedaf5351bd9 100644
--- a/drivers/thunderbolt/switch.c
+++ b/drivers/thunderbolt/switch.c
@@ -2872,7 +2872,17 @@ static int tb_switch_set_uuid(struct tb_switch *sw)
if (sw->uuid)
return 0;

- if (tb_switch_is_usb4(sw)) {
+ if (!tb_route(sw)) {
+ /*
+ * USB4 spec requires the Domain UUID to be generated
+ * according to ISO/IEC 9834-8 so never derive it from the
+ * host router UID. The UID is not guaranteed to be unique
+ * either (it can be left unprogrammed) and if two hosts end
+ * up with the same UUID the inter-domain link is mistaken
+ * for a loop and lanes are never bonded.
+ */
+ generate_random_uuid((u8 *)uuid);
+ } else if (tb_switch_is_usb4(sw)) {
ret = usb4_switch_read_uid(sw, &sw->uid);
if (ret)
return ret;

---
base-commit: b8a56745a38d34f9db9723f7d0ef8ab10c0eabc5
change-id: 20261203-thunderbolt-fb97fb283a60

Best regards,
--
Mario Limonciello <mario.limonciello@xxxxxxx>