From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09E9DC433F5 for ; Fri, 3 Dec 2021 11:40:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380515AbhLCLnb (ORCPT ); Fri, 3 Dec 2021 06:43:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234517AbhLCLnb (ORCPT ); Fri, 3 Dec 2021 06:43:31 -0500 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FE31C06173E for ; Fri, 3 Dec 2021 03:40:06 -0800 (PST) Received: by mail-pf1-x430.google.com with SMTP id n85so2625733pfd.10 for ; Fri, 03 Dec 2021 03:40:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=37YYy+0hUPywYTskHeJHFsyxrQqCgMYdoIaQSnv4VuI=; b=XOF5M8YBb3eOOT2L22Wkknu2sO9KgprTbeKUJAsbmBb7+9DYP65JVcxbUXeQdrq8rk 5y5HhPz/xLEkcT0eX2/i2If5JioPQaKGDOLEmpc7ZMnZ475jwkaYTayegbv5P7rKSFZ9 sgeQ//4qmzpeln40SLBN4gjuJdMIgK7nEq+KSvQAyLU35G5LYZw1D5LVYeM2sbviMmK8 qitgIGsBmKD39hn5Nnvqy+cSLsJeu5toCeRddLoLf3Mbsjs2q3N4LYAmgv3weVyRzjKI ZoCBYO6SFYJkVzr+CHKoZsNIZxQVT7w04EcvE2RVfe6Bkrv6kFkMWGKO4r0Iwn+FSsHs sKJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=37YYy+0hUPywYTskHeJHFsyxrQqCgMYdoIaQSnv4VuI=; b=Wg6iy8AmuGmZBrCM/CuwhYU3cEj5W60zZVhQevmmeRVLQICGvw9A6KC7auSHtxKH6X OdiVqroiEVhfxdzmKVgqZkSRsrpJVjMnLz80sPUSWgs3MZPGwNbwEqdnvOSseRL/Qmxb 0kUTxHutVmAU4objPilE/KzwtXN/D5dt+4EgHW9yvy/+uGJvy3nhDsbar9CdEwPz1R0J 5l5EcX+9wFYYlc0qg1FINEC6V8trNB7LK+iYIdimEhcNi9tLEEjcNp8mzIjiOR8yyspl aMXgcGI0Q8FkJTkh7rHp5B56qnaTEhXFYOing9HcNMajUgswTr0EqoeNzuz9kUyOTY8/ w+Vw== X-Gm-Message-State: AOAM531N8zhQRNOMpXWsbA9omXdpKummFV5i+V7s4eEraBwlLVA/BuIf ct5HtmYtN4mIoWDtEyQRoEnD6j0vcdfOzNrXSrA= X-Google-Smtp-Source: ABdhPJyiXNsLmfb68+6cuIeY3G7G9kw33cdRZIdZFdwSi0IUcQFW9H6xCO44QGckIh+dcMEDdDB0xyL6oL49DxivC4U= X-Received: by 2002:a63:8948:: with SMTP id v69mr4166253pgd.250.1638531605935; Fri, 03 Dec 2021 03:40:05 -0800 (PST) MIME-Version: 1.0 References: <20211125073733.74902-1-mika.westerberg@linux.intel.com> <20211125073733.74902-3-mika.westerberg@linux.intel.com> <20211126200150.GA21796@wunner.de> In-Reply-To: From: Yehezkel Bernat Date: Fri, 3 Dec 2021 13:39:49 +0200 Message-ID: Subject: Re: [PATCH 2/6] thunderbolt: Tear down existing tunnels when resuming from hibernate To: Mika Westerberg Cc: Lukas Wunner , USB list , Michael Jamet , Gil Fine , "Rafael J. Wysocki" , Andreas Noever Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Wed, Dec 1, 2021 at 8:47 AM Mika Westerberg wrote: > > Hi, > > > > > > reason we re-use the tunnel discovery functionality and find out all the > > > > > existing tunnels, and tear them down. Once that is done we can restore > > > > > our tunnels. > > > > > > > > Hm, what if the system is running from a Thunderbolt-attached drive? > > > > Will the mount points survive tearing down and re-establishing the > > > > tunnels to that drive? > > > > > > Yes, they should. PCI is waiting for the TBT to resume so it should not > > > notice this, and all the data is at point still synced out to the disks. > > > > But the user will notice the screen flashing, probably? > > They will notice flashing anyway because we jump from one kernel to > another (as this is suspend-to-disk which involves shutting down the > machine and booting to "fresh" resume kernel first). We actually tear > down all the DP tunnels before we even enter suspend-to-disk (see > 81a2e3e49f1f ("thunderbolt: Tear down DP tunnels when suspending")). > Ah, thanks. > > Is this because the FW might not support the same set of functionality? > > Yes, that too. OK > > Maybe we can continue using the already established tunnels after > > discovering them? > > Yes we could but that would require us to map the existing tunnels with > the ones we had prior, and also indentify any new tunnels or missing > ones. This makes it more complex, and the approach here seem to work > according to my testing :) I can look for that solution too if you think > it is necessary. Following the previous points, I don't see any value in trying the more complex solution. Thanks!