diff mbox series

[net-next,1/2] net: stmmac: Add support for multiple phy interface for integrated PCS

Message ID 20240524130653.30666-2-quic_snehshah@quicinc.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series net: stmmac: Add 2500BASEX support for integrated PCS | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit fail Errors and warnings before: 56 this patch: 56
netdev/build_tools success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 3 maintainers not CCed: xiaolei.wang@windriver.com horms@kernel.org bartosz.golaszewski@linaro.org
netdev/build_clang fail Errors and warnings before: 36 this patch: 36
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn fail Errors and warnings before: 57 this patch: 57
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 16 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 38 this patch: 38
netdev/source_inline success Was 0 now: 0

Commit Message

Sneh Shah May 24, 2024, 1:06 p.m. UTC
In case of integrated PCS ethernet does't have external PCS driver.
Currently stmmac supports multiple phy interfaces if there is external PCS.
Add a function to support mupliple phy interfaces when PCS is integrated.

Signed-off-by: Sneh Shah <quic_snehshah@quicinc.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +++
 include/linux/stmmac.h                            | 1 +
 2 files changed, 4 insertions(+)

Comments

Andrew Lunn May 24, 2024, 3:59 p.m. UTC | #1
On Fri, May 24, 2024 at 06:36:52PM +0530, Sneh Shah wrote:
> In case of integrated PCS ethernet does't have external PCS driver.
> Currently stmmac supports multiple phy interfaces if there is external PCS.
> Add a function to support mupliple phy interfaces when PCS is integrated.

s/mupliple/multiple.

	Andrew
diff mbox series

Patch

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index fe3498e86de9..765332627ad0 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -1231,6 +1231,9 @@  static int stmmac_phy_setup(struct stmmac_priv *priv)
 	 */
 	__set_bit(mode, priv->phylink_config.supported_interfaces);
 
+	if (priv->plat->get_interfaces)
+		priv->plat->get_interfaces(priv);
+
 	/* If we have an xpcs, it defines which PHY interfaces are supported. */
 	if (priv->hw->xpcs)
 		xpcs_get_interfaces(priv->hw->xpcs,
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
index dfa1828cd756..66f8205b331e 100644
--- a/include/linux/stmmac.h
+++ b/include/linux/stmmac.h
@@ -278,6 +278,7 @@  struct plat_stmmacenet_data {
 	void (*serdes_powerdown)(struct net_device *ndev, void *priv);
 	void (*speed_mode_2500)(struct net_device *ndev, void *priv);
 	void (*ptp_clk_freq_config)(struct stmmac_priv *priv);
+	void (*get_interfaces)(struct stmmac_priv *priv);
 	int (*init)(struct platform_device *pdev, void *priv);
 	void (*exit)(struct platform_device *pdev, void *priv);
 	struct mac_device_info *(*setup)(void *priv);