Skip to content

Commit

Permalink
net: phy: remove gen10g_config_init
Browse files Browse the repository at this point in the history
ETHTOOL_LINK_MODE_10000baseT_Full_BIT is set anyway in the supported
and advertising bitmap because it's part of PHY_10GBIT_FEATURES.
And all users of gen10g_config_init use PHY_10GBIT_FEATURES.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Heiner Kallweit authored and David S. Miller committed Mar 4, 2019
1 parent a6d0aa9 commit c5e91d3
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 17 deletions.
1 change: 0 additions & 1 deletion drivers/net/phy/cortina.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ static struct phy_driver cortina_driver[] = {
.phy_id_mask = 0xffffffff,
.name = "Cortina CS4340",
.features = PHY_10GBIT_FEATURES,
.config_init = gen10g_config_init,
.config_aneg = gen10g_config_aneg,
.read_status = cortina_read_status,
.soft_reset = gen10g_no_soft_reset,
Expand Down
14 changes: 0 additions & 14 deletions drivers/net/phy/phy-c45.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,25 +516,11 @@ int gen10g_no_soft_reset(struct phy_device *phydev)
}
EXPORT_SYMBOL_GPL(gen10g_no_soft_reset);

int gen10g_config_init(struct phy_device *phydev)
{
/* Temporarily just say we support everything */
linkmode_zero(phydev->supported);

linkmode_set_bit(ETHTOOL_LINK_MODE_10000baseT_Full_BIT,
phydev->supported);
linkmode_copy(phydev->advertising, phydev->supported);

return 0;
}
EXPORT_SYMBOL_GPL(gen10g_config_init);

struct phy_driver genphy_10g_driver = {
.phy_id = 0xffffffff,
.phy_id_mask = 0xffffffff,
.name = "Generic 10G PHY",
.soft_reset = gen10g_no_soft_reset,
.config_init = gen10g_config_init,
.features = PHY_10GBIT_FEATURES,
.config_aneg = gen10g_config_aneg,
.read_status = gen10g_read_status,
Expand Down
1 change: 0 additions & 1 deletion drivers/net/phy/teranetics.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ static struct phy_driver teranetics_driver[] = {
.features = PHY_10GBIT_FEATURES,
.soft_reset = gen10g_no_soft_reset,
.aneg_done = teranetics_aneg_done,
.config_init = gen10g_config_init,
.config_aneg = gen10g_config_aneg,
.read_status = teranetics_read_status,
.match_phy_device = teranetics_match_phy_device,
Expand Down
1 change: 0 additions & 1 deletion include/linux/phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,6 @@ int genphy_c45_read_status(struct phy_device *phydev);
int gen10g_config_aneg(struct phy_device *phydev);
int gen10g_read_status(struct phy_device *phydev);
int gen10g_no_soft_reset(struct phy_device *phydev);
int gen10g_config_init(struct phy_device *phydev);

static inline int phy_read_status(struct phy_device *phydev)
{
Expand Down

0 comments on commit c5e91d3

Please sign in to comment.