Re: [PATCH net v1] mlxbf-gige: Support workaround for MDIO GPIO degradation bug

From: Andrew Lunn
Date: Wed Jul 02 2025 - 17:27:13 EST


> > You need to put the MDIO bus device into its own pm_domain. Try
> > calling dev_pm_domain_set() to separate the MDIO bus from the MAC
> > driver in terms of power domains. ethtool will then power on/off the
> > MAC but leave the MDIO bus alone.
> >

> Using dev_pm_domain_set() has the same effect as SET_RUNTIME_PM_OPS. The dev struct is shared so ethtool is still calling the suspend/resume.
>
> int mlxbf_gige_mdio_probe(struct platform_device *pdev, struct mlxbf_gige *priv)
> {
> struct device *dev = &pdev->dev;
> @@ -390,14 +418,27 @@ int mlxbf_gige_mdio_probe(struct platform_device *pdev, struct mlxbf_gige *priv)
> snprintf(priv->mdiobus->id, MII_BUS_ID_SIZE, "%s",
> dev_name(dev));
>
> + pm_runtime_set_autosuspend_delay(priv->mdiobus->parent, 100);
> + pm_runtime_use_autosuspend(priv->mdiobus->parent);

Why parent?

Andrew