summaryrefslogtreecommitdiff
path: root/drivers/net/phy/marvell10g.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/phy/marvell10g.c')
-rw-r--r--drivers/net/phy/marvell10g.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/phy/marvell10g.c b/drivers/net/phy/marvell10g.c
index 6317f94577bc..07524046531e 100644
--- a/drivers/net/phy/marvell10g.c
+++ b/drivers/net/phy/marvell10g.c
@@ -778,6 +778,7 @@ static int mv3310_config_init(struct phy_device *phydev)
{
struct mv3310_priv *priv = dev_get_drvdata(&phydev->mdio.dev);
const struct mv3310_chip *chip = to_mv3310_chip(phydev);
+ unsigned long *possible;
int err, mactype;
/* Check that the PHY interface type is compatible */
@@ -802,6 +803,18 @@ static int mv3310_config_init(struct phy_device *phydev)
priv->mactype = &chip->mactypes[mactype];
+ possible = phydev->possible_interfaces;
+ phy_interface_zero(possible);
+
+ if (priv->mactype->interface_10g != PHY_INTERFACE_MODE_NA)
+ __set_bit(priv->mactype->interface_10g, possible);
+
+ if (!priv->mactype->fixed_interface) {
+ __set_bit(PHY_INTERFACE_MODE_5GBASER, possible);
+ __set_bit(PHY_INTERFACE_MODE_2500BASEX, possible);
+ __set_bit(PHY_INTERFACE_MODE_SGMII, possible);
+ }
+
/* Enable EDPD mode - saving 600mW */
err = mv3310_set_edpd(phydev, ETHTOOL_PHY_EDPD_DFLT_TX_MSECS);
if (err)