Skip to content

Commit cb28f70

Browse files
robimarkodavem330
authored andcommitted
net: phy: qcom: qca808x: fill in possible_interfaces
Currently QCA808x driver does not fill the possible_interfaces. 2.5G QCA808x support SGMII and 2500Base-X while 1G model only supports SGMII, so fill the possible_interfaces accordingly. Signed-off-by: Robert Marko <[email protected]> Reviewed-by: Russell King (Oracle) <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent f058b2d commit cb28f70

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

drivers/net/phy/qcom/qca808x.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,16 @@ static bool qca808x_is_1g_only(struct phy_device *phydev)
167167
return !!(QCA808X_PHY_CHIP_TYPE_1G & ret);
168168
}
169169

170+
static void qca808x_fill_possible_interfaces(struct phy_device *phydev)
171+
{
172+
unsigned long *possible = phydev->possible_interfaces;
173+
174+
__set_bit(PHY_INTERFACE_MODE_SGMII, possible);
175+
176+
if (!qca808x_is_1g_only(phydev))
177+
__set_bit(PHY_INTERFACE_MODE_2500BASEX, possible);
178+
}
179+
170180
static int qca808x_probe(struct phy_device *phydev)
171181
{
172182
struct device *dev = &phydev->mdio.dev;
@@ -231,6 +241,8 @@ static int qca808x_config_init(struct phy_device *phydev)
231241
}
232242
}
233243

244+
qca808x_fill_possible_interfaces(phydev);
245+
234246
/* Configure adc threshold as 100mv for the link 10M */
235247
return at803x_debug_reg_mask(phydev, QCA808X_PHY_DEBUG_ADC_THRESHOLD,
236248
QCA808X_ADC_THRESHOLD_MASK,

0 commit comments

Comments
 (0)