diff options
author | Phil Edworthy <PHIL.EDWORTHY@renesas.com> | 2016-12-09 10:46:02 +0000 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2017-02-07 10:54:33 -0600 |
commit | 8abdeadc5c48e79d0ff37cf2215654a7e6866704 (patch) | |
tree | d03b3557e5523a904dc11703a1b7f3fc372e9673 /drivers | |
parent | c25f01a63ac21ddfa522d972b09a0e9e5ab4b4cd (diff) | |
download | u-boot-imx-8abdeadc5c48e79d0ff37cf2215654a7e6866704.zip u-boot-imx-8abdeadc5c48e79d0ff37cf2215654a7e6866704.tar.gz u-boot-imx-8abdeadc5c48e79d0ff37cf2215654a7e6866704.tar.bz2 |
net: phy: ti: Fix dp83867 RGMII_TXID interface path
There is code that is specifically for RGMII_TXID interface, but this
will never get used because the code checks that the RGMII interface
is RGMII_ID to RGMII_RXID; RGMII_TXID is after this.
To fix this and avoid similar problems in the future, use the
phy_interface_is_rgmii helper function.
Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/phy/ti.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/phy/ti.c b/drivers/net/phy/ti.c index c55dd97..5e2b2dd 100644 --- a/drivers/net/phy/ti.c +++ b/drivers/net/phy/ti.c @@ -246,8 +246,7 @@ static int dp83867_config(struct phy_device *phydev) phy_write(phydev, MDIO_DEVAD_NONE, MII_DP83867_BISCR, 0x0); } - if ((phydev->interface >= PHY_INTERFACE_MODE_RGMII_ID) && - (phydev->interface <= PHY_INTERFACE_MODE_RGMII_RXID)) { + if (phy_interface_is_rgmii(phydev)) { val = phy_read_mmd_indirect(phydev, DP83867_RGMIICTL, DP83867_DEVADDR, phydev->addr); |