On Mon, Sep 26, 2022 at 10:17:33AM +0200, Oleksij Rempel wrote:
> Do not reset MDIO devices. Device drivers should handle it.
> 
> Signed-off-by: Oleksij Rempel <[email protected]>
> ---
>  drivers/net/phy/mdio_bus.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
> index f06ab68f50..a68b0e47c0 100644
> --- a/drivers/net/phy/mdio_bus.c
> +++ b/drivers/net/phy/mdio_bus.c
> @@ -263,12 +263,13 @@ static int of_mdiobus_register(struct mii_bus *mdio, 
> struct device_node *np)
>               }
>  
>               of_pinctrl_select_state_default(child);
> -             of_mdiobus_reset_phy(mdio, child);
>  
> -             if (of_mdiobus_child_is_phy(child))
> +             if (of_mdiobus_child_is_phy(child)) {
> +                     of_mdiobus_reset_phy(mdio, child);
>                       of_mdiobus_register_phy(mdio, child, addr);
> -             else
> +             } else {
>                       of_mdiobus_register_device(mdio, child, addr);
> +             }
>       }
>  
>       return 0;
> -- 
> 2.30.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Reply via email to