net: phy: Fix logic around gmiitorgmii wiring

There is no reason to try to connect gmii2rgmii bridge if fixed phy is
detected already. Check phydev before gmii2rgmii bridge is connected.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This commit is contained in:
Michal Simek
2018-12-21 08:35:30 +01:00
parent 4a29139e68
commit ab4ddeeb38

View File

@@ -959,7 +959,8 @@ struct phy_device *phy_connect(struct mii_dev *bus, int addr,
phydev = phy_connect_fixed(bus, dev, interface);
#endif
#ifdef CONFIG_PHY_XILINX_GMII2RGMII
phydev = phy_connect_gmii2rgmii(bus, dev, interface);
if (!phydev)
phydev = phy_connect_gmii2rgmii(bus, dev, interface);
#endif
if (!phydev)