@@ -1222,9 +1222,12 @@ static int stmmac_phy_setup(struct stmmac_priv *priv)
priv->phylink_config.mac_managed_pm = true;
mdio_bus_data = priv->plat->mdio_bus_data;
- if (mdio_bus_data)
+ if (mdio_bus_data) {
priv->phylink_config.ovr_an_inband =
mdio_bus_data->xpcs_an_inband;
+ priv->phylink_config.allow_switch_interface =
+ mdio_bus_data->allow_switch_interface;
+ }
/* Set the platform/firmware specified interface mode. Note, phylink
* deals with the PHY interface mode, not the MAC interface mode.
@@ -87,6 +87,7 @@ struct stmmac_mdio_bus_data {
int *irqs;
int probed_phy_irq;
bool needs_reset;
+ bool allow_switch_interface;
};
struct stmmac_dma_cfg {
Provide the allow_switch_interface flag to indicate the platform supports interface mode switching. Signed-off-by: Choong Yong Liang <yong.liang.choong@linux.intel.com> --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 ++++- include/linux/stmmac.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-)