From nobody Mon Oct 6 21:35:11 2025 X-Original-To: dev-commits-src-main@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 4cgXcc4yxgz6BcJW for ; Mon, 06 Oct 2025 21:35:28 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic312-24.consmr.mail.gq1.yahoo.com (sonic312-24.consmr.mail.gq1.yahoo.com [98.137.69.205]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cgXcc3633z3Sx8 for ; Mon, 06 Oct 2025 21:35:28 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=eZ8zvifP; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.69.205 as permitted sender) smtp.mailfrom=marklmi@yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1759786522; bh=gJzcE9wrluPlC4Og5aCTh/+7hZMeQ6F0P09PIiHc37U=; h=From:Subject:Date:Cc:To:References:From:Subject:Reply-To; b=eZ8zvifPzd/5x50NFHb7WArMu5ZrHOjwRwTQDQ0qzghG9jPWRRNzVxdog3O4Ng8g47h9TE6y4KVEGxoI6nGmxkOF16ifhRFelORZqc1kLQcWl+RYfxnU4uPutNzOvt7+nuUufrj15Xvz+j/MXPNVOJ1/j3EsglERoFL3RGfWMLYGbf56wvbX/VxUGiD6eNm5DXlaTq4bk+mcXIhw0MV890YRg/mDEAkM5r3zqkwohfRXQZbACVjZxQLZvzAr8CK3JHEIwN3brza1U5grBnXTmR3TxyH0ym8up3rR7JSMhgq+G02eUc65ItCO8Zkv2W0tVkxr/71voraQoQm4vOD/uQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1759786522; bh=cBiSFQktB6Fb+m+ugneMG4qQZn6/zo3yf0s77UdxOsU=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=ihK35ysFVH1nuqOoKRiWTlPREIHMsM8DFjznS3dtsz3eFapM9Mfvkb8/CGtdKvDfvc+d3rdzR3RNj/ySpniQK0ts4WuEvbPAVER3bBQHpWGPIZ+EBUegyEgHIrbfcbNPRk4BJE5ZlwGy9bF9DdIrH80xtNXxhW4FVZ2Z5jebNQiEYsu4CsdE9UlwyqwqZcICUEccq77uGJs3+tDE+lUNggGuni6hWxR86ISR4QO4YYECjf25XsnrofMT6ezDIBL2VF4GcbbbLdIOfcdmv059OEf01/zXijjbkI4bupPeV3p/lC6FqY4nUwaGB3yZSfMi5C5VxDprwgJa2QSEarCciQ== X-YMail-OSG: CDHPoWwVM1l1c00JnwDRMDftEcImRAkPyepJxgYADJk5OYxvooolLv6kd5ppAGS gEPSgkYFo4lK5TW1OBVCMkMB4sSy8.ukmpnkk1k5EUsmTuZYH2oeW46C3eCHkZfjtahkCD4ATpJz 3eZyhyf85IpDZ0dWGiVhbds2eSxlseRODrEqjzkCPWOEWhYHCBr1Yf9X8_wM4xrwKUNcRtZDy_Gc kTdHLxWd2XHHNNlljj4LlBVPOzJpl0Ie9ID57OgWl0TOOaIsntTCpZFWcBDne1BQB6ZgdZ.JmKkH npmkpu.aXsLGy85uOPCGOBmxz7ekWY.5ReK6JOVw12HKF2bvdw3WgcRVSjUAk1htD6YTKT1RDbHn qiQbxfd4ccMHy2QdoDs4LxDLB1cmGaG.P9UKxwKXyTTbapIqiiRIPlIJ4xUPNqGmrPE_K4DNaW5w 48abx9txUcsuSmYUgX4EN2utLdZp1LxzCW.Tx2Fl.pvulTtz7BBRIIlGyTZx4UqOSmSJQNGQhxk0 TyckGto04lVqnVTQBhEXM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FKLrovX1TQgsEJu0pVyS54qS2 IXRemxzla7XPF9z_NOnWx1PD17Rshv2RSpt99MHkIajsmkfI6leeg2EAND8H5pj5o9d8LaRai78n CDzJyxB8H2eaTWQp8lOzoXLDfuPKlTuEn3VRUhUwlE2a_lNcXGkzGSFwqDrgcmegdobKVESREy.D iIuO87gE8tr123lc2kRpdd3H3GJB2pcf7TazXbb73B.JFHW4u6wMiEb26x8HRMQHj3r9z3L8JXHk _DFbCtHbaflBJhShKdkAnG1.T.F2OgDnqO2YJ8rSz7Fa02FK0TLJ7vOqVuyOkBZFT89vN7NoMX68 JVUKMTOIq_nBKTcOH2wb5ANNuFBS.hY23cblNlY.8c08wSr8dLus30UhFXMfW.LzFy4x4vCY4hzE nN5TIVr._s54g3xmwvEzeqXutNTSldivus.5exrbOV6CKq0AWV4SXbzZMBuk_.DrtgxihTKaarFc tGj55xLhZMisg7gmTJ3V_jwhFPi9tay7j6GZMS8.jlFbWPo9TG9DzKJ1Dcyfcs.CH.W.ZXXKrdQn 8zZHSUu8AfFUw9D3eSoSfZTC_gBHe934lxShIxtFzOsgeETyGnfb7RY9du_Fa2PML_ywRRDU2BXM YqQDQhwFUDkys85.4thBSZ983SqYcd4ZpQTCqWnW8kPsSXnJCvMFvCH0Bb017uff0ALj0UFVwo_b oHqbGPfWxA80m5CDWCHWu66fcYABhKzvMdd4tBlhmH8DhUg-- X-Sonic-MF: X-Sonic-ID: 704928b9-2013-4a06-b5d3-f25802a134a8 Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.gq1.yahoo.com with HTTP; Mon, 6 Oct 2025 21:35:22 +0000 Received: by hermes--production-gq1-66b66ffd5-xwkq7 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 486f8fae488933ae5f0ce71601dc900a; Mon, 06 Oct 2025 21:35:21 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: git: 2ed9833791f2 - main - thunderbolt: Import USB4 code Message-Id: Date: Mon, 6 Oct 2025 14:35:11 -0700 Cc: "obiwac@freebsd.org" To: "Bjoern A. Zeeb" , dev-commits-src-main X-Mailer: Apple Mail (2.3826.700.81) References: 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)[yahoo.com,reject]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; TO_DN_SOME(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; APPLE_MAILER_COMMON(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.69.205:from]; RCVD_IN_DNSWL_NONE(0.00)[98.137.69.205:from] X-Rspamd-Queue-Id: 4cgXcc3633z3Sx8 Bjoern A. Zeeb wrote on Date: Mon, 06 Oct 2025 16:16:02 UTC : > On Sat, 27 Sep 2025, Aymeric Wibo wrote: >=20 > > The branch main has been updated by obiwac: > > > > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D2ed9833791f28e14843ac813f90cb030= e45948dc > > > > 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'll note that ACPI 6.4 appears to have a way for the OS to indicate that it it wants to do its own handling of connection management, even for when ICM is available. So to say that ICM use will not be supported need not be an indication of if the context will have its own support of connection management in the OS. (I seem to remember seeing _OSC notation in the context I was reading. I also think that I remember: Query Flag being 0 and Native USB4 Support being 1 for the call in something I was reading.) I've always found figuring out the binding of loose wording relative to support for optional USB4 things difficult to well identify any detailed meaning in the USB4 specification(s) (V1 and/or V2). USB4 does not require hosts to have Thunderbolt 3 interoperability: such is optional. (Note is about intent for the future for FreeBSD. The lack of existing support seems clear.) > I cannot find a better reference currently to reply to. >=20 > This seems to be one of the ICM cases given the warning? >=20 > [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 "has a"? "allows use of its"? > [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 >=20 >=20 > 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? >=20 > That said, the check in nhi_attach can never work as nothing seems to = ever set NHI_CAP_ICM? >=20 > 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? >=20 > Maybe the warning should say something about "ICM device. Will never = be supported on FreeBSD" or the like? May well be true but it seems that disabling ICM and having support without using the ICM is a technical possibility. > Another thing that I found non-intuitive for an "nhi" driver was the = check: > if (resource_disabled("tb", 0)) >=20 >=20 > I understand it's not your code, but I hope we can improve this case a = bit given the decision? Side note for reference: I took a stab at finding and listing some required vs. optional USB4 functionality for USB4 Hosts, mostly based on USB4 V2 criteria in the V2 specification. What I managed to identify in my one pass at finding such was: Required for USB4 Host (by contrast to the later optional list): ) Host router ) USB 2.0 Host ) Enhanced SuperSpeed Host (with 1+ USB3 Gen X Ports) ) A DisplayPort Source ) DisplayPort Alt Mode on all Downstream Facing Ports ) USB3 Gen X tunneling ) DisplayPort Tunneling (DP 2.1 for V2) ) Host to Host tunneling ) Gen 2 speed (10 Gbps per Lane) [Router Assemblies] ) Contain and support 1+ DisplayPort IN Adapters [Host Router] ) NVM DROM Read Router Operation [Standalone Add In Card Host Router] Optional for USB4 Host: ) optionally support Gen 3 speed (20 Gps per Lane) [Router Assmeblies] ) optionally support 40G USB4 operation (Gen 3) and 80G USB4 operation = (Gen 4) ) optionally support USB3 Gen T Tunneling ) optionally support 1+ DisplayPort OUT adapters [Host Router] ) optionally support DisplayPort UHBR, 8b/10b MST, Panel Replay = Optimization, DPTX Discovery, ALPM ) optionally support PCIe Tunneling (via a switch or Root Ports to a = Root Complex) ) Optionally support PCI Compatible INTx interrupt emulation [PCIe Host = Router] ) optionally support NVM Set Offset Router Operation [Host Router] ) optionally support NVM Write Router Operation [Host Router] ) optionally support NVM Authenticate Write Router Operation [Host = Router] ) optionally support NVM Read Router Operation [Host Router] ) optionally support NVM DROM Read Router Operation [Platform Integrated = Host Router] ) optionally support NVM Get Sector Size Operation [Host Router] ) optionally support interoperability with Thunderbolt 3 (TBT3) products Note: Such a product "can operate in a USB4 Fabric that includes any combination of the following: A Thunderbolt 3 Router, a Thunderbolt 3 Connection Manager, A Thunderbolt 3 Active Cable". (Chapter 13 --but it references material in other chapters as well.) The wording is more general than just "host" products and so is not a direct list of just what a host has to support of itself. Note: Such support involves Thunderbolt Alt Mode (from USB Type C). Note: USB4 V2 Docks and Hubs optionally support TBT3-compatibility on = their upstream facing port. (V1 had Docks being required to have = support.) ) optionally support interoperability with other USB Type-C Alternate = Modes as defined by the USB Type-C Specification ) optionally support Inter-domain Time Synchronization [Host Router] Some subset of all this is likely to be developed in some sequence. I would not claim to have found everything that might be of interest. Nor do I have a clear understanding of what of this FreeBSD intends to support (or in what sequence support would gradually appear in). =3D=3D=3D Mark Millard marklmi at yahoo.com