Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2342300imj; Mon, 11 Feb 2019 00:52:30 -0800 (PST) X-Google-Smtp-Source: AHgI3IaJGDqr8CvCEr+SQ60qOk2t/ovfNsP1cO2DsVaOnv0Y+TDczOMQBIsKsrKiD9cKVsJ6SZi7 X-Received: by 2002:a63:d84b:: with SMTP id k11mr28639924pgj.142.1549875150050; Mon, 11 Feb 2019 00:52:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549875150; cv=none; d=google.com; s=arc-20160816; b=YsejupWMgRxyg/wb2zwFK7BiX3oBvtpS5kJ1bZTWaY9xhptFBuHE6c5LyJJlJPZobs sdiyBeW/kR6HAICSP/+nC9UyLajRMPAQI7hFwuf93qzb//Aig6hiDDrOqoO1onsfqU7Y PqXG4DC81VxkDRHTv+8q57crxu02e2eWj8lWru3bM0qfQB9tAslI/gVWQ3IcDXoU14UT m0dS8vkAv1cmtklGqFcNUgs9VrLaR1Hh6Yetmd5t8ugloupRLXdRvxIkOzxYTKxFJ1Bc BYFbfo6vXVTH3Mr5860JY3fSKJ3Q8VcDuOKH6B9kJJbn6VatBpL1hJOShsxAZS42TiuA Folw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=jTxUxsjk6ETClSejQ5XLczvmGuzB1jsZSgfBUKf12fs=; b=yp2gRlQDiVwg6j22p33JXQ4ukvueAXk+JOEkEFnxKYwUr467yWW6HucJi1mnTjcS92 zTKd38ZEXFQbBKnBzKwYTLWf4gXCayc5jQ6EcVUIjrrE0nf4ua1GogOTNH1YoxXz4hMI mTj3Rz/BX/UZDTdK6Jf1BNJ9PVPNaKxwWEJ5fe4hIEDWF9zIl6Srx4K2YRYQvu/Uyy9n 2EHjVcuiVj849qPGLSD13TR2QK13JNwVpEEWMSFFC6czFNDXUzdLn2bVZwQm8WQEVfh6 vRL8irCVE9Mb8MvN44Bg3LqTvnzaEj1hfPt7B/0oGCDMxOBg4RbDMfaRDHb77pubQa9V FKdg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 59si2502581plf.72.2019.02.11.00.52.14; Mon, 11 Feb 2019 00:52:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727059AbfBKIwH (ORCPT + 99 others); Mon, 11 Feb 2019 03:52:07 -0500 Received: from mga05.intel.com ([192.55.52.43]:15669 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726358AbfBKIwH (ORCPT ); Mon, 11 Feb 2019 03:52:07 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Feb 2019 00:52:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,358,1544515200"; d="scan'208";a="132633095" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.157]) by FMSMGA003.fm.intel.com with SMTP; 11 Feb 2019 00:52:04 -0800 Received: by lahna (sSMTP sendmail emulation); Mon, 11 Feb 2019 10:52:03 +0200 Date: Mon, 11 Feb 2019 10:52:03 +0200 From: Mika Westerberg To: Lukas Wunner Cc: linux-kernel@vger.kernel.org, Michael Jamet , Yehezkel Bernat , Andreas Noever , Andy Shevchenko Subject: Re: [PATCH v2 15/28] thunderbolt: Deactivate all paths before restarting them Message-ID: <20190211085203.GV7875@lahna.fi.intel.com> References: <20190206131738.43696-1-mika.westerberg@linux.intel.com> <20190206131738.43696-16-mika.westerberg@linux.intel.com> <20190211063555.2bozvqen2jmskox4@wunner.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190211063555.2bozvqen2jmskox4@wunner.de> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 11, 2019 at 07:35:55AM +0100, Lukas Wunner wrote: > 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. IIRC the reason was that when you suspend, then reconfigure parts of the topology and resume, establishing the tunnel again went wrong. I'll update the changelog with a better 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. That's what we do in the patch following, no? We discover the EFI created paths and use that information to re-establish tunnels upon S3 resume and also when they are torn down. > > @@ -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, I'll fix it up.