From: Fan Ye via B4 Relay <devnull+fy15309206903.gmail.com@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>,
Eric Dumazet <edumazet@google.com>,
"David S. Miller" <davem@davemloft.net>,
Paolo Abeni <pabeni@redhat.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Mika Westerberg <westeri@kernel.org>,
Yehezkel Bernat <YehezkelShB@gmail.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
stable@vger.kernel.org, Fan Ye <fy15309206903@gmail.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>
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 [thread overview]
Message-ID: <20260810-b4-tbnet-hopid-v2-0-0eee557e75df@gmail.com> (raw)
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 <fy15309206903@gmail.com>
next reply other threads:[~2026-08-10 9:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 9:39 Fan Ye via B4 Relay [this message]
2026-08-10 9:39 ` [PATCH net v2 1/2] net: thunderbolt: Release the Rx HopID that was handed out on mismatch Fan Ye via B4 Relay
2026-08-10 18:56 ` Andy Shevchenko
2026-08-10 9:39 ` [PATCH net v2 2/2] net: thunderbolt: Mark the connection down when bringing it up fails Fan Ye via B4 Relay
2026-08-10 18:57 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260810-b4-tbnet-hopid-v2-0-0eee557e75df@gmail.com \
--to=devnull+fy15309206903.gmail.com@kernel.org \
--cc=YehezkelShB@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=andriy.shevchenko@linux.intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fy15309206903@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
--cc=westeri@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox