aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/mscc.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-11-24 20:01:43 -0500
committerDavid S. Miller <davem@davemloft.net>2018-11-24 20:01:43 -0500
commitb1bf78bfb2e4c9ffa03ccdbc60d89a2f7c5fd82c (patch)
treefcd93c3f54a72ca6a6ee97f015efebe6d80a3271 /drivers/net/phy/mscc.c
parentaea0a897af9e44c258e8ab9296fad417f1bc063a (diff)
parentd146194f31c96f9b260c5a1cf1592d2e7f82a2e2 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/net/phy/mscc.c')
-rw-r--r--drivers/net/phy/mscc.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/net/phy/mscc.c b/drivers/net/phy/mscc.c
index 62269e578718..cfe680f78a3f 100644
--- a/drivers/net/phy/mscc.c
+++ b/drivers/net/phy/mscc.c
@@ -810,17 +810,13 @@ static int vsc85xx_default_config(struct phy_device *phydev)
810 810
811 phydev->mdix_ctrl = ETH_TP_MDI_AUTO; 811 phydev->mdix_ctrl = ETH_TP_MDI_AUTO;
812 mutex_lock(&phydev->lock); 812 mutex_lock(&phydev->lock);
813 rc = phy_select_page(phydev, MSCC_PHY_PAGE_EXTENDED_2);
814 if (rc < 0)
815 goto out_unlock;
816 813
817 reg_val = phy_read(phydev, MSCC_PHY_RGMII_CNTL); 814 reg_val = RGMII_RX_CLK_DELAY_1_1_NS << RGMII_RX_CLK_DELAY_POS;
818 reg_val &= ~(RGMII_RX_CLK_DELAY_MASK); 815
819 reg_val |= (RGMII_RX_CLK_DELAY_1_1_NS << RGMII_RX_CLK_DELAY_POS); 816 rc = phy_modify_paged(phydev, MSCC_PHY_PAGE_EXTENDED_2,
820 phy_write(phydev, MSCC_PHY_RGMII_CNTL, reg_val); 817 MSCC_PHY_RGMII_CNTL, RGMII_RX_CLK_DELAY_MASK,
818 reg_val);
821 819
822out_unlock:
823 rc = phy_restore_page(phydev, rc, rc > 0 ? 0 : rc);
824 mutex_unlock(&phydev->lock); 820 mutex_unlock(&phydev->lock);
825 821
826 return rc; 822 return rc;