From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E82063B103B; Mon, 10 Aug 2026 09:39:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786354756; cv=none; b=rANxh/OwAv1L4BFznVCdZNo2yl7MYZ4b0jDpu99Zu2M9Vwj8YXkxNRmGSHS/dza5TNS4ZRoILxKeethsgyLGm6A+lkySjRjC4tFYpPfkOkRzJ1k+fZ23PbquJEZGo205sfQdZZNGKmDvWqqldONaPzGiQcAVk8loopm2NRiQYy0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786354756; c=relaxed/simple; bh=kpIzBYnGhMxnNzCGjzKJGDhLkwD5p5mSCjBmV3EJz/c=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=gswcoMLKbz0cRKg6VsQEDkUx4bes4rcnU4YRRvHiAv6+tDCINbD7MmiUDzPq9Q1us8tFGwYp7swgjOBT0SWfHbF7Bl4YySa8Crs3SSQVc39uDnZ5RsQ9Ba+0C3PQ6jBbTvzXpkMGQI6vV2hb6blYTkUyHmyxtMoEcPsFJwHMfCs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UH6HSPch; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UH6HSPch" Received: by smtp.kernel.org (Postfix) with ESMTPS id 2EDDBC2BCF6; Mon, 10 Aug 2026 09:39:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1786354755; bh=kpIzBYnGhMxnNzCGjzKJGDhLkwD5p5mSCjBmV3EJz/c=; h=From:Subject:Date:To:Cc:Reply-To:From; b=UH6HSPch+vfokCnsMo96SRVM0FAFtg2/IG4cpdBVgwygfLIu7UgUnY4n6ZFsZXN5I 4uH6WjX7qPjTnIS8YIXCRr/exKpoe57zNXoCwrUyO/Dew0S07DYnVNNEOs62VUKXZS /t4P5OLsLLfRD7e1Rk2+0dBmKU9ETpgxqBNZnbk/r9hkX3APCKnOihyVvUwbGZ0lKO XQsPUe/Ncmq6GrRwtVU4LQcWcvmxHAeWy7AOo++rXpY9iB0PkiR4KV5Ulvvpw6kP64 LwOyGSVGdbfs6cR9coWED8TNS7Z+bnpJbKFnFlnZi+DkVDE6oNPhrteiT9dYUTLceG NXA6ftrKV6eHg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1BB48C5AD4E; Mon, 10 Aug 2026 09:39:15 +0000 (UTC) From: Fan Ye via B4 Relay Subject: [PATCH net v2 0/2] net: thunderbolt: two fixes for the failed bring-up path Date: Mon, 10 Aug 2026 09:39:13 +0000 Message-Id: <20260810-b4-tbnet-hopid-v2-0-0eee557e75df@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAEGceWoC/yWMQQ6CMBREr0JmzU+aBhC9imFByyCfRSFtNSaEu 1t1+Sbz3oHEqEy4VQciX5p0CwVsXcEvY3hQdCoMa2xnenMV10h2gVmWbddJOvqZbXOxo2tRpD1 y1vcveEe5YfiP6elW+vxN4Tw/5u6bRXcAAAA= X-Change-ID: 20260809-b4-tbnet-hopid-6ecfe5472ab5 To: Jakub Kicinski , Eric Dumazet , "David S. Miller" , Paolo Abeni , Andrew Lunn , Mika Westerberg , Yehezkel Bernat Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Andy Shevchenko , stable@vger.kernel.org, Fan Ye , Mika Westerberg X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1786354753; l=2343; i=fy15309206903@gmail.com; s=tbnet3; h=from:subject:message-id; bh=kpIzBYnGhMxnNzCGjzKJGDhLkwD5p5mSCjBmV3EJz/c=; b=nHq5YooN1UEcpr+92aEe/u8ESxjjG4GECg1jSdyqU5rYf9aCGe5/RETMOgGSeYQpOjYPourRk tWnm6v0sDDrDJUkGmG65pNKcdCrDolJ4SnQA4Ba0/rXmpgfmcSCGMSj X-Developer-Key: i=fy15309206903@gmail.com; a=ed25519; pk=6QsQIrI/kruYWIJyCH9ntPMXsHCqF5JtK/DCMtOCzdc= X-Endpoint-Received: by B4 Relay for fy15309206903@gmail.com/tbnet3 with auth_id=929 X-Original-From: Fan Ye Reply-To: fy15309206903@gmail.com Both of these are reached through the same branch in tbnet_connected_work(), on an ASMedia ASM4242 host-to-host link, when the peer drops out while a connection is being brought up. Cycling the interface down and up 200 times over 80 minutes hits that branch 23 times across the two hosts, with no fault injection. They fix two separate defects and neither depends on the other for correctness - each leaves the other's defect in place. Patch 2 does edit the lines patch 1 adds, so it will not apply on its own and has to come second. 1 releases the HopID the allocator actually handed out when it is not the one that was asked for. Today that id is simply left allocated for the rest of the XDomain connection. 2 marks the connection as no longer established on the failure paths, so the next tbnet_tear_down() does not run a second teardown over work that was already undone. That second teardown stops rings that were never started, which is a WARNING splat and is fatal under panic_on_warn, and it hands back a HopID this connection never owned. Measured on two ASM4242 hosts from a cold boot, no module reloads, only the thunderbolt-net module differing between the runs: without with failed to allocate Rx HopID 11 / 12 9 / 13 ring already stopped + WARNING 22 / 24 0 / 0 (host A / host B) Two further patches from the same investigation touch drivers/thunderbolt/ and go to the thunderbolt tree separately. Per-patch notes, including what I am not claiming, are below the cut in each patch. Changes in v2: - Add the Assisted-by tag Mika asked for. No code change from v1. - Pick up Mika's Acked-by on both patches. - Link to v1: https://lore.kernel.org/netdev/20260809-b4-tbnet-hopid-v1-0-9a8c7f5f0ba9@gmail.com/ --- Fan Ye (2): net: thunderbolt: Release the Rx HopID that was handed out on mismatch net: thunderbolt: Mark the connection down when bringing it up fails drivers/net/thunderbolt/main.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) --- base-commit: db2ddb87143519e20a95aa36c60b36107b736a58 change-id: 20260809-b4-tbnet-hopid-6ecfe5472ab5 Best regards, -- Fan Ye