|
@@ -131,6 +131,7 @@ static int mtk_phy_connect(struct mtk_mac *mac)
|
|
|
}
|
|
|
} else if (eth->mii_bus) {
|
|
|
struct phy_device *phy;
|
|
|
+
|
|
|
phy = mdiobus_get_phy(eth->mii_bus, i);
|
|
|
if (phy) {
|
|
|
phy_init(eth, mac, phy);
|
|
@@ -162,6 +163,7 @@ static void mtk_phy_disconnect(struct mtk_mac *mac)
|
|
|
phy_disconnect(eth->phy->phy[i]);
|
|
|
} else if (eth->mii_bus) {
|
|
|
struct phy_device *phy = mdiobus_get_phy(eth->mii_bus, i);
|
|
|
+
|
|
|
if (phy)
|
|
|
phy_detach(phy);
|
|
|
}
|