]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: phy: dp83867: Explicitly check against sgmii
authorNishanth Menon <nm@ti.com>
Fri, 14 Apr 2023 22:06:43 +0000 (17:06 -0500)
committerTom Rini <trini@konsulko.com>
Fri, 5 May 2023 21:48:44 +0000 (17:48 -0400)
dp83867 driver only supports sgmii and not all the newer protocols.
Drop the usage of the generic phy_interface_is_sgmii function and just
matchup to the specific mode supported.

Reported-by: Tom Rini <trini@konsulko.com>
Suggested-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Suggested-by: Marek BehĂșn <kabel@kernel.org>
Link: https://lore.kernel.org/all/b82ac325-4818-8e72-054b-640268dbf806@mailbox.org/
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
drivers/net/phy/dp83867.c

index b861bf7cef369ee2eae36f07327f7b4405087b11..7111e36aa0d06a9d2c7555c509a35aa261b0e3cb 100644 (file)
@@ -330,7 +330,7 @@ static int dp83867_config(struct phy_device *phydev)
                              DP83867_RGMIIDCTL, delay);
        }
 
-       if (phy_interface_is_sgmii(phydev)) {
+       if (phydev->interface == PHY_INTERFACE_MODE_SGMII) {
                if (dp83867->sgmii_ref_clk_en)
                        phy_write_mmd(phydev, DP83867_DEVADDR, DP83867_SGMIICTL,
                                      DP83867_SGMII_TYPE);