Skip to content

Commit 11ecf34

Browse files
vladimirolteankuba-moo
authored andcommitted
net: dsa: ocelot: accept 1000base-X for VSC9959 and VSC9953
Switches using the Lynx PCS driver support 1000base-X optical SFP modules. Accept this interface type on a port. Signed-off-by: Vladimir Oltean <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent b57c7e8 commit 11ecf34

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

drivers/net/dsa/ocelot/felix.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,6 +1008,7 @@ static const u32 felix_phy_match_table[PHY_INTERFACE_MODE_MAX] = {
10081008
[PHY_INTERFACE_MODE_SGMII] = OCELOT_PORT_MODE_SGMII,
10091009
[PHY_INTERFACE_MODE_QSGMII] = OCELOT_PORT_MODE_QSGMII,
10101010
[PHY_INTERFACE_MODE_USXGMII] = OCELOT_PORT_MODE_USXGMII,
1011+
[PHY_INTERFACE_MODE_1000BASEX] = OCELOT_PORT_MODE_1000BASEX,
10111012
[PHY_INTERFACE_MODE_2500BASEX] = OCELOT_PORT_MODE_2500BASEX,
10121013
};
10131014

drivers/net/dsa/ocelot/felix.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#define OCELOT_PORT_MODE_QSGMII BIT(2)
1313
#define OCELOT_PORT_MODE_2500BASEX BIT(3)
1414
#define OCELOT_PORT_MODE_USXGMII BIT(4)
15+
#define OCELOT_PORT_MODE_1000BASEX BIT(5)
1516

1617
/* Platform-specific information */
1718
struct felix_info {

drivers/net/dsa/ocelot/felix_vsc9959.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
#define VSC9959_PORT_MODE_SERDES (OCELOT_PORT_MODE_SGMII | \
3030
OCELOT_PORT_MODE_QSGMII | \
31+
OCELOT_PORT_MODE_1000BASEX | \
3132
OCELOT_PORT_MODE_2500BASEX | \
3233
OCELOT_PORT_MODE_USXGMII)
3334

@@ -973,6 +974,7 @@ static void vsc9959_phylink_validate(struct ocelot *ocelot, int port,
973974
phylink_set(mask, 100baseT_Full);
974975
phylink_set(mask, 1000baseT_Half);
975976
phylink_set(mask, 1000baseT_Full);
977+
phylink_set(mask, 1000baseX_Full);
976978

977979
if (state->interface == PHY_INTERFACE_MODE_INTERNAL ||
978980
state->interface == PHY_INTERFACE_MODE_2500BASEX ||

drivers/net/dsa/ocelot/seville_vsc9953.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
#define VSC9953_VCAP_POLICER_BASE2 120
2222
#define VSC9953_VCAP_POLICER_MAX2 161
2323

24-
#define VSC9953_PORT_MODE_SERDES (OCELOT_PORT_MODE_SGMII | \
24+
#define VSC9953_PORT_MODE_SERDES (OCELOT_PORT_MODE_1000BASEX | \
25+
OCELOT_PORT_MODE_SGMII | \
2526
OCELOT_PORT_MODE_QSGMII)
2627

2728
static const u32 vsc9953_port_modes[VSC9953_NUM_PORTS] = {
@@ -947,6 +948,7 @@ static void vsc9953_phylink_validate(struct ocelot *ocelot, int port,
947948
phylink_set(mask, 100baseT_Full);
948949
phylink_set(mask, 100baseT_Half);
949950
phylink_set(mask, 1000baseT_Full);
951+
phylink_set(mask, 1000baseX_Full);
950952

951953
if (state->interface == PHY_INTERFACE_MODE_INTERNAL) {
952954
phylink_set(mask, 2500baseT_Full);

0 commit comments

Comments
 (0)