| diff --git a/drivers/net/phy/marvell10g.c b/drivers/net/phy/marvell10g.c |
| index daed73a..7d080d5 100644 |
| --- a/drivers/net/phy/marvell10g.c |
| +++ b/drivers/net/phy/marvell10g.c |
| @@ -516,6 +516,7 @@ static void mv3310_update_interface(struct phy_device *phydev) |
| |
| if ((phydev->interface == PHY_INTERFACE_MODE_SGMII || |
| phydev->interface == PHY_INTERFACE_MODE_2500BASEX || |
| + phydev->interface == PHY_INTERFACE_MODE_5GBASER || |
| phydev->interface == PHY_INTERFACE_MODE_10GKR) && phydev->link) { |
| /* The PHY automatically switches its serdes interface (and |
| * active PHYXS instance) between Cisco SGMII, 10GBase-KR and |
| @@ -527,6 +528,9 @@ static void mv3310_update_interface(struct phy_device *phydev) |
| case SPEED_10000: |
| phydev->interface = PHY_INTERFACE_MODE_10GKR; |
| break; |
| + case SPEED_5000: |
| + phydev->interface = PHY_INTERFACE_MODE_5GBASER; |
| + break; |
| case SPEED_2500: |
| phydev->interface = PHY_INTERFACE_MODE_2500BASEX; |
| break; |
| diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c |
| index b3f25a9..6a38a1c 100644 |
| --- a/drivers/net/phy/phylink.c |
| +++ b/drivers/net/phy/phylink.c |
| @@ -299,6 +299,10 @@ static int phylink_parse_mode(struct phylink *pl, struct fwnode_handle *fwnode) |
| phylink_set(pl->supported, 2500baseX_Full); |
| break; |
| |
| + case PHY_INTERFACE_MODE_5GBASER: |
| + phylink_set(pl->supported, 5000baseT_Full); |
| + break; |
| + |
| case PHY_INTERFACE_MODE_10GKR: |
| phylink_set(pl->supported, 10baseT_Half); |
| phylink_set(pl->supported, 10baseT_Full); |
| diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c |
| index 0d5ac2a..a702c9b 100644 |
| --- a/drivers/net/phy/sfp-bus.c |
| +++ b/drivers/net/phy/sfp-bus.c |
| @@ -302,6 +302,9 @@ phy_interface_t sfp_select_interface(struct sfp_bus *bus, |
| phylink_test(link_modes, 10000baseT_Full)) |
| return PHY_INTERFACE_MODE_10GKR; |
| |
| + if (phylink_test(link_modes, 5000baseT_Full)) |
| + return PHY_INTERFACE_MODE_5GBASER; |
| + |
| if (phylink_test(link_modes, 2500baseX_Full)) |
| return PHY_INTERFACE_MODE_2500BASEX; |
| |
| diff --git a/include/linux/phy.h b/include/linux/phy.h |
| index 34bdd16..77fad08 100644 |
| --- a/include/linux/phy.h |
| +++ b/include/linux/phy.h |
| @@ -98,6 +98,7 @@ typedef enum { |
| PHY_INTERFACE_MODE_TRGMII, |
| PHY_INTERFACE_MODE_1000BASEX, |
| PHY_INTERFACE_MODE_2500BASEX, |
| + PHY_INTERFACE_MODE_5GBASER, |
| PHY_INTERFACE_MODE_RXAUI, |
| PHY_INTERFACE_MODE_XAUI, |
| /* 10GBASE-KR, XFI, SFI - single lane 10G Serdes */ |
| @@ -172,6 +173,8 @@ static inline const char *phy_modes(phy_interface_t interface) |
| return "1000base-x"; |
| case PHY_INTERFACE_MODE_2500BASEX: |
| return "2500base-x"; |
| + case PHY_INTERFACE_MODE_5GBASER: |
| + return "5gbase-r"; |
| case PHY_INTERFACE_MODE_RXAUI: |
| return "rxaui"; |
| case PHY_INTERFACE_MODE_XAUI: |