From nobody Thu Aug 13 05:51:06 2026 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 4hLDxQ5cWhz1CgN2 for ; Thu, 13 Aug 2026 05:51:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hLDxQ4k43z4225 for ; Thu, 13 Aug 2026 05:51:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786600266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ubpuvfAmp7OPYe75VHjBroldjphlM9u/5jyAogEC4bs=; b=PH5pZH5mNqXYPI2eY1VeCvgVVhfHWrzDc6s6/xLdlHFK1+rWku5tWD3Zi1xeIhscN51j8k aYSpyLMPyBdkbvNw2rdM/J/gY62ICyaiUZvTE8iicpffY6Z8xh0pIftVLf1L8+0NNu4lLB 5W2uvXp8BaRqFlL3hg9CaorODDuE2nFegHGSSMrD5mLC+eo3m2Oy3lNNfmFKPmrUkhUo+R MEb9CnmFTUGcZRumGfC/HIEUXk0p6Vu1KXufHwVig5wi4+uhgGu2EAosXrKi4cuMukQGKK 70imGQOuOWqKfp+8cUETa8pNq2MLOHiUERDjMJzbkRTnieVa1iwygeTF/KlOqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786600266; a=rsa-sha256; cv=none; b=VEeO3uzL1RLggfAapCN6Tlpvqm0+sM23FmhZ9mOawgjMBMlNObIbRv6emrjwZ3DnnwlICm ToNcY6PPrf53ONfOg7o+8KbGy1uEvcdmfOZyVKGNfyLDk67qGCH7VCfl7Q+2xqAdgK3bdh Wo96WkTPI2bB3nJ5m0iQsKLiuBM2gW+n8vwIOqtsZSiBMSNlbUcRao0fDH4VtMDHUy2g/T si1+2JoK913b2mSZWLDovLjFlffQ3W1+YZpO4qbnL4U5axfPKfKxMI0ttfvsppQYZ9rmuX slwRleJeZ2YhZZtSNGVce8yVW22qMsWWy+TkXPY3fPfWUZp8y5yT5N24yIWTug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786600266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ubpuvfAmp7OPYe75VHjBroldjphlM9u/5jyAogEC4bs=; b=MFCmvxcWdYKNYDiz5G6Iep1saTpASJNX/7kLCBnV+WS2IVHEaJkbI72IsJvsqd97X+WSJl 8qRHxVWnes9KIkwm7lSicXYLBZrzK4ggH4E0OcunnPeBN6VKIPl3YPVHocCldEzgE8Q679 k2kmQGy7VPDADsOUc2JQqPurslDNBkOHnTp0DfG062iDw+xr3MzzgLLZbVQjOZHoiVDkdS 2XcKevhiCcRWv6Vrl4X9etf2N+EWzkS0Yl+ej/OjjjPo3yKWfscSNmLHm7QFSmukm1UXtQ ZqJEoRer2Mo+S4iWWwa9IbynYpYu296YuqSdYQXf6idV8eOMm7o3BrrDH6OwKg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hLDxQ3lzmzys7 for ; Thu, 13 Aug 2026 05:51:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 239dc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 13 Aug 2026 05:51:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: 7858a57baa2f - main - thunderbolt: Explicitly read NHI ISR0 register to clear it 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7858a57baa2f2efc4cfbd61303efb7e72ec43194 Auto-Submitted: auto-generated Date: Thu, 13 Aug 2026 05:51:06 +0000 Message-Id: <6a7d5b4a.239dc.7baf6d80@gitrepo.freebsd.org> The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=7858a57baa2f2efc4cfbd61303efb7e72ec43194 commit 7858a57baa2f2efc4cfbd61303efb7e72ec43194 Author: Aymeric Wibo AuthorDate: 2026-08-12 17:40:56 +0000 Commit: Aymeric Wibo CommitDate: 2026-08-13 05:46:14 +0000 thunderbolt: Explicitly read NHI ISR0 register to clear it This fixes and issue where Pink Sardine controllers were not receiving interrupts for more than the first command sent on the ring. Reviewed by: emaste, imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52862 --- sys/dev/thunderbolt/nhi.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sys/dev/thunderbolt/nhi.c b/sys/dev/thunderbolt/nhi.c index 75eb4fe6a5d9..22427cf324fb 100644 --- a/sys/dev/thunderbolt/nhi.c +++ b/sys/dev/thunderbolt/nhi.c @@ -26,6 +26,12 @@ * SUCH DAMAGE. */ +/* + * Spec references are to the Universal Serial Bus 4 (USB4®) Specification + * version 2.0, September 2024: + * https://usb.org/document-library/usb4r-specification-v20 + */ + #include "opt_thunderbolt.h" /* PCIe interface for Thunderbolt Native Host Interface (nhi) */ @@ -1090,6 +1096,16 @@ nhi_intr(void *data) if ((r = trkr->ring) == NULL) return; + /* + * Need to read this necessarily to clear it; see 12.6.3.4.1. Disable + * ISR Auto-Clear must be set to 0. + * + * XXX This might not be necessary on all platforms. It is on Pink + * Sardine, but this was not being done previously so it might have + * been working without this on whatever scottl@ was testing on. + */ + nhi_read_reg(sc, NHI_ISR0); + /* * Process TX completions from the adapter. Only go through * the ring once to prevent unbounded looping.