From nobody Mon Oct 6 16:16:02 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cgPXQ0KvKz69bv2; Mon, 06 Oct 2025 16:16:22 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx-01.divo.sbone.de (mx-01.divo.sbone.de [IPv6:2003:a:140a:2200:6:594:fffe:19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (prime256v1) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E6" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cgPXL52xYz3mdJ; Mon, 06 Oct 2025 16:16:18 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=zabbadoz.net header.s=20240622 header.b=QVpNU7zt; dmarc=pass (policy=none) header.from=zabbadoz.net; spf=pass (mx1.freebsd.org: domain of bzeeb-lists@lists.zabbadoz.net designates 2003:a:140a:2200:6:594:fffe:19 as permitted sender) smtp.mailfrom=bzeeb-lists@lists.zabbadoz.net Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx-01.divo.sbone.de (Postfix) with ESMTPS id 32502A64808; Mon, 06 Oct 2025 16:16:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=zabbadoz.net; s=20240622; t=1759767361; bh=bubsFdxEWfGvltPaNZkoR8yGPbgZEvzG+5oARnseIc0=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=QVpNU7ztc0nx1CPEif3MqS92z9SXLbXrfpKQ1ozbXA97O5InlIlEmLAPlb4PKWTq3 WCn+aQSpmDiy0BDAHaS33iVIWjpDEybvVh1odS3AGt55rzb6Nf9IBP0wVSjh5G+f9G VR7HC5e0JYjQ2lTFxE+BgtX1fxNe11AVZ/uT8Afur4jN5HjtjBHDORMR8aNVMwHwze chC22r1AjMLlI6sYQWFpF8GFWIF2UrhefacpqnZgmehnJ/to8WtigBiEL4UO1yCS+4 BmfFMn0PDOMEgThVbEtOecUYaDgWAhi5bvf64gJjegACN+FI3CjRZBdnaSD2/hU0rR Cu2Ibc4NOhzLGhYJP2kihtFoJ3Z8IzE5z8P7LZrWXs1XMOCDrdvzm/xpwHRQxr/6Gd VRDmPMo+BpsrUaRYqUeawi58dCap9hSLZZlgVtuOpW1S3Q9P9Ex8MaSEjJh2QeitCF Ni/0X73r708O6iuvhdQYov7kElKsb7aOUAqwf+yZvNSPpzAlybmu0ANbbu22Yc3eL6 LzvylgwAceH+GBx1Et7k+zkT68Dy2V1MuI6YZq+2fuc/bro4vIq60btoVH15OBnAz4 lABqag/uraWr0QfhCsLy8+N3YR9BJplNVku17RTB9qPfu/EG5ilT/5I7WqUCE8nXUr veArqCCkv2T4pX66wZXye8qA= Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 22A672D029D8; Mon, 6 Oct 2025 16:16:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id zmJZO9ut3WOo; Mon, 6 Oct 2025 16:16:02 +0000 (UTC) Received: from nv.t4-02.sbone.de (nv.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 286492D029E7; Mon, 6 Oct 2025 16:16:02 +0000 (UTC) Date: Mon, 6 Oct 2025 16:16:02 +0000 (UTC) From: "Bjoern A. Zeeb" To: Aymeric Wibo cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 2ed9833791f2 - main - thunderbolt: Import USB4 code In-Reply-To: <202509271713.58RHDTTL008060@gitrepo.freebsd.org> Message-ID: <8sr48s9-253p-3p8n-q171-s95939973q56@mnoonqbm.arg> References: <202509271713.58RHDTTL008060@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spamd-Bar: --- X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; DMARC_POLICY_ALLOW(-0.50)[zabbadoz.net,none]; R_DKIM_ALLOW(-0.20)[zabbadoz.net:s=20240622]; R_SPF_ALLOW(-0.20)[+ip6:2003:a:140a:2200:6:594:fffe:19]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MISSING_XM_UA(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:3320, ipnet:2003::/19, country:DE]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-main@FreeBSD.org]; DKIM_TRACE(0.00)[zabbadoz.net:+] X-Rspamd-Queue-Id: 4cgPXL52xYz3mdJ On Sat, 27 Sep 2025, Aymeric Wibo wrote: > The branch main has been updated by obiwac: > > URL: https://cgit.FreeBSD.org/src/commit/?id=2ed9833791f28e14843ac813f90cb030e45948dc > > commit 2ed9833791f28e14843ac813f90cb030e45948dc > Author: Aymeric Wibo > AuthorDate: 2025-09-27 11:50:43 +0000 > Commit: Aymeric Wibo > CommitDate: 2025-09-27 17:13:13 +0000 > > thunderbolt: Import USB4 code > > Add initial USB4 code written by Scott Long and originally passed on to > HPS (source: https://github.com/hselasky/usb4), minus the ICM code and > with some small fixes. > > For context, older TB chips implemented the connection manager in > firmware (ICM) instead of in the OS (HCM), but maintaining the ICM code > would be a huge burden for not many chips. I cannot find a better reference currently to reply to. This seems to be one of the ICM cases given the warning? [44.426631] nhi0: mem 0xda000000-0xda03ffff,0xda040000-0xda040fff at device 0.0 on pci5 [44.426653] nhi0: Cannot find Upstream Facing Port [44.426668] nhi0: attempting to allocate 16 MSI-X vectors (16 supported) [44.426677] msi: routing MSI-X IRQ 146 to local APIC 0 vector 56 [44.426685] msi: routing MSI-X IRQ 147 to local APIC 2 vector 54 [44.426693] msi: routing MSI-X IRQ 148 to local APIC 4 vector 54 [44.426700] msi: routing MSI-X IRQ 149 to local APIC 6 vector 56 [44.426708] msi: routing MSI-X IRQ 150 to local APIC 0 vector 57 [44.426716] msi: routing MSI-X IRQ 151 to local APIC 2 vector 55 [44.426724] msi: routing MSI-X IRQ 152 to local APIC 4 vector 55 [44.426731] msi: routing MSI-X IRQ 153 to local APIC 6 vector 57 [44.426739] msi: routing MSI-X IRQ 154 to local APIC 0 vector 58 [44.426747] msi: routing MSI-X IRQ 155 to local APIC 2 vector 56 [44.426755] msi: routing MSI-X IRQ 156 to local APIC 4 vector 56 [44.426762] msi: routing MSI-X IRQ 157 to local APIC 6 vector 58 [44.426770] msi: routing MSI-X IRQ 158 to local APIC 0 vector 59 [44.426778] msi: routing MSI-X IRQ 159 to local APIC 2 vector 57 [44.426786] msi: routing MSI-X IRQ 160 to local APIC 4 vector 57 [44.426793] msi: routing MSI-X IRQ 161 to local APIC 6 vector 59 [44.426798] nhi0: using IRQs 146-161 for MSI-X [44.426976] nhi0: WARN: device uses an internal connection manager [46.426984] nhi0: tb_router_attach_root() error. The driver should be loaded at boot [46.427115] device_attach: nhi0 attach returned 60 .. [46.431111] acpi_wmi0: on acpi0 [46.431148] nhi_wmi0: on acpi_wmi0 Rather than going through all the resource allocations, can we (if detected to be not supported) just barf and exit or remove the device IDs and not probe at all to avoid all the delay on boot? That said, the check in nhi_attach can never work as nothing seems to ever set NHI_CAP_ICM? So the warning presumably comes from nhi_init() which happens at the end of nhi_attach() but it doesn't actually do anything about it and lets it run into follow-up problems? Maybe the warning should say something about "ICM device. Will never be supported on FreeBSD" or the like? Another thing that I found non-intuitive for an "nhi" driver was the check: if (resource_disabled("tb", 0)) I understand it's not your code, but I hope we can improve this case a bit given the decision? /bz -- Bjoern A. Zeeb r15:7