mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-06 14:48:06 +00:00
thunderbolt: Deactivate all paths before restarting them
State of the connected devices and tunnel configuration is not known during resume. For example some paths may not be complete anymore if the user has unplugged the related devices. So instead of marking all paths as inactive we go ahead and deactivate them explicitly before we restart them. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
This commit is contained in:
parent
8c7acaaf02
commit
aae9e27f3b
1 changed files with 11 additions and 1 deletions
|
@ -185,8 +185,18 @@ int tb_tunnel_restart(struct tb_tunnel *tunnel)
|
|||
|
||||
tb_tunnel_info(tunnel, "activating\n");
|
||||
|
||||
/*
|
||||
* Make sure all paths are properly disabled before enabling
|
||||
* them again.
|
||||
*/
|
||||
for (i = 0; i < tunnel->npaths; i++) {
|
||||
if (tunnel->paths[i]->activated) {
|
||||
tb_path_deactivate(tunnel->paths[i]);
|
||||
tunnel->paths[i]->activated = false;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < tunnel->npaths; i++) {
|
||||
tunnel->paths[i]->activated = false;
|
||||
res = tb_path_activate(tunnel->paths[i]);
|
||||
if (res)
|
||||
goto err;
|
||||
|
|
Loading…
Add table
Reference in a new issue