From nobody Thu Aug 20 20:45: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 4hQwRk6rsWz6pVWk for ; Thu, 20 Aug 2026 20:45: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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hQwRk4Wzwz3YcK for ; Thu, 20 Aug 2026 20:45:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1787258706; 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=MzLKRg/m28XkAYM7l8hTNl7m4Wzz52kAgU8pjsyfSMo=; b=DQPkkBh0KaFLns+KGWoo5jFgQXWRUMzzzqF2SQuQoKh0vqSZKAz4hDtLBJeC4T0iJG9x8B NFfY7dWsSrtf2CeKI4zsSlIaQIvI/Y5XbWfw/4wKGExwBjwz7O/j2dmvV5KIz6YKUpDo1y 4R/vljhv7H685XXQGlrZmIQj9Fx6Hh780WarmiU7O9XmYzOoxwhdADusuxLrNBrLfeDkyJ PGsQRksAqL6aV3iDNAlgcAJyXpflsfcSaaVO8JUIp//4o+0AMNQ9oolmVa+2thww5aB6Yq FUdIimMH0viP1nEzLwGZo728uCbKdCZJWDJqbQr8EtA9ZFjTcOUt8/5mCqkB1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1787258706; a=rsa-sha256; cv=none; b=pQ1TOWqB+aO2sLz8Dv2iL6cXDg+ww3IahY78oxxfJ+EcEYawWG51woksol10EcPXdbKcEY 7hr8jHTY6jfNGMGVkqhqaRRJMJkKVcI/JrjxQP12oeCiRy/QAacvZX4PWBMBN/G9zcypVs cFvcUd75fnmhPob4jkeW+CEE1jG+xJJt9asBXAvyr9sy81RyT+HcseEl0Gk1Kt7us4Mq5M 86DzTx/MbGMiTBU1M2uZlIG6OPYjG1EbtUB/5ka3Y1OBnCFPFpGUN9FFln65HcY02YGHqo /BCotn6p8RTvYpHLjgTpG53BEOyKx+qPyr8WJYExJF4qkGhLYTGQCn6w4V6m0Q== 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=1787258706; 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=MzLKRg/m28XkAYM7l8hTNl7m4Wzz52kAgU8pjsyfSMo=; b=fBKCuC16JH8/oPsTDn2kr2vIWcw1hsCWV94Br9ogN40GpkQPYGS+i9pYY2YMCoEPcBSc5i PjppKPXnyCsGHQ7LnuDo7iRAzndy7bAn9CJKJs565WjCiUI9hPp0UO2/QiFGXIbgm3iDDY Bzl1rbn5xEzEDJtx8cHtOsKbCWJfHeoMojlhFeEpJhHBdUmRTgyX5KGS/gAxf6M0lraErI znnBZPDdH+Mq8lBV54qWsJplLenxLNg8GXBtmn7SQO6zikCTR/rxbM5kre4bqjK4HwEgXe 6uJ/XhxEAWaSA5R49g18L3DzDfmxqunIGRUopft8tnojG4wiXEpHm45LqihkWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hQwRk3WsqzZPm for ; Thu, 20 Aug 2026 20:45:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27f7a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 20 Aug 2026 20:45:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 850203655b7d - main - thunderbolt: Fix v2.0 reset to reliably wait for the reset to finish 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 850203655b7d25d7309601a32b44011a21e850c6 Auto-Submitted: auto-generated Date: Thu, 20 Aug 2026 20:45:06 +0000 Message-Id: <6a876752.27f7a.778fbefe@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=850203655b7d25d7309601a32b44011a21e850c6 commit 850203655b7d25d7309601a32b44011a21e850c6 Author: John Baldwin AuthorDate: 2026-08-20 19:49:36 +0000 Commit: John Baldwin CommitDate: 2026-08-20 19:49:36 +0000 thunderbolt: Fix v2.0 reset to reliably wait for the reset to finish The `reg` value was never initialized, so the loop could potentially abort without a single read of the register. This was found by the following warning from GCC: sys/dev/thunderbolt/nhi.c: In function 'nhi_reset_v2': sys/dev/thunderbolt/nhi.c:272:35: error: 'reg' is used uninitialized [-Werror=uninitialized] 272 | for (size_t i = 0; i < 10 && reg; i++) { | ^~ sys/dev/thunderbolt/nhi.c:257:18: note: 'reg' was declared here 257 | uint32_t reg; | ^~~ Reported by: GCC 15 Fixes: efdb82413963 ("thunderbolt: Reset controllers") --- sys/dev/thunderbolt/nhi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/thunderbolt/nhi.c b/sys/dev/thunderbolt/nhi.c index 22427cf324fb..e8221136a8e5 100644 --- a/sys/dev/thunderbolt/nhi.c +++ b/sys/dev/thunderbolt/nhi.c @@ -269,6 +269,7 @@ nhi_reset_v2(struct nhi_softc *sc) * "The Host Router is required to complete its reset within 500ms * after the Host Router Reset bit is set to 1b." */ + reg = 1; for (size_t i = 0; i < 10 && reg; i++) { /* * Wait at least 50 ms after writing before reading this