diff mbox series

[11/13] thunderbolt: Log NVM version of routers and retimers

Message ID 20231003094005.2676823-12-mika.westerberg@linux.intel.com (mailing list archive)
State Accepted
Commit d80d926c5b6bcbcf7639b55caa38f3df7d978d0d
Headers show
Series thunderbolt: DisplayPort and logging improvements & cleanups | expand

Commit Message

Mika Westerberg Oct. 3, 2023, 9:40 a.m. UTC
From: Gil Fine <gil.fine@linux.intel.com>

This is useful when debugging possible issues.

Signed-off-by: Gil Fine <gil.fine@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
 drivers/thunderbolt/retimer.c | 1 +
 drivers/thunderbolt/switch.c  | 1 +
 2 files changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/thunderbolt/retimer.c b/drivers/thunderbolt/retimer.c
index 47becb363ada..d49d6628dbf2 100644
--- a/drivers/thunderbolt/retimer.c
+++ b/drivers/thunderbolt/retimer.c
@@ -94,6 +94,7 @@  static int tb_retimer_nvm_add(struct tb_retimer *rt)
 		goto err_nvm;
 
 	rt->nvm = nvm;
+	dev_dbg(&rt->dev, "NVM version %x.%x\n", nvm->major, nvm->minor);
 	return 0;
 
 err_nvm:
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
index 7d3c7e73a020..c80421eff558 100644
--- a/drivers/thunderbolt/switch.c
+++ b/drivers/thunderbolt/switch.c
@@ -372,6 +372,7 @@  static int tb_switch_nvm_add(struct tb_switch *sw)
 		ret = tb_nvm_add_active(nvm, nvm_read);
 		if (ret)
 			goto err_nvm;
+		tb_sw_dbg(sw, "NVM version %x.%x\n", nvm->major, nvm->minor);
 	}
 
 	if (!sw->no_nvm_upgrade) {