Re: [PATCH v2 15/28] thunderbolt: Deactivate all paths before restarting them

From: Lukas Wunner
Date: Mon Feb 11 2019 - 01:36:00 EST


On Wed, Feb 06, 2019 at 04:17:25PM +0300, Mika Westerberg wrote:
> We can't be sure the paths are actually properly deactivated when a
> tunnel is restarted after resume.

Why can't we be sure? Please provide proper reasoning.


> So instead of marking all paths as
> inactive we go ahead and deactivate them explicitly.

This seems like a bad idea if the root partition is on a Thunderbolt-
attached drive, the system is waking from hibernate and the EFI NHI
driver has already established a tunnel to that drive. It would seem
more appropriate to discover tunnels already existing on resume from
system sleep and then attempt to establish any others that might be
missing.


> @@ -183,8 +183,15 @@ int tb_tunnel_restart(struct tb_tunnel *tunnel)
>
> tb_tunnel_info(tunnel, "activating\n");
>
> + /* Make sure all paths are properly disabled before enable them again */

This isn't proper English, s/enable/enabling/.

Thanks,

Lukas