diff mbox series

[09/19] thunderbolt: Initialize TMU again on resume

Message ID 20200819115905.59834-10-mika.westerberg@linux.intel.com
State Accepted
Commit 8145c4350e1303108a86991d3792eb51e5fdf195
Headers show
Series thunderbolt: Power Management improvements | expand

Commit Message

Mika Westerberg Aug. 19, 2020, 11:58 a.m. UTC
The TMU will be reset after router exits sleep so in order to
re-configure it upon resume make sure the structure is initialized again
based on the current hardware state.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
 drivers/thunderbolt/switch.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
index fb30ea1dfc31..de186d6ed166 100644
--- a/drivers/thunderbolt/switch.c
+++ b/drivers/thunderbolt/switch.c
@@ -2534,6 +2534,10 @@  int tb_switch_resume(struct tb_switch *sw)
 	if (err)
 		return err;
 
+	err = tb_switch_tmu_init(sw);
+	if (err)
+		return err;
+
 	/* check for surviving downstream switches */
 	tb_switch_for_each_port(sw, port) {
 		if (!tb_port_has_remote(port) && !port->xdomain)