From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (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 1188C2FC037 for ; Mon, 18 May 2026 23:06:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779145600; cv=none; b=RcnxzQL/fjZ+KsQWh8/0Bu2h3uVKA/MCxcAL7PphFlFQBKa6Q4dbmSO7qXVWCfEr5+u31q4iid6GUXbbLQHwKKbwS0DvQS/GiasIJMoim2gFZ4Oy34uu/a4E6ndZi9nIpIblnVEDiGoh01k9V6cogT1V0Iga/eBV6magdylB6c0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779145600; c=relaxed/simple; bh=tdQX6z5Ow34bb/pGtk3dNyrAbcLCh7UCBhe9r1uuApA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=JbA1XwveObtAIGF3UUtRbsxv4/eikj+CIFzDo3RLT62VqgIP50NyY5wNZO1wRsVWkZn9Cn9tfREhCUAuw/vEbBByG/bzpMVjAnMQbJAumwToFkZzqmO8DfU8cWGVdRMQV5nxrnltLV2xLHsmrXQsT8r9gUfVvBAhO6NnfzFzClE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=iKifQGEz; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iKifQGEz" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-2baca4df358so15696695ad.2 for ; Mon, 18 May 2026 16:06:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779145598; x=1779750398; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=J6fRPsUXaMKX0qPKfz3OqQyhzwCYHmD71RB3fhnMJPw=; b=iKifQGEzAh3nSIZfpJZ9YmMOaA3tTspIJSBXVF+njJnVFVRWhMr60osRzOcmOzsKRX YrGDT1oBgngfvbxZW/hzH6hciFB9fdnt4qrI18QoiRjMG7ybEfkCnD+4hvYqTZzhgQyc HY1KpuxlP1Ql7R7Jm+eHeVN9Rj4CHp7JTNTqapF1TLxPuF/vokhvpCnrCujUlIHNNUK0 FO6byZ4mQg+RBG8hEiFzs5o5LAnIiBvAgVoWjtCusn2O0n/OX+RGKGvJh6uznc45IezW 3vI3xm5nYYRaDpNWpariflH0kh6b4/zXJNo7FWWFvPY6IL27dfbkncRf+YIwT2VgCx5F mHeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779145598; x=1779750398; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=J6fRPsUXaMKX0qPKfz3OqQyhzwCYHmD71RB3fhnMJPw=; b=rt6feYvMMPzzGk8trPbTw4BKEh8Lh0NsbCH0mMRbqwHVpP5Z+8lZXev0K4CRpcbX7i cELckmKgYb6o0AN+7Xnf/ZV0022kTX6Y8m2B1o+3+CPaD94EmIR5cEVDlmBtg9qVPSZu 6Wczr1TMUKaU9itRRNIC2y2efH16GewzK4ldwWs3ROm59+J/f6tL6LOsetR8VA3N9gnc iW3P/vRIYuBVesdpygohKb1TgTACElvv25YvcagIqoOzop2ogIRnT1M8MrCCHhdQLiq4 qlmw0f8Ic0qoNMeyheDI+pLY8G6ZcHBZea8f582k3CRag1p42JVRzjvYYCuyzj89J+tr 3tAw== X-Forwarded-Encrypted: i=1; AFNElJ/fIpNZqsez24vV0Qco6rxOVKiYqDMKoM9vvfYB0jD0JUKXTLmTQLlkssvFdnO/6CIQRuZprk7aCEiAti4=@vger.kernel.org X-Gm-Message-State: AOJu0YwJblQeqqS8Vg9tyWfJQrvlWH2oEUgQ6Qqk+XIvQpJ32fhdKA++ ejoSE4/+nB3RkUWB0mydFYlW3mixtpUHms5Ut1i3l0SqVpTeq1X7ZAHv X-Gm-Gg: Acq92OH9tIp5P1fn9Owv3Clac25AzC+ozVhl3kEOQzD7R0zd7gyU6sgaDho3Gh5moji 24L3/nqrbNOLfuR/Q+JMfJiEl1Lsa55RO6It7Rpb+UQwxPevW13r/cnvp4pbqllf3e1uhUOpX4v yptqdoXXdgjgTCl9K5QP5wy1ab0ifOFxQTnIYtmiAtHY5WmFCFTWYLWjM3rWBxot9vG5VUaUUGt 1RoLQX8IuMYjQXNULkDfITDZjlQWoA06rwq+v2m1LhTItgSyd8zzOiJeLf++vkAzZ04K/VvGpBb NF5RHCeWSNtcA+qAH3VX8nHCfGQODTUamr7jAgqd6LUwmX/44XHrKDZIjp3FeKvGgSxCddtnGRz HsxLk7yrhB7ceC6jDVUlUips4N+LuIlrySIy/dkOiXeOsawdwfPeXct1SAZov8HXkQdG1iMURHq 2GtgqkJHl2nYGO00ElG9CPEUTlHhsRamw= X-Received: by 2002:a17:903:3c43:b0:2bd:e43c:12d0 with SMTP id d9443c01a7336-2bde43c14b7mr63463745ad.28.1779145598364; Mon, 18 May 2026 16:06:38 -0700 (PDT) Received: from [192.168.89.2] ([119.214.48.64]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2bd5bd5fb35sm159558035ad.12.2026.05.18.16.06.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 May 2026 16:06:37 -0700 (PDT) Message-ID: <7ff352be-05d2-4c21-931e-18238172e4d7@gmail.com> Date: Tue, 19 May 2026 08:06:34 +0900 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 1/2] usb: xhci-pci: add AMD Promontory 21 PCI glue To: Michal Pecio Cc: Greg Kroah-Hartman , Mathias Nyman , Guenter Roeck , Jonathan Corbet , Shuah Khan , Mario Limonciello , Basavaraj Natikar , linux-usb@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, "Mario Limonciello (AMD)" , Yaroslav Isakov References: <20260517130407.795157-1-hurryman2212@gmail.com> <20260517130407.795157-2-hurryman2212@gmail.com> <20260517232147.34931718.michal.pecio@gmail.com> <144ec61c-4cc1-4986-a16c-7c1b99f3a72e@gmail.com> <20260518233711.4c99cc72.michal.pecio@gmail.com> Content-Language: en-US From: Jihong Min In-Reply-To: <20260518233711.4c99cc72.michal.pecio@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 5/19/26 06:37, Michal Pecio wrote: > That's true. > Making this possible is the whole purpose of "if IS_ENABLED" here: I re-checked the Kconfig cases, and I think you are right here. The two cases I was trying to avoid are: 1. the sensor driver is built as a module, or loads only after the initramfs stage, but the PROM21 controller has already been bound by the generic xhci-pci driver, so no auxiliary device exists for the sensor driver to bind to; 2. the built-in generic xhci-pci driver rejects the PROM21 controller, but xhci-pci-prom21 is only available as a module and is not present during initramfs, leaving USB behind that controller unavailable at that stage. Looking at your proposed Kconfig shape again, it handles both cases. If SENSORS_PROM21_XHCI=n, then no sensor support is requested and USB_XHCI_PCI_PROM21 can stay disabled. In that case generic xhci-pci binds the controller, which is fine because there is no sensor driver that needs an auxiliary device. If SENSORS_PROM21_XHCI=m or y and USB_XHCI_PCI=y, then USB_XHCI_PCI_PROM21 follows USB_XHCI_PCI and becomes y. That means the PROM21 glue is available during early boot, creates the auxiliary device, and the hwmon driver can still bind later if it is built as a module. If USB_XHCI_PCI=m, then xhci-pci itself is modular. In that case needing the PROM21 glue module in initramfs is not a PROM21-specific built-in/module split problem; it is the normal requirement for a modular xHCI PCI setup. So I agree that tying the hidden glue option to whether SENSORS_PROM21_XHCI is enabled is reasonable. > Currently, you have a weird situation where xhci-pci-prom21 always > binds on x86 and xhci-pci on other platforms (with the unofficial PCIe > card you mentioned), plus the sensor cannot work on other platforms. Agreed. I also agree that the X86 dependency is only a heuristic and is not a good restriction for a PCI ID based driver. PROM21 is mainly used on AMD x86 desktop platforms today, but the unofficial PCIe card example shows that the device can exist outside the normal AMD x86 chipset topology. I do not know whether other PROM21-related functionality is supported on non-x86 platforms, but this driver does not need to prevent the xHCI temperature sensor path from being built there. > One could further argue that neither should it care whether some hwmon > driver exists at all, or which kernel releases it exists in :) Right. I think the cleanest result is: - generic xhci-pci handles PROM21 when no sensor support is requested; - xhci-pci-prom21 handles PROM21 only when the sensor path is enabled; - the hwmon driver remains the user-visible option. Unless Guenter or the USB maintainers object, I plan to change the next revision in that direction and test the Kconfig combinations locally. Sincerely, Jihong Min