linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] thunderbolt: Correct trace output of firmware connection manager packets
@ 2024-04-26  5:42 Mika Westerberg
  2024-04-29  4:48 ` Mika Westerberg
  0 siblings, 1 reply; 2+ messages in thread
From: Mika Westerberg @ 2024-04-26  5:42 UTC (permalink / raw)
  To: linux-usb
  Cc: Yehezkel Bernat, Michael Jamet, Lukas Wunner, Andreas Noever,
	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.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
 drivers/thunderbolt/trace.h | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/thunderbolt/trace.h b/drivers/thunderbolt/trace.h
index 4dccfcf7af6a..6d0776514d12 100644
--- a/drivers/thunderbolt/trace.h
+++ b/drivers/thunderbolt/trace.h
@@ -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;
 	}
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] thunderbolt: Correct trace output of firmware connection manager packets
  2024-04-26  5:42 [PATCH] thunderbolt: Correct trace output of firmware connection manager packets Mika Westerberg
@ 2024-04-29  4:48 ` Mika Westerberg
  0 siblings, 0 replies; 2+ messages in thread
From: Mika Westerberg @ 2024-04-29  4:48 UTC (permalink / raw)
  To: linux-usb; +Cc: Yehezkel Bernat, Michael Jamet, Lukas Wunner, Andreas Noever

On Fri, Apr 26, 2024 at 08:42:59AM +0300, Mika Westerberg wrote:
> 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 <mika.westerberg@linux.intel.com>

Applied to thunderbolt.git/next.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-29  4:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-26  5:42 [PATCH] thunderbolt: Correct trace output of firmware connection manager packets Mika Westerberg
2024-04-29  4:48 ` Mika Westerberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).