]> Git Repo - J-linux.git/commitdiff
thunderbolt: Correct trace output of firmware connection manager packets
authorMika Westerberg <[email protected]>
Fri, 26 Apr 2024 04:58:58 +0000 (07:58 +0300)
committerMika Westerberg <[email protected]>
Mon, 29 Apr 2024 04:47:54 +0000 (07:47 +0300)
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.

Signed-off-by: Mika Westerberg <[email protected]>
drivers/thunderbolt/trace.h

index 4dccfcf7af6a3f02965ee7b1dc5e2b49533ff83f..6d0776514d12e19342441b6b3bb17c99c1200170 100644 (file)
@@ -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;
        }
 
This page took 0.056234 seconds and 4 git commands to generate.