[PATCH] net: phy: dp83867: Do not check sgmii if rgmii is already used

Michal Simek michal.simek at xilinx.com
Fri Feb 7 12:31:52 CET 2020


There is no reason to check sgmii branch again when it is clear that phy
interface is rgmii.

Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---

 drivers/net/phy/dp83867.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c
index 4d796e289c45..3178787ff1c7 100644
--- a/drivers/net/phy/dp83867.c
+++ b/drivers/net/phy/dp83867.c
@@ -327,9 +327,7 @@ static int dp83867_config(struct phy_device *phydev)
 
 		phy_write_mmd(phydev, DP83867_DEVADDR,
 			      DP83867_RGMIIDCTL, delay);
-	}
-
-	if (phy_interface_is_sgmii(phydev)) {
+	} else if (phy_interface_is_sgmii(phydev)) {
 		phy_write(phydev, MDIO_DEVAD_NONE, MII_BMCR,
 			  (BMCR_ANENABLE | BMCR_FULLDPLX | BMCR_SPEED1000));
 
-- 
2.25.0



More information about the U-Boot mailing list