Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1394334lqd; Thu, 25 Apr 2024 14:24:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXpQtpuzVS5WNkLNwXjl5vQmDgIXUiOLopTAI4Da6C7F0NsGSVNZTuEk/pw4jRZmtLgbU6IJDcgjg02yWEcLx4DcItr9jVUi6Me4XH8Tw== X-Google-Smtp-Source: AGHT+IEGbNnbB7CeuaXkqVe777lYuRkf7gS2zy9aH4vWknLip3j0tmJ7kfXvBGo12m+AH6mgvbCO X-Received: by 2002:a05:6e02:12eb:b0:36a:1e55:535b with SMTP id l11-20020a056e0212eb00b0036a1e55535bmr1213946iln.16.1714080252533; Thu, 25 Apr 2024 14:24:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714080252; cv=pass; d=google.com; s=arc-20160816; b=SKMUrS8PL1lL4DR3tJwjE2mA11bQw3heSeu64gR1qVOBWbdKAGCR8i+Mnjb2UzaBjW cex6PEj61Z6mLHjuvBYorOmn5UhJi8sBGOep17DWehCbn9TRrRHJyJW5+nEcgTTiQ6fK GZFvOqwMrYY32aACDLhSOBeOQpmMMYfZgd3KKM9Sa7y6zFaY1hsxRjetcfCy4nMTVNMo AvVEfp8kJNW3DRwWvFZd/dAlv4FoQn+Jy0FDWPPh4QcY/cYk5NrtuLtQ2eRJaMkHaAt2 AwfclHl5gAOQ7kpyGFYj7tVwsZb6qz/3fFYd5ypwPTNtSJl1Pe1DO0vVk7PZmoWNZVeL mQ2g== 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=gdraXOP8mNZIkgcpov9SRBAjVK1O3sl9HxHrT1Jt1XU=; fh=T59aOzja3E0eAxj+fuSYlv8QLXCtfyo79SuUXQSqlRk=; b=PQLG2Kq7tiIM3FUX/SxXVKyNsl74WJteVjG6NUaj/EnwmmicwXnnfM0GujYkpp5qCy kNKS+xtJxvv6MYhFKnfd3zjfFiL8Mz3geUchOtzaNNuc0Kv4pAztmoTZFYQ1qXOkbg9s llCn+2A3VXCh+hIOhc1RYvHSi1iHv52tdghYJ2zCuYDuVTwoGK5roXPE3SpiI9ChRyTg NXwRDA8LrRDc9UHFViwaowXJ6iI7HifQR6rDmci1uryjFE7ooE6XTpk0KwVpEmt1kHW4 nws3Ii3brK5vZ4cTJ+mPRuXByIImeuPGCLRjBtxjoN4SkxhDu0p7WWfRIvOZNmECtUXz e+JQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=FUHCD2MB; 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-159199-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159199-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i17-20020a63d451000000b005dbc6dc4cdasi14159659pgj.255.2024.04.25.14.24.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 14:24:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159199-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=FUHCD2MB; 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-159199-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159199-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C05A3287707 for ; Thu, 25 Apr 2024 21:16:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2EEF7155735; Thu, 25 Apr 2024 21:16:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="FUHCD2MB" Received: from mail-vk1-f170.google.com (mail-vk1-f170.google.com [209.85.221.170]) (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 DA97F153BF2 for ; Thu, 25 Apr 2024 21:16:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714079799; cv=none; b=YocDMt0LCN93OIP1jgXzHS6VDrnLOffwYdwGBsa4ouWYqW5IsqDkI5+i098JJorGEHSgTathAlJuM7ErC5zGk2LSSRQotm6W4oHaGdLMTepMsoMVxkH1W3VhN/kqYM7U9Mp8PpKcdBsD1EASKEjUfDW7gh6qaOblbjmFmr4LwZ0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714079799; c=relaxed/simple; bh=+do5gtBkeoi2/XwNiteQC2IMRsot+qZ+59avjMEo1qw=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=IBH9gKxRH3nh5mZAINRpOTCRhgvFadnnkdfTjFxRzLoeva+dmQ3HJOn3WcWOiXY4p4LibjnKhliTa6aIyalGyKfpkZoTLu6nN2JeSGJHXLHIYVcuzsB2x0aRZT9k7Ulvm+gZs6VkmAoZNHtQrVhV5SZQlDg9+mu5wmAjc6x21p0= 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=FUHCD2MB; arc=none smtp.client-ip=209.85.221.170 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-vk1-f170.google.com with SMTP id 71dfb90a1353d-4affeacaff9so355934e0c.3 for ; Thu, 25 Apr 2024 14:16:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714079797; x=1714684597; 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=gdraXOP8mNZIkgcpov9SRBAjVK1O3sl9HxHrT1Jt1XU=; b=FUHCD2MBHJu8+r9FYLSfCu87/WMBXCrvo6qgb3xVAi6CLYjXbJ72qWcf0EQvFt9tfl Km8jpOEqawWux8MtpmusHYEG4Wa81l5MqSySgbNfem674U2qhXvCcLTzxQMc/pgCcYDP zBIz2LOxQVgC788JB85iKZGauLzUykrFaVrA4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714079797; x=1714684597; 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=gdraXOP8mNZIkgcpov9SRBAjVK1O3sl9HxHrT1Jt1XU=; b=D/+WzGpf1yDLf1YNDXnKC5JnZateMDvkhFmZj86TJ9FsCVW3Vy1RlaNixfzb8c/pY6 AODrS2CUuSyHJGq/z7oS7Mr81O+QFegsYhXiPZnWc+aBHsSe5/ewTd2JQTRsYOw6vno6 Ufg7IXq2vrdtA3jL5LMWQvMOL+JPuTjPny7QWpab5lhNB7ucVDRyCcpgC59i6e2hlvzH V8ngPlEXmN96psQ5KC5rNOzSFRhwL+ZYaHdzhmv1jt++MkxdRdZv06NjKF/YZZTnPGwA OYpESv/H+7wFocBXY/N9RHzM+bU2UGsNMq+8fowSQxa12GkHZvZhrvekMSkm0bCky7W0 ARRg== X-Forwarded-Encrypted: i=1; AJvYcCUtQF3NokA+Z9F8MHQe14ds6yeIwbVxsBrOcBWE5sy3f7ufi3SFU5XcniCANIs9DyqkW46tqg9QsCPCMmjd1pVgKHZrFsIuD6x3kku+ X-Gm-Message-State: AOJu0YzJSRwaJmYOC3xxmv9FgJ2DHTQSKMPY0itvVLypSADPN4d8ECjC S0XCS+NpHzvw7aj0ua0HYAy8jHy3Mxoct8Gf2hq5TvY8dpIMI7d36IKjCZI4+hqKTqOtXfuVQcr HyRCO7yDuXPdejhPJHaL3xt3ZXsNzHasBrNbN X-Received: by 2002:a05:6122:251e:b0:4da:704f:7fc6 with SMTP id cl30-20020a056122251e00b004da704f7fc6mr737089vkb.15.1714079795344; Thu, 25 Apr 2024 14:16:35 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240123061820.GL2543524@black.fi.intel.com> <20240416050353.GI112498@black.fi.intel.com> <20240419044945.GR112498@black.fi.intel.com> <7d68a112-0f48-46bf-9f6d-d99b88828761@amd.com> <20240423053312.GY112498@black.fi.intel.com> <7197b2ce-f815-48a1-a78e-9e139de796b7@amd.com> <20240424085608.GE112498@black.fi.intel.com> In-Reply-To: <20240424085608.GE112498@black.fi.intel.com> From: Esther Shimanovich Date: Thu, 25 Apr 2024 17:16:24 -0400 Message-ID: Subject: Re: [PATCH v4] PCI: Relabel JHL6540 on Lenovo X1 Carbon 7,8 To: Mika Westerberg Cc: Mario Limonciello , Dmitry Torokhov , Lukas Wunner , 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 Thank you for all your help! On Tue, Apr 23, 2024 at 1:33=E2=80=AFAM Mika Westerberg wrote: > > The other way I think is something like this: > > - If it does not have "usb4-host-interface" property (or behind a port > that has that). These are all tunneled (e.g virtual). > > - It is directly connected to a PCIe root port with > "ExternalFacingPort" and it has sibling device that is "Thunderbolt > NHI". This is because you can only have "NHI" on a host router > according to the USB4 spec. > I did find one example of a docking station that uses the DSL6540 chip, which has PCI IDs defined in include/linux/pci_ids.h: #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_4C_NHI 0x1577 #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_4C_BRIDGE 0x1578 It seems like it has an NHI, despite being in an external, removable docking station. This appears to contradict what you say about only having "NHI" on a host router. I am assuming that by host router, you mean the fixed discrete, fixed thunderbolt chip, or the thunderbolt controller upstream to the root port. Please correct me if I got anything wrong! Looking at 18-241_ThunderboltController_Brief_HI.pdf, it seems like these Alpine Ridge chips can be used either on a computer or a peripheral. (Expected usage: Computer or peripheral) So I'm not sure if finding an NHI would guarantee that the device is not a peripheral. My original question was how to distinguish a Thunderbolt controller that is on a removable peripheral, like a docking station-- from one that is a discrete chip fixed to a computer or upstream to the root port. So unless I am misunderstanding something, it appears that my only option is waiting for Lukas's patches. Please correct me if that is not the case!