]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
bcmgenet, sun8i_emac: Don't connect PHY two times
authorMarek Behún <marek.behun@nic.cz>
Wed, 6 Apr 2022 22:33:07 +0000 (00:33 +0200)
committerRamon Fried <ramon@neureality.ai>
Sun, 10 Apr 2022 05:44:13 +0000 (08:44 +0300)
The bcmgenet and sun8i_emac drivers call phy_connect(), which finds /
creates the PHY and also connects it to the eth device via
phy_connect_dev(), then set some phydev members (bcmgenet only), and
then call phy_connect_dev() explicitly again.

Drop the second phy_connect_dev(), since it is unnecesary.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
drivers/net/bcmgenet.c
drivers/net/sun8i_emac.c

index ef321f283999621b12c99971833f438a85d7f127..4e1f8ed7a4ad5555091fd2374c133c623e95d4e2 100644 (file)
@@ -526,8 +526,6 @@ static int bcmgenet_phy_init(struct bcmgenet_eth_priv *priv, void *dev)
        }
        phydev->advertising = phydev->supported;
 
-       phy_connect_dev(phydev, dev);
-
        priv->phydev = phydev;
        phy_config(priv->phydev);
 
index 5943a5e3f0a81cb88e8d1bfd2b6b1ff97eebb488..906a8ec5d0948c274be31c6bb4cfe45966d6b732 100644 (file)
@@ -391,8 +391,6 @@ static int sun8i_phy_init(struct emac_eth_dev *priv, void *dev)
        if (!phydev)
                return -ENODEV;
 
-       phy_connect_dev(phydev, dev);
-
        priv->phydev = phydev;
        phy_config(priv->phydev);