From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: linux-phy@lists.infradead.org
Cc: netdev@vger.kernel.org, Ioana Ciornei <ioana.ciornei@nxp.com>,
Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Josua Mayer <josua@solid-run.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH phy 1/8] phy: lynx-28g: skip CDR lock workaround for lanes disabled in the device tree
Date: Wed, 14 Jan 2026 17:21:04 +0200 [thread overview]
Message-ID: <20260114152111.625350-2-vladimir.oltean@nxp.com> (raw)
In-Reply-To: <20260114152111.625350-1-vladimir.oltean@nxp.com>
The blamed commit introduced support for specifying individual lanes as
OF nodes in the device, and these can have status = "disabled".
When that happens, for_each_available_child_of_node() skips them and
lynx_28g_probe_lane() -> devm_phy_create() is not called, so lane->phy
will be NULL. Yet it will be dereferenced in lynx_28g_cdr_lock_check(),
resulting in a crash.
This used to be well handled in v3 of that patch:
https://lore.kernel.org/linux-phy/20250926180505.760089-14-vladimir.oltean@nxp.com/
but until v5 was merged, the logic to support per-lane OF nodes was
split into a separate change, and the per-SoC compatible strings patch
was deferred to a "part 2" set. The splitting was done improperly, and
that handling of NULL lane->phy pointers was not integrated into the
proper commit.
Fixes: 7df7d58abbd6 ("phy: lynx-28g: support individual lanes as OF PHY providers")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
part 1 -> part 2: patch is "new"
drivers/phy/freescale/phy-fsl-lynx-28g.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/phy/freescale/phy-fsl-lynx-28g.c b/drivers/phy/freescale/phy-fsl-lynx-28g.c
index 2b0fd95ba62f..63427fc34e26 100644
--- a/drivers/phy/freescale/phy-fsl-lynx-28g.c
+++ b/drivers/phy/freescale/phy-fsl-lynx-28g.c
@@ -1069,6 +1069,8 @@ static void lynx_28g_cdr_lock_check(struct work_struct *work)
for (i = 0; i < LYNX_28G_NUM_LANE; i++) {
lane = &priv->lane[i];
+ if (!lane->phy)
+ continue;
mutex_lock(&lane->phy->mutex);
--
2.34.1
next prev parent reply other threads:[~2026-01-14 15:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-14 15:21 [PATCH phy 0/8] Lynx 28G improvements part 2 Vladimir Oltean
2026-01-14 15:21 ` Vladimir Oltean [this message]
2026-01-14 15:21 ` [PATCH phy 2/8] dt-bindings: phy: lynx-28g: add compatible strings per SerDes and instantiation Vladimir Oltean
2026-01-15 19:52 ` Rob Herring (Arm)
2026-01-14 15:21 ` [PATCH phy 3/8] dt-bindings: phy: lynx-28g: add constraint on LX2162A lane indices Vladimir Oltean
2026-01-14 15:21 ` [PATCH phy 4/8] phy: lynx-28g: probe on per-SoC and per-instance compatible strings Vladimir Oltean
2026-01-14 15:21 ` [PATCH phy 5/8] phy: lynx-28g: add support for 25GBASER Vladimir Oltean
2026-01-14 15:21 ` [PATCH phy 6/8] phy: lynx-28g: use timeouts when waiting for lane halt and reset Vladimir Oltean
2026-01-14 15:21 ` [PATCH phy 7/8] phy: lynx-28g: truly power the lanes up or down Vladimir Oltean
2026-01-14 15:21 ` [PATCH phy 8/8] phy: lynx-28g: implement phy_exit() operation Vladimir Oltean
2026-02-02 15:03 ` [PATCH phy 0/8] Lynx 28G improvements part 2 Vladimir Oltean
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=20260114152111.625350-2-vladimir.oltean@nxp.com \
--to=vladimir.oltean@nxp.com \
--cc=ioana.ciornei@nxp.com \
--cc=josua@solid-run.com \
--cc=kishon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=neil.armstrong@linaro.org \
--cc=netdev@vger.kernel.org \
--cc=vkoul@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
all inboxes | Powered by JetHome®