From: Stepan Svatenko <ssvatenko@iit.org.ua>
To: Raju.Rangoju@amd.com, PrashanthKumar.K.R@amd.com
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
Stepan Svatenko <ssvatenko@iit.org.ua>
Subject: [PATCH net 0/2] amd-xgbe: fix two PHY/IRQ lifecycle bugs found on SolidRun Bedrock V3000
Date: Fri, 28 Aug 2026 12:20:21 +0300 [thread overview]
Message-ID: <20260828092023.105405-1-ssvatenko@iit.org.ua> (raw)
These two bugs were found while debugging SFP-related failures on a
SolidRun Bedrock V3000 (AMD Ryzen Embedded V3C48), on kernels 6.15.5,
6.18 and 7.0. Both are longstanding (dating back to when the affected
code was originally added) and independent of each other, but touch
related PHY/IRQ lifecycle paths in the same driver, so sending them
together:
1/2 fixes a self-deadlock: xgbe_phy_sfp_detect() holds
xgbe_phy_comm_lock across a call chain that can re-enter the
driver's own MDIO read/write callbacks, which take the same
mutex. Triggered by removing an SFP module while an external
PHY is attached; confirmed hung via the kernel hung-task
detector (368s+ blocked).
2/2 fixes an IRQ leak: xgbe_phy_start() can return an error after
already registering its AN/PCS interrupt, without freeing it
or clearing state, if xgbe_phy_config_aneg() fails (e.g.
against a non-functional SFP module). Any later retry then
hits -EBUSY requesting the same still-registered IRQ forever,
with no recovery short of a power cycle.
Both were hardware-tested on a SolidRun Bedrock V3000 running 6.15.5
with these fixes applied: repeated SFP insert/remove and interface
up/down cycles, including with a non-functional module, no longer
trigger the hang or the -EBUSY loop. The code paths touched by both
patches are byte-for-byte unchanged between 6.15.5 and the tree this
series is generated against, so the same fix applies directly here.
Stepan Svatenko (2):
amd-xgbe: fix comm_ownership mutex deadlock on SFP module removal
amd-xgbe: fix an_irq leak causing permanent -EBUSY on PHY (re)start
drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 14 ++++++-
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 41 ++++++++++++++++-----
2 files changed, 45 insertions(+), 10 deletions(-)
--
2.55.0
next reply other threads:[~2026-08-28 9:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-28 9:20 Stepan Svatenko [this message]
2026-08-28 9:20 ` [PATCH net 1/2] amd-xgbe: fix comm_ownership mutex deadlock on SFP module removal Stepan Svatenko
2026-09-03 2:40 ` Jakub Kicinski
2026-09-18 14:22 ` [PATCH v2] " Stepan Svatenko
2026-09-22 14:39 ` netdev-bot+sashiko
2026-08-28 9:20 ` [PATCH net 2/2] amd-xgbe: fix an_irq leak causing permanent -EBUSY on PHY (re)start Stepan Svatenko
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=20260828092023.105405-1-ssvatenko@iit.org.ua \
--to=ssvatenko@iit.org.ua \
--cc=PrashanthKumar.K.R@amd.com \
--cc=Raju.Rangoju@amd.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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
all inboxes | Powered by JetHome®