* [PATCH net-next] net: dsa: microchip: enable SGMII port for KSZ9897
@ 2026-07-03 6:37 Tapio Reijonen
2026-07-20 23:33 ` Jakub Kicinski
0 siblings, 1 reply; 2+ messages in thread
From: Tapio Reijonen @ 2026-07-03 6:37 UTC (permalink / raw)
To: Woojung Huh, UNGLinuxDriver, Andrew Lunn, Vladimir Oltean,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Russell King
Cc: netdev, linux-kernel, Tapio Reijonen
The KSZ9897 has an SGMII/1000BASE-X capable port 7, but its chip_info
entry never set .sgmii_port. As a result ksz_has_sgmii_port() is false,
ksz9477_pcs_create() is never called, and ksz9477_phylink_mac_select_pcs()
returns NULL for port 7, so no PCS is ever instantiated and a
phy-mode = "sgmii" or "1000base-x" link on that port cannot come up.
The KSZ9897 shares the KSZ9477 register layout and operations
(ksz9477_dev_ops, ksz9477_regs) and reaches its port-7 PCS through the
same SPI-indirect XPCS register window. The register-identical LAN9646
already enables this via .sgmii_port = 7. Set the same for the KSZ9897
so the XPCS instance is created and 1000BASE-X / SGMII links on port 7
negotiate correctly.
Tested on a KSZ9897 with a 1000BASE-X fibre SFP wired directly to
port 7: the link negotiates at 1Gbps/full duplex and passes traffic.
Signed-off-by: Tapio Reijonen <tapio.reijonen@vaisala.com>
---
drivers/net/dsa/microchip/ksz_common.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
index d1726778bb488e424aed450fb02c8fe4b332a1f4..718c72206ab451cb4c5e88fc91a5eae4892518b7 100644
--- a/drivers/net/dsa/microchip/ksz_common.c
+++ b/drivers/net/dsa/microchip/ksz_common.c
@@ -1591,6 +1591,7 @@ const struct ksz_chip_data ksz_switch_chips[] = {
.internal_phy = {true, true, true, true,
true, false, false},
.gbit_capable = {true, true, true, true, true, true, true},
+ .sgmii_port = 7,
},
[KSZ9893] = {
---
base-commit: 322008f87f917e2217eeac386a9410945092eb2e
change-id: 20260703-ksz9897-sgmii-port-48ddb100e015
Best regards,
--
Tapio Reijonen <tapio.reijonen@vaisala.com>
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH net-next] net: dsa: microchip: enable SGMII port for KSZ9897
2026-07-03 6:37 [PATCH net-next] net: dsa: microchip: enable SGMII port for KSZ9897 Tapio Reijonen
@ 2026-07-20 23:33 ` Jakub Kicinski
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2026-07-20 23:33 UTC (permalink / raw)
To: Tapio Reijonen
Cc: Woojung Huh, UNGLinuxDriver, Andrew Lunn, Vladimir Oltean,
David S. Miller, Eric Dumazet, Paolo Abeni, Russell King, netdev,
linux-kernel
On Fri, 03 Jul 2026 06:37:28 +0000 Tapio Reijonen wrote:
> The KSZ9897 has an SGMII/1000BASE-X capable port 7, but its chip_info
> entry never set .sgmii_port. As a result ksz_has_sgmii_port() is false,
> ksz9477_pcs_create() is never called, and ksz9477_phylink_mac_select_pcs()
> returns NULL for port 7, so no PCS is ever instantiated and a
> phy-mode = "sgmii" or "1000base-x" link on that port cannot come up.
The netdev patch queue has overflown, if this patch is necessary you
will have to repost it.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-20 23:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-03 6:37 [PATCH net-next] net: dsa: microchip: enable SGMII port for KSZ9897 Tapio Reijonen
2026-07-20 23:33 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox