Received: by 2002:a05:7412:a9a3:b0:f9:327e:43ab with SMTP id o35csp56466rdh; Mon, 18 Dec 2023 04:23:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IF9auhufAda+wjFsrP2BkcQNdde1O9TEktY5SdjVwcBTuoL5zJkguAE9iCKJ1iftFD07dwY X-Received: by 2002:a17:906:81d7:b0:a23:577f:41ba with SMTP id e23-20020a17090681d700b00a23577f41bamr1358174ejx.17.1702902208824; Mon, 18 Dec 2023 04:23:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702902208; cv=none; d=google.com; s=arc-20160816; b=et5aF7zdvvC4vf29IWvqpa1xi2FzhEx2LZYKk2dxxDOSkO2P28GbrxNzU6qZdORSEb BzQHdsXfp//79Qi07E6nRo8oH71PG3rXugo8PXG9a7X03MIHqtHYB3w+lBzLX9ItE9Op qf7OZfNTqn4kqamTkU9cmsnFViKk6w4/WcXm+el0E7I53lDZoIEOXkZJZb5/i6ViKy03 t1PuWd/vWD8NTyMHVTsfe28qIfLwBsrXjjrxDC92SeEZUMbshXZ9yx/UMR3OxD0v9TIh 0tuMj0E3ia+BzlWgGxiWtSs1m6S+hpi79d5QVdYfS5s3iR5Jymhy6X3G8ehw2irmLtfD 8yKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=sEyj4dLCbMSk5yVsGRowevOxJyyuChqo9JAL5/mfA8I=; fh=ofKj83/p/ZyZjEy4Cu0MWVt3rz9nUofCes9r4zzROyo=; b=DsFbuGEw11UsGEns3elogYCF7YX3cY+r0xzS0BIzAYdLGbEGow+q5IOMmOfVqW4v+4 VT8drpTIheJxoq/kp1qahFFAVrDSEH9SHgOkiieh8l/fQCiJtBV3D/7MqvnDhalzqv9q DcijRJovFwI6QAHHI6ZTISzR+zOG9kGDjyAY+GNG+r+9bWBZONJebZOeg4kb1Ymgr6c4 cQRiQf6/9zogC2E2ECvTvqkWS0+Np6qV3OaV2QRry+vFfFwMZLtlfyK37POzAt0AITWK wKIikWGTZi9aJW5xLmleru9jIpRCTmGN+OWGNMDFXsSwoco46GumUk31nZTcqNVr0n9w U+NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Lq8cBDxh; spf=pass (google.com: domain of linux-kernel+bounces-3564-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3564-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id e4-20020a50d4c4000000b0055132bca29fsi6832065edj.102.2023.12.18.04.23.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 04:23:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-3564-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Lq8cBDxh; spf=pass (google.com: domain of linux-kernel+bounces-3564-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3564-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 9103B1F22780 for ; Mon, 18 Dec 2023 12:23:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 080E44B137; Mon, 18 Dec 2023 12:23:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Lq8cBDxh" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC023481AB; Mon, 18 Dec 2023 12:23:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702902196; x=1734438196; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=N7eUeKAMzm2gBFL7HvjuwqCenf2l5Dhwml6Vay6Fgy0=; b=Lq8cBDxhJ8qwdWwYGtJ7oP9LqJix2nvkkhGwYQSFdJUOzQpUhkXEzK5l ZbnoomT55iKSQDmloGu6JWgGkNiDLHvUlIsOZu4rZ3NdzCH9eg9DWKWTo yi6LGgU8qQ6jHt/pTySdfFVMaE44uVmUm75ihpib58x4oyhG2EH7P91o/ /wc/9rhabMcSMzk9D709TpeRfZCFoBovpOe/VGL8irf0xbp3PBD6Qgcqa Lf7LCiDaduYd1ZP6HBxjCF91s8osRduDu1vsY91zJuKKibycOuGCTF8Uk C7Oc+HiiRFfpoJIda4GPrMi8bqpZ5Dibs2hI9DyjtzhV1GoeQE3iMIa+1 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10927"; a="8859487" X-IronPort-AV: E=Sophos;i="6.04,285,1695711600"; d="scan'208";a="8859487" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Dec 2023 04:23:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10927"; a="768822020" X-IronPort-AV: E=Sophos;i="6.04,285,1695711600"; d="scan'208";a="768822020" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga007.jf.intel.com with ESMTP; 18 Dec 2023 04:23:13 -0800 Received: by black.fi.intel.com (Postfix, from userid 1001) id 5FB543CC; Mon, 18 Dec 2023 14:23:12 +0200 (EET) Date: Mon, 18 Dec 2023 14:23:12 +0200 From: Mika Westerberg To: Sanath S Cc: Sanath S , mario.limonciello@amd.com, andreas.noever@gmail.com, michael.jamet@intel.com, YehezkelShB@gmail.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [Patch v2 2/2] thunderbolt: Teardown tunnels and reset downstream ports created by boot firmware Message-ID: <20231218122312.GE1074920@black.fi.intel.com> References: <32163f49-8387-0754-534f-1764e731f26d@amd.com> <20231214073242.GT1074920@black.fi.intel.com> <20231215115521.GW1074920@black.fi.intel.com> <20231215140224.GX1074920@black.fi.intel.com> <866cb714-b9a8-a7d4-4c59-6ba771ef325f@amd.com> <20231218104234.GB1074920@black.fi.intel.com> <20231218113151.GC1074920@black.fi.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231218113151.GC1074920@black.fi.intel.com> On Mon, Dec 18, 2023 at 01:31:51PM +0200, Mika Westerberg wrote: > On Mon, Dec 18, 2023 at 04:49:13PM +0530, Sanath S wrote: > > > The discover part should not do anything (like write the hardware) so > > > perhaps it is just some timing thing (but that's weird too). > > > > > > I think we should do something like this: > > > > > > 1. Disable all enabled protocol adapters (reset them to defaults). > > > 2. Clear all protocol adapter paths. > > > 3. Issue DPR over all enabled USB4 ports. > > > > > > BTW, what you mean "didn't work"? > > Path activation would go fine after DPR like below: > > > > [   15.090905] thunderbolt 0000:c4:00.5: 0:5 <-> 2:9 (PCI): activating > > [   15.090932] thunderbolt 0000:c4:00.5: activating PCIe Down path from 0:5 > > to 2:9 > > [   15.091602] thunderbolt 0000:c4:00.5: activating PCIe Up path from 2:9 to > > 0:5 > > > > But, PCIE enumeration doesn't happen (pcie link up will not happen, will not > > see below logs) > > [   15.134223] pcieport 0000:00:03.1: pciehp: Slot(0-1): Card present > > [   15.134243] pcieport 0000:00:03.1: pciehp: Slot(0-1): Link Up > > Okay, what if you like reset the PCIe adapter config spaces back to the > defaults? Just as an experiment. If this turns out to be really complex then I guess it is better to do it like you did originally using discovery but at least it would be nice to see what the end result of this experiment looks like :)