Received: by 2002:ab2:7a09:0:b0:1f8:46dc:890e with SMTP id k9csp208103lqo; Wed, 15 May 2024 11:54:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWtS0zq0pP/OYIVOSxNXEM3NuhvQoF5zLdoGSeZ5W/rtybdZwsx9GXWL0WD9mMP+o2nLsgsEPVhkY/8HuAeUZPBXNyn+6H09L9//DzD+Q== X-Google-Smtp-Source: AGHT+IEQ8hf9I0Ij56VZ/bFpFY0Coiu1qzCA602ag3iNy/Ee2tOGHN2/VCZfu3hkL0ezqnAGx6/G X-Received: by 2002:a50:f68c:0:b0:572:7b08:d49d with SMTP id 4fb4d7f45d1cf-5734d6b4088mr9273139a12.41.1715799267490; Wed, 15 May 2024 11:54:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715799267; cv=pass; d=google.com; s=arc-20160816; b=HshT4drjfXELAwybApuW4grXwRlKPT6khvQrgpm/0aZ4o8yXl/xdVjrfh9ruKgB5Vf KA3kQ5CnlYHO4VN6+vrzs1EjvyyH7YWo4Qjw5nVm8TENDryYdL+VHqgjozsbA4wmlkoz 1mrypeF9cHViefNuujur5FSpHxETAg9u8Vs7hqoAtjCvtqoao+hHTLjbXj8EjGxQCggd b3TDiIrtPyHzpQ9aF346ZWvJ16oEMII9gKcWSaWvAmU54/ZAMuHcwc+fwpnmftzzy18u l4tc/8oJtsq7fTNLPNPw9ZaHxIvKxkCCKytsfN3Yh4aG6Y8hed1lBOud+To1BhavWv5g c52g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=1stdIcMfpJoHeMq0EK8/CnWNubwITINrVIoDocS+WoA=; fh=dOraRElytGRhw+KIaZ0OazpN8F5N8IFjtwyXwmVZ1s8=; b=ieAVZI2chZhuqTjjWJmghkSeM/GJgLMwL+0RzbQNhRv+zUHIpY2U2bDxyyj7zghdXD Suy5Ucr4sPaKroyf/IH/km6l3Zzk91ZMP5bren1XHTjqOZYwr0XpLhWh3UgW9jA+lAov IIrLd4pvscLX599cK85QUMNFa33AbRXg1WOnf0CK8+DlKhrymcRlRfomCcFEE7L8Qfab GrQZG/ru0pVPkrKYT1ZsTFUsYtrTNWBG2vGGdZxJ24LguIBRfwxVXHLjwLWfWX98r0RE PiA93xuEXkz3kCYWe6qFLZfc1fnbFC5kvrCUJNRMp77Dx3cC5AJq5rm2Aa8R3GEEQkAr lRJg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=IKa+jgLN; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-180289-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180289-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c2d4565si8036417a12.214.2024.05.15.11.54.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 11:54:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180289-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=IKa+jgLN; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-180289-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180289-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org 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 A9D621F22E8E for ; Wed, 15 May 2024 18:54:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 84D44159216; Wed, 15 May 2024 18:54:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="IKa+jgLN" Received: from mail-vs1-f49.google.com (mail-vs1-f49.google.com [209.85.217.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E1C23BBF6 for ; Wed, 15 May 2024 18:54:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715799249; cv=none; b=u8LP7em5x0MacFhDIlYEA0yOAnchaDQjweOuUA6ZLbVXGz8/GgagoKWCQSgDMVOGUmabaoHCppg2ywzYtAeG1AG8TgFpkONO13055lHgKC+wlA2ZBfs3GhdQU34C+z+3dsDB0xJMfOMygz5vVpPcyVtKn6Z5Vm7BHUlDRuZ7HlA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715799249; c=relaxed/simple; bh=1stdIcMfpJoHeMq0EK8/CnWNubwITINrVIoDocS+WoA=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=CCvoAeoug0Hk4qqKTH3Au/G9e0qhNu5EDcruPX6kfKvnTnRfYV3xpZW97HM82tzfVOIQGCtpoC+/Z9alg6Hy7lMhpHB+eElAwM8Kf+eB0/mJ3naGTVTx7fA4yJI6AAYbDFJ5iR8XOq754OO09PC9DMOlEvnzBgBKGyiJR9as6gU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=IKa+jgLN; arc=none smtp.client-ip=209.85.217.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-vs1-f49.google.com with SMTP id ada2fe7eead31-47f39711c94so1948507137.1 for ; Wed, 15 May 2024 11:54:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715799247; x=1716404047; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=1stdIcMfpJoHeMq0EK8/CnWNubwITINrVIoDocS+WoA=; b=IKa+jgLNwXJ9K10iFyNWa2L2oguaQtIwc86P12tFY1s9Ej6QjkJFEPzBUqnS5O0THA I8ycEfYyIEK3sT8De3DxoCM5t0Fg+WBBIK32Tl+l3eHbZDfUNZ/cOSxiJodkPpzih8MU NwzRTbgJqjohtQbdu8BILVrKH35Zxopmnn7lk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715799247; x=1716404047; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1stdIcMfpJoHeMq0EK8/CnWNubwITINrVIoDocS+WoA=; b=Z6JyFcBMvCnbnr+9Koh/QjNPuQ/uidGlsdPA2/XeShwFFbNfJePtWNeIZ3bNtTUcWe 1aut8U6B4NS8omkQI8CanC1kHRsNMu4QyqKLEBScpovuKd9tQoBnSPow+J6UBACIAEhg qVy42Cv4F0XQAgb4wbOddROVOzH3qEy3h2ngYYQjBdGYTBFVIOZyNDC6smfnOdsekam0 UNX7J1He7wRiznck/U5khzo4JbU8LgsgMJkj9+4M7xevsMh82hi8IQ1CZv07XA2p7Xl8 1ntkGRdaRV0OM89JeDM31tNNxIM6jutNw0EfvWkXuqgDABpP3Pwc9wxv4jmLsfiNBktt GgdA== X-Forwarded-Encrypted: i=1; AJvYcCU21C1DR9dRnKXyF1z4kVilOM4bd+yX+TsSKuyhz9cL7YrP1HY58gtrbMmNPowzWIpvu580klIvmk05x2Gku2eexzOKxXey3FIMpGEs X-Gm-Message-State: AOJu0YyJBwCklSo+MdymRA9DPjKUZY+O9kj1mETPl7GDyRNcfI2Ux1Z8 yOwPpW5jYHUpAZSO0TTWIytjN0VimyT2kYiWxLczSXyX8dz5+mP7LLjRxgj+qJsGW4qKn6DvDSg jdb2loK12aReHwYoLLlc+fX1KWIFy1VS8o2p8 X-Received: by 2002:a05:6102:32c9:b0:47c:14bd:7ccd with SMTP id ada2fe7eead31-48077e1557emr14059700137.15.1715799245531; Wed, 15 May 2024 11:54:05 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240423053312.GY112498@black.fi.intel.com> <7197b2ce-f815-48a1-a78e-9e139de796b7@amd.com> <20240424085608.GE112498@black.fi.intel.com> <20240510052616.GC4162345@black.fi.intel.com> <20240511043832.GD4162345@black.fi.intel.com> <20240511054323.GE4162345@black.fi.intel.com> In-Reply-To: <20240511054323.GE4162345@black.fi.intel.com> From: Esther Shimanovich Date: Wed, 15 May 2024 14:53:54 -0400 Message-ID: Subject: Re: [PATCH v4] PCI: Relabel JHL6540 on Lenovo X1 Carbon 7,8 To: Mika Westerberg Cc: Lukas Wunner , Mario Limonciello , Dmitry Torokhov , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Rajat Jain Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I tried both patches! Build with Lukas's commits: On Wed, May 8, 2024 at 1:23=E2=80=AFAM Lukas Wunner wrote= : > > On Wed, May 01, 2024 at 06:23:28PM -0400, Esther Shimanovich wrote: > > On Sat, Apr 27, 2024 at 3:17AM Lukas Wunner wrote: > > That is correct, when the user-visible issue occurs, no driver is > > bound to the NHI and XHCI. The discrete JHL chip is not permitted to > > attach to the external-facing root port because of the security > > policy, so the NHI and XHCI are not seen by the computer. > > Could you rework your patch to only rectify the NHI's and XHCI's > device properties and leave the bridges untouched? So I tried a build with that patch, but it never reached the tb_pci_fixup function, even when NHI and XHCI were both labeled as fixed and external facing in the quirk. Also, I don't see where you distinguish between an integrated Thunderbolt PCIe root port and a root port with no thunderbolt functionality built in. Could you point that out to me? I'm not sure how your patch protects against the following case scenario I described earlier: > Let's say we have a TigerLake CPU, which has integrated > Thunderbolt/USB4 capabilities: > > TigerLake_ThunderboltCPU -> USB-C Port > This device also has the ExternalFacingPort property in ACPI and lacks > the usb4-host-interface property in the ACPI. > > My worry is that someone could take an Alpine Ridge Chip Thunderbolt > Dock and attach it to the TigerLake CPU > > TigerLake_ThunderboltCPU -> USB-C Port -> AlpineRidge_Dock > > If that were to happen, this quirk would incorrectly label the Alpine > Ridge Dock as "fixed" instead of "removable". Build with Mika's Patch: On Sat, May 11, 2024 at 1:43=E2=80=AFAM Mika Westerberg wrote: > > On Sat, May 11, 2024 at 07:38:32AM +0300, Mika Westerberg wrote: > > They are not integrated Thunderbolt PCIe root ports.m > > For the clarity, Intel integrated Thunderbolt 3 controller first in Ice > Lake, then Thunderbolt 4 controller in Tiger Lake and forward (Alder > Lake, Raptor Lake, Meteor Lake). Anything else, including Comet Lake and > the like are using discrete controllers such as Alpine Ridge, Titan > Ridge (both Thunderbolt 3) and Maple Ridge (Thunderbolt 4), and Barlow > Ridge (Thunderbolt 5) where the controller is either soldered on the > motherboard or connected to a PCIe slot. Thanks for the explanation! This patch worked smoothly on the device I tried. I'd be happy to go forward with this patch, and test it on more devices. Is that fine? Or should I try something else on the build I made with Lukas's commits?