summaryrefslogtreecommitdiffstats
path: root/drivers/thunderbolt/debugfs.c
diff options
context:
space:
mode:
authorGil Fine <gil.fine@linux.intel.com>2023-01-25 11:48:12 +0200
committerMika Westerberg <mika.westerberg@linux.intel.com>2023-06-16 09:53:28 +0300
commitee22d52aeef1ed417fc7fddc6a7ba047e78f7003 (patch)
tree44803cdf7cb9ea9ee123435c5176e67b517ed813 /drivers/thunderbolt/debugfs.c
parent6e19d48ea0d8aeee5688e5718cf2143d281864f3 (diff)
downloadlinux-ee22d52aeef1ed417fc7fddc6a7ba047e78f7003.tar.gz
linux-ee22d52aeef1ed417fc7fddc6a7ba047e78f7003.tar.bz2
linux-ee22d52aeef1ed417fc7fddc6a7ba047e78f7003.zip
thunderbolt: Add two additional double words for adapters TMU for USB4 v2 routers
For USB4 v2 routers, the adapters's TMU capability has two additional double words. Include them in the debugfs register dump. 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/debugfs.c')
-rw-r--r--drivers/thunderbolt/debugfs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/thunderbolt/debugfs.c b/drivers/thunderbolt/debugfs.c
index 40b59e662ee3..48aaba17d1db 100644
--- a/drivers/thunderbolt/debugfs.c
+++ b/drivers/thunderbolt/debugfs.c
@@ -19,7 +19,8 @@
#define PORT_CAP_LANE_LEN 3
#define PORT_CAP_USB3_LEN 5
#define PORT_CAP_DP_LEN 8
-#define PORT_CAP_TMU_LEN 8
+#define PORT_CAP_TMU_V1_LEN 8
+#define PORT_CAP_TMU_V2_LEN 10
#define PORT_CAP_BASIC_LEN 9
#define PORT_CAP_USB4_LEN 20
@@ -1161,7 +1162,10 @@ static void port_cap_show(struct tb_port *port, struct seq_file *s,
break;
case TB_PORT_CAP_TIME1:
- length = PORT_CAP_TMU_LEN;
+ if (usb4_switch_version(port->sw) < 2)
+ length = PORT_CAP_TMU_V1_LEN;
+ else
+ length = PORT_CAP_TMU_V2_LEN;
break;
case TB_PORT_CAP_POWER: