* [PATCH net] net: dpaa: always set a valid mode I/F mode
@ 2026-07-06 12:08 Michael Walle
0 siblings, 0 replies; only message in thread
From: Michael Walle @ 2026-07-06 12:08 UTC (permalink / raw)
To: Madalin Bucur, Sean Anderson, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: netdev, linux-kernel, Michael Walle
Before converting to the phylink interface, the init function would have
set the correct mode in the maccfg2. After converting, init will just
set 0 as the mode. According to the "QorIQ Data Path Acceleration
Architecture (DPAA) Reference Manual", this is a reserved value. In
fact, this will prevent the PCS to establish a link to a connected SGMII
PHY. In turn, mac_link_up() is never called. Fix it by setting a
non-reserved mode; mac_link_up() will then set the correct mode later.
Fixes: 5d93cfcf7360 ("net: dpaa: Convert to phylink")
Signed-off-by: Michael Walle <mwalle@kernel.org>
---
FWIW, I've tested this with a Marvell 88E1112 PHY.
drivers/net/ethernet/freescale/fman/fman_dtsec.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/fman/fman_dtsec.c b/drivers/net/ethernet/freescale/fman/fman_dtsec.c
index fe35703c509e..566921d3a884 100644
--- a/drivers/net/ethernet/freescale/fman/fman_dtsec.c
+++ b/drivers/net/ethernet/freescale/fman/fman_dtsec.c
@@ -402,7 +402,10 @@ static int init(struct dtsec_regs __iomem *regs, struct dtsec_cfg *cfg,
tmp |= MACCFG1_TX_FLOW;
iowrite32be(tmp, ®s->maccfg1);
- tmp = 0;
+ /* write a non-reserved mode, otherwise the PCS won't establish a link
+ * and .mac_link_up() is never called.
+ */
+ tmp = MACCFG2_NIBBLE_MODE;
tmp |= (cfg->preamble_len << MACCFG2_PREAMBLE_LENGTH_SHIFT) &
MACCFG2_PREAMBLE_LENGTH_MASK;
--
2.47.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-06 12:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-06 12:08 [PATCH net] net: dpaa: always set a valid mode I/F mode Michael Walle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox