diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/net/phy/adin.c | 4 | ||||
| -rw-r--r-- | drivers/net/phy/at803x.c | 4 | ||||
| -rw-r--r-- | drivers/net/phy/dp83822.c | 5 | ||||
| -rw-r--r-- | drivers/net/phy/dp83848.c | 11 | ||||
| -rw-r--r-- | drivers/net/phy/dp83tc811.c | 4 | ||||
| -rw-r--r-- | drivers/net/phy/meson-gxl.c | 2 | ||||
| -rw-r--r-- | drivers/net/phy/microchip.c | 1 | ||||
| -rw-r--r-- | drivers/net/phy/microchip_t1.c | 1 | ||||
| -rw-r--r-- | drivers/net/phy/mscc.c | 4 | ||||
| -rw-r--r-- | drivers/net/phy/phy_device.c | 51 | ||||
| -rw-r--r-- | drivers/net/phy/vitesse.c | 6 |
11 files changed, 9 insertions, 84 deletions
diff --git a/drivers/net/phy/adin.c b/drivers/net/phy/adin.c index ac79e16cd7f1..4dec83df048d 100644 --- a/drivers/net/phy/adin.c +++ b/drivers/net/phy/adin.c | |||
| @@ -356,10 +356,6 @@ static int adin_config_init(struct phy_device *phydev) | |||
| 356 | 356 | ||
| 357 | phydev->mdix_ctrl = ETH_TP_MDI_AUTO; | 357 | phydev->mdix_ctrl = ETH_TP_MDI_AUTO; |
| 358 | 358 | ||
| 359 | rc = genphy_config_init(phydev); | ||
| 360 | if (rc < 0) | ||
| 361 | return rc; | ||
| 362 | |||
| 363 | rc = adin_config_rgmii_mode(phydev); | 359 | rc = adin_config_rgmii_mode(phydev); |
| 364 | if (rc < 0) | 360 | if (rc < 0) |
| 365 | return rc; | 361 | return rc; |
diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c index 222ccd9ecfce..d98aa56710a9 100644 --- a/drivers/net/phy/at803x.c +++ b/drivers/net/phy/at803x.c | |||
| @@ -249,10 +249,6 @@ static int at803x_config_init(struct phy_device *phydev) | |||
| 249 | { | 249 | { |
| 250 | int ret; | 250 | int ret; |
| 251 | 251 | ||
| 252 | ret = genphy_config_init(phydev); | ||
| 253 | if (ret < 0) | ||
| 254 | return ret; | ||
| 255 | |||
| 256 | /* The RX and TX delay default is: | 252 | /* The RX and TX delay default is: |
| 257 | * after HW reset: RX delay enabled and TX delay disabled | 253 | * after HW reset: RX delay enabled and TX delay disabled |
| 258 | * after SW reset: RX delay enabled, while TX delay retains the | 254 | * after SW reset: RX delay enabled, while TX delay retains the |
diff --git a/drivers/net/phy/dp83822.c b/drivers/net/phy/dp83822.c index 7ed4760fb155..8a4b1d167ce2 100644 --- a/drivers/net/phy/dp83822.c +++ b/drivers/net/phy/dp83822.c | |||
| @@ -254,13 +254,8 @@ static int dp83822_config_intr(struct phy_device *phydev) | |||
| 254 | 254 | ||
| 255 | static int dp83822_config_init(struct phy_device *phydev) | 255 | static int dp83822_config_init(struct phy_device *phydev) |
| 256 | { | 256 | { |
| 257 | int err; | ||
| 258 | int value; | 257 | int value; |
| 259 | 258 | ||
| 260 | err = genphy_config_init(phydev); | ||
| 261 | if (err < 0) | ||
| 262 | return err; | ||
| 263 | |||
| 264 | value = DP83822_WOL_MAGIC_EN | DP83822_WOL_SECURE_ON | DP83822_WOL_EN; | 259 | value = DP83822_WOL_MAGIC_EN | DP83822_WOL_SECURE_ON | DP83822_WOL_EN; |
| 265 | 260 | ||
| 266 | return phy_write_mmd(phydev, DP83822_DEVADDR, MII_DP83822_WOL_CFG, | 261 | return phy_write_mmd(phydev, DP83822_DEVADDR, MII_DP83822_WOL_CFG, |
diff --git a/drivers/net/phy/dp83848.c b/drivers/net/phy/dp83848.c index 6f9bc7d91f17..54c7c1b44e4d 100644 --- a/drivers/net/phy/dp83848.c +++ b/drivers/net/phy/dp83848.c | |||
| @@ -68,13 +68,8 @@ static int dp83848_config_intr(struct phy_device *phydev) | |||
| 68 | 68 | ||
| 69 | static int dp83848_config_init(struct phy_device *phydev) | 69 | static int dp83848_config_init(struct phy_device *phydev) |
| 70 | { | 70 | { |
| 71 | int err; | ||
| 72 | int val; | 71 | int val; |
| 73 | 72 | ||
| 74 | err = genphy_config_init(phydev); | ||
| 75 | if (err < 0) | ||
| 76 | return err; | ||
| 77 | |||
| 78 | /* DP83620 always reports Auto Negotiation Ability on BMSR. Instead, | 73 | /* DP83620 always reports Auto Negotiation Ability on BMSR. Instead, |
| 79 | * we check initial value of BMCR Auto negotiation enable bit | 74 | * we check initial value of BMCR Auto negotiation enable bit |
| 80 | */ | 75 | */ |
| @@ -113,13 +108,13 @@ MODULE_DEVICE_TABLE(mdio, dp83848_tbl); | |||
| 113 | 108 | ||
| 114 | static struct phy_driver dp83848_driver[] = { | 109 | static struct phy_driver dp83848_driver[] = { |
| 115 | DP83848_PHY_DRIVER(TI_DP83848C_PHY_ID, "TI DP83848C 10/100 Mbps PHY", | 110 | DP83848_PHY_DRIVER(TI_DP83848C_PHY_ID, "TI DP83848C 10/100 Mbps PHY", |
| 116 | genphy_config_init), | 111 | NULL), |
| 117 | DP83848_PHY_DRIVER(NS_DP83848C_PHY_ID, "NS DP83848C 10/100 Mbps PHY", | 112 | DP83848_PHY_DRIVER(NS_DP83848C_PHY_ID, "NS DP83848C 10/100 Mbps PHY", |
| 118 | genphy_config_init), | 113 | NULL), |
| 119 | DP83848_PHY_DRIVER(TI_DP83620_PHY_ID, "TI DP83620 10/100 Mbps PHY", | 114 | DP83848_PHY_DRIVER(TI_DP83620_PHY_ID, "TI DP83620 10/100 Mbps PHY", |
| 120 | dp83848_config_init), | 115 | dp83848_config_init), |
| 121 | DP83848_PHY_DRIVER(TLK10X_PHY_ID, "TI TLK10X 10/100 Mbps PHY", | 116 | DP83848_PHY_DRIVER(TLK10X_PHY_ID, "TI TLK10X 10/100 Mbps PHY", |
| 122 | genphy_config_init), | 117 | NULL), |
| 123 | }; | 118 | }; |
| 124 | module_phy_driver(dp83848_driver); | 119 | module_phy_driver(dp83848_driver); |
| 125 | 120 | ||
diff --git a/drivers/net/phy/dp83tc811.c b/drivers/net/phy/dp83tc811.c index ac27da16824d..06f08832ebcd 100644 --- a/drivers/net/phy/dp83tc811.c +++ b/drivers/net/phy/dp83tc811.c | |||
| @@ -277,10 +277,6 @@ static int dp83811_config_init(struct phy_device *phydev) | |||
| 277 | { | 277 | { |
| 278 | int value, err; | 278 | int value, err; |
| 279 | 279 | ||
| 280 | err = genphy_config_init(phydev); | ||
| 281 | if (err < 0) | ||
| 282 | return err; | ||
| 283 | |||
| 284 | value = phy_read(phydev, MII_DP83811_SGMII_CTRL); | 280 | value = phy_read(phydev, MII_DP83811_SGMII_CTRL); |
| 285 | if (phydev->interface == PHY_INTERFACE_MODE_SGMII) { | 281 | if (phydev->interface == PHY_INTERFACE_MODE_SGMII) { |
| 286 | err = phy_write(phydev, MII_DP83811_SGMII_CTRL, | 282 | err = phy_write(phydev, MII_DP83811_SGMII_CTRL, |
diff --git a/drivers/net/phy/meson-gxl.c b/drivers/net/phy/meson-gxl.c index fa80d6dce8ee..e8f2ca625837 100644 --- a/drivers/net/phy/meson-gxl.c +++ b/drivers/net/phy/meson-gxl.c | |||
| @@ -136,7 +136,7 @@ static int meson_gxl_config_init(struct phy_device *phydev) | |||
| 136 | if (ret) | 136 | if (ret) |
| 137 | return ret; | 137 | return ret; |
| 138 | 138 | ||
| 139 | return genphy_config_init(phydev); | 139 | return 0; |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | /* This function is provided to cope with the possible failures of this phy | 142 | /* This function is provided to cope with the possible failures of this phy |
diff --git a/drivers/net/phy/microchip.c b/drivers/net/phy/microchip.c index eb1b3287fe08..a644e8e5071c 100644 --- a/drivers/net/phy/microchip.c +++ b/drivers/net/phy/microchip.c | |||
| @@ -305,7 +305,6 @@ static int lan88xx_config_init(struct phy_device *phydev) | |||
| 305 | { | 305 | { |
| 306 | int val; | 306 | int val; |
| 307 | 307 | ||
| 308 | genphy_config_init(phydev); | ||
| 309 | /*Zerodetect delay enable */ | 308 | /*Zerodetect delay enable */ |
| 310 | val = phy_read_mmd(phydev, MDIO_MMD_PCS, | 309 | val = phy_read_mmd(phydev, MDIO_MMD_PCS, |
| 311 | PHY_ARDENNES_MMD_DEV_3_PHY_CFG); | 310 | PHY_ARDENNES_MMD_DEV_3_PHY_CFG); |
diff --git a/drivers/net/phy/microchip_t1.c b/drivers/net/phy/microchip_t1.c index 3d09b471632c..001def4509c2 100644 --- a/drivers/net/phy/microchip_t1.c +++ b/drivers/net/phy/microchip_t1.c | |||
| @@ -48,7 +48,6 @@ static struct phy_driver microchip_t1_phy_driver[] = { | |||
| 48 | 48 | ||
| 49 | .features = PHY_BASIC_T1_FEATURES, | 49 | .features = PHY_BASIC_T1_FEATURES, |
| 50 | 50 | ||
| 51 | .config_init = genphy_config_init, | ||
| 52 | .config_aneg = genphy_config_aneg, | 51 | .config_aneg = genphy_config_aneg, |
| 53 | 52 | ||
| 54 | .ack_interrupt = lan87xx_phy_ack_interrupt, | 53 | .ack_interrupt = lan87xx_phy_ack_interrupt, |
diff --git a/drivers/net/phy/mscc.c b/drivers/net/phy/mscc.c index 645d354ffb48..7ada1fd9ca71 100644 --- a/drivers/net/phy/mscc.c +++ b/drivers/net/phy/mscc.c | |||
| @@ -1725,7 +1725,7 @@ static int vsc8584_config_init(struct phy_device *phydev) | |||
| 1725 | return ret; | 1725 | return ret; |
| 1726 | } | 1726 | } |
| 1727 | 1727 | ||
| 1728 | return genphy_config_init(phydev); | 1728 | return 0; |
| 1729 | 1729 | ||
| 1730 | err: | 1730 | err: |
| 1731 | mutex_unlock(&phydev->mdio.bus->mdio_lock); | 1731 | mutex_unlock(&phydev->mdio.bus->mdio_lock); |
| @@ -1767,7 +1767,7 @@ static int vsc85xx_config_init(struct phy_device *phydev) | |||
| 1767 | return rc; | 1767 | return rc; |
| 1768 | } | 1768 | } |
| 1769 | 1769 | ||
| 1770 | return genphy_config_init(phydev); | 1770 | return 0; |
| 1771 | } | 1771 | } |
| 1772 | 1772 | ||
| 1773 | static int vsc8584_did_interrupt(struct phy_device *phydev) | 1773 | static int vsc8584_did_interrupt(struct phy_device *phydev) |
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 9c546bae9ec9..d5db7604d7c4 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c | |||
| @@ -1885,57 +1885,6 @@ int genphy_soft_reset(struct phy_device *phydev) | |||
| 1885 | } | 1885 | } |
| 1886 | EXPORT_SYMBOL(genphy_soft_reset); | 1886 | EXPORT_SYMBOL(genphy_soft_reset); |
| 1887 | 1887 | ||
| 1888 | int genphy_config_init(struct phy_device *phydev) | ||
| 1889 | { | ||
| 1890 | int val; | ||
| 1891 | __ETHTOOL_DECLARE_LINK_MODE_MASK(features) = { 0, }; | ||
| 1892 | |||
| 1893 | linkmode_set_bit_array(phy_basic_ports_array, | ||
| 1894 | ARRAY_SIZE(phy_basic_ports_array), | ||
| 1895 | features); | ||
| 1896 | linkmode_set_bit(ETHTOOL_LINK_MODE_Pause_BIT, features); | ||
| 1897 | linkmode_set_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, features); | ||
| 1898 | |||
| 1899 | /* Do we support autonegotiation? */ | ||
| 1900 | val = phy_read(phydev, MII_BMSR); | ||
| 1901 | if (val < 0) | ||
| 1902 | return val; | ||
| 1903 | |||
| 1904 | if (val & BMSR_ANEGCAPABLE) | ||
| 1905 | linkmode_set_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, features); | ||
| 1906 | |||
| 1907 | if (val & BMSR_100FULL) | ||
| 1908 | linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT, features); | ||
| 1909 | if (val & BMSR_100HALF) | ||
| 1910 | linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Half_BIT, features); | ||
| 1911 | if (val & BMSR_10FULL) | ||
| 1912 | linkmode_set_bit(ETHTOOL_LINK_MODE_10baseT_Full_BIT, features); | ||
| 1913 | if (val & BMSR_10HALF) | ||
| 1914 | linkmode_set_bit(ETHTOOL_LINK_MODE_10baseT_Half_BIT, features); | ||
| 1915 | |||
| 1916 | if (val & BMSR_ESTATEN) { | ||
| 1917 | val = phy_read(phydev, MII_ESTATUS); | ||
| 1918 | if (val < 0) | ||
| 1919 | return val; | ||
| 1920 | |||
| 1921 | if (val & ESTATUS_1000_TFULL) | ||
| 1922 | linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT, | ||
| 1923 | features); | ||
| 1924 | if (val & ESTATUS_1000_THALF) | ||
| 1925 | linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseT_Half_BIT, | ||
| 1926 | features); | ||
| 1927 | if (val & ESTATUS_1000_XFULL) | ||
| 1928 | linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseX_Full_BIT, | ||
| 1929 | features); | ||
| 1930 | } | ||
| 1931 | |||
| 1932 | linkmode_and(phydev->supported, phydev->supported, features); | ||
| 1933 | linkmode_and(phydev->advertising, phydev->advertising, features); | ||
| 1934 | |||
| 1935 | return 0; | ||
| 1936 | } | ||
| 1937 | EXPORT_SYMBOL(genphy_config_init); | ||
| 1938 | |||
| 1939 | /** | 1888 | /** |
| 1940 | * genphy_read_abilities - read PHY abilities from Clause 22 registers | 1889 | * genphy_read_abilities - read PHY abilities from Clause 22 registers |
| 1941 | * @phydev: target phy_device struct | 1890 | * @phydev: target phy_device struct |
diff --git a/drivers/net/phy/vitesse.c b/drivers/net/phy/vitesse.c index 43691b1acfd9..bb680352708a 100644 --- a/drivers/net/phy/vitesse.c +++ b/drivers/net/phy/vitesse.c | |||
| @@ -197,7 +197,7 @@ static int vsc738x_config_init(struct phy_device *phydev) | |||
| 197 | 197 | ||
| 198 | vsc73xx_config_init(phydev); | 198 | vsc73xx_config_init(phydev); |
| 199 | 199 | ||
| 200 | return genphy_config_init(phydev); | 200 | return 0; |
| 201 | } | 201 | } |
| 202 | 202 | ||
| 203 | static int vsc739x_config_init(struct phy_device *phydev) | 203 | static int vsc739x_config_init(struct phy_device *phydev) |
| @@ -229,7 +229,7 @@ static int vsc739x_config_init(struct phy_device *phydev) | |||
| 229 | 229 | ||
| 230 | vsc73xx_config_init(phydev); | 230 | vsc73xx_config_init(phydev); |
| 231 | 231 | ||
| 232 | return genphy_config_init(phydev); | 232 | return 0; |
| 233 | } | 233 | } |
| 234 | 234 | ||
| 235 | static int vsc73xx_config_aneg(struct phy_device *phydev) | 235 | static int vsc73xx_config_aneg(struct phy_device *phydev) |
| @@ -267,7 +267,7 @@ static int vsc8601_config_init(struct phy_device *phydev) | |||
| 267 | if (ret < 0) | 267 | if (ret < 0) |
| 268 | return ret; | 268 | return ret; |
| 269 | 269 | ||
| 270 | return genphy_config_init(phydev); | 270 | return 0; |
| 271 | } | 271 | } |
| 272 | 272 | ||
| 273 | static int vsc824x_ack_interrupt(struct phy_device *phydev) | 273 | static int vsc824x_ack_interrupt(struct phy_device *phydev) |
