diff options
author | David S. Miller <davem@davemloft.net> | 2018-11-12 02:57:54 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-12 02:57:54 +0100 |
commit | 2b9b7502dfcb6169dbf3359702953bf756b4e273 (patch) | |
tree | 58ab22096d49de6a0e049cf1267edc34b82916dc /drivers/net/phy/broadcom.c | |
parent | PCI: add USR vendor id and use it in r8169 and w6692 driver (diff) | |
parent | Linux 4.20-rc2 (diff) | |
download | linux-2b9b7502dfcb6169dbf3359702953bf756b4e273.tar.xz linux-2b9b7502dfcb6169dbf3359702953bf756b4e273.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/net/phy/broadcom.c')
-rw-r--r-- | drivers/net/phy/broadcom.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c index c73e265cd907..aa73c5cc5f86 100644 --- a/drivers/net/phy/broadcom.c +++ b/drivers/net/phy/broadcom.c @@ -92,7 +92,7 @@ static int bcm54612e_config_init(struct phy_device *phydev) return 0; } -static int bcm5481x_config(struct phy_device *phydev) +static int bcm54xx_config_clock_delay(struct phy_device *phydev) { int rc, val; @@ -429,7 +429,7 @@ static int bcm5481_config_aneg(struct phy_device *phydev) ret = genphy_config_aneg(phydev); /* Then we can set up the delay. */ - bcm5481x_config(phydev); + bcm54xx_config_clock_delay(phydev); if (of_property_read_bool(np, "enet-phy-lane-swap")) { /* Lane Swap - Undocumented register...magic! */ @@ -442,6 +442,19 @@ static int bcm5481_config_aneg(struct phy_device *phydev) return ret; } +static int bcm54616s_config_aneg(struct phy_device *phydev) +{ + int ret; + + /* Aneg firsly. */ + ret = genphy_config_aneg(phydev); + + /* Then we can set up the delay. */ + bcm54xx_config_clock_delay(phydev); + + return ret; +} + static int brcm_phy_setbits(struct phy_device *phydev, int reg, int set) { int val; @@ -630,6 +643,7 @@ static struct phy_driver broadcom_drivers[] = { .name = "Broadcom BCM54616S", .features = PHY_GBIT_FEATURES, .config_init = bcm54xx_config_init, + .config_aneg = bcm54616s_config_aneg, .ack_interrupt = bcm_phy_ack_intr, .config_intr = bcm_phy_config_intr, }, { |