]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: stmmac: handle integrated PCS phy_intf_sel separately
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Fri, 30 Jan 2026 11:10:36 +0000 (11:10 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 3 Feb 2026 03:16:02 +0000 (19:16 -0800)
commit69a586e8866b0c49cfc5592da50d67b3cbfa45f4
treeb0eec73af5b6e7731621e5d5eaf31d8947f7a693
parenteb4a1fda2c2fc72a86a724030cfc519565486d04
net: stmmac: handle integrated PCS phy_intf_sel separately

The dwmac core has no support for SGMII without using its integrated
PCS. Thus, PHY_INTF_SEL_SGMII is only supported when this block is
present, and it makes no sense for stmmac_get_phy_intf_sel() to decode
this.

None of the platform glue users that use stmmac_get_phy_intf_sel()
directly accept PHY_INTF_SEL_SGMII as a valid mode.

Check whether a PCS will be used by the driver for the interface mode,
and if it is the integrated PCS, query the integrated PCS for the
phy_intf_sel_i value to use.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tested-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
Link: https://patch.msgid.link/E1vlmOa-00000006zvB-1fIe@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
drivers/net/ethernet/stmicro/stmmac/stmmac_pcs.c
drivers/net/ethernet/stmicro/stmmac/stmmac_pcs.h