Commit b658eb9d authored by Mika Westerberg's avatar Mika Westerberg

thunderbolt: Keep the parent runtime resumed for a while on device disconnect

When doing device firmware upgrade the device will disconnect for a
while and then reconnect back. Keep the parent device (and the whole
domain) powered for a while so we don't need to runtime resume
immediately when the device is connected back after the device upgrade
completes.
Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
parent a3595258
......@@ -870,7 +870,13 @@ icm_fr_device_disconnected(struct tb *tb, const struct icm_pkg_header *hdr)
return;
}
pm_runtime_get_sync(sw->dev.parent);
remove_switch(sw);
pm_runtime_mark_last_busy(sw->dev.parent);
pm_runtime_put_autosuspend(sw->dev.parent);
tb_switch_put(sw);
}
......@@ -1280,8 +1286,13 @@ icm_tr_device_disconnected(struct tb *tb, const struct icm_pkg_header *hdr)
tb_warn(tb, "no switch exists at %llx, ignoring\n", route);
return;
}
pm_runtime_get_sync(sw->dev.parent);
remove_switch(sw);
pm_runtime_mark_last_busy(sw->dev.parent);
pm_runtime_put_autosuspend(sw->dev.parent);
tb_switch_put(sw);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment