Skip to contentSkip to conversation

thunderbolt: Correct trace output of firmware connection manager packets

PATCH Applied Mika Westerberg 1 participant 2 messages Apr 26, 2024 – Apr 29, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 thunderbolt: Correct trace output of firmware connection manager packets

These are special packets that the drivers sends directly to the firmware connection manager (ICM). These do not have route string because they are always consumed by the firmware connection manager running on the host router, so hard-code that in the output accordingly.

---
 drivers/thunderbolt/trace.h | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
drivers/thunderbolt/trace.h +11 -2
index 4dccfcf7af6a..6d0776514d12 100644
@@ -87,23 +87,32 @@ static inline const char *show_data(struct trace_seq *p, u8 type,
 	const char *prefix = "";
 	int i;
 
-	show_route(p, data);
-
 	switch (type) {
 	case TB_CFG_PKG_READ:
 	case TB_CFG_PKG_WRITE:
+		show_route(p, data);
 		show_data_read_write(p, data);
 		break;
 
 	case TB_CFG_PKG_ERROR:
+		show_route(p, data);
 		show_data_error(p, data);
 		break;
 
 	case TB_CFG_PKG_EVENT:
+		show_route(p, data);
 		show_data_event(p, data);
 		break;
 
+	case TB_CFG_PKG_ICM_EVENT:
+	case TB_CFG_PKG_ICM_CMD:
+	case TB_CFG_PKG_ICM_RESP:
+		/* ICM messages always target the host router */
+		trace_seq_puts(p, "route=0, ");
+		break;
+
 	default:
+		show_route(p, data);
 		break;
 	}
 
Signature · 1 line
2.43.0
author Applied
#1 lore raw
Quoted 6 lines · Mika Westerberg

These are special packets that the drivers sends directly to the firmware connection manager (ICM). These do not have route string because they are always consumed by the firmware connection manager running on the host router, so hard-code that in the output accordingly.

Applied to thunderbolt.git/next.