Commit 3c6b59d6 authored by Andrew Lunn's avatar Andrew Lunn Committed by David S. Miller

net: phy: Add more link modes to the settings table

Now that PHYs and MAC can support more than 32 bit masks, add link
modes which are > 31 to the PHY settings table.
Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fe191914
...@@ -62,6 +62,124 @@ EXPORT_SYMBOL_GPL(phy_duplex_to_str); ...@@ -62,6 +62,124 @@ EXPORT_SYMBOL_GPL(phy_duplex_to_str);
* must be grouped by speed and sorted in descending match priority * must be grouped by speed and sorted in descending match priority
* - iow, descending speed. */ * - iow, descending speed. */
static const struct phy_setting settings[] = { static const struct phy_setting settings[] = {
/* 100G */
{
.speed = SPEED_100000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT,
},
{
.speed = SPEED_100000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_100000baseKR4_Full_BIT,
},
{
.speed = SPEED_100000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT,
},
{
.speed = SPEED_100000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_100000baseSR4_Full_BIT,
},
/* 56G */
{
.speed = SPEED_56000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_56000baseCR4_Full_BIT,
},
{
.speed = SPEED_56000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_56000baseKR4_Full_BIT,
},
{
.speed = SPEED_56000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_56000baseLR4_Full_BIT,
},
{
.speed = SPEED_56000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_56000baseSR4_Full_BIT,
},
/* 50G */
{
.speed = SPEED_50000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_50000baseCR2_Full_BIT,
},
{
.speed = SPEED_50000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_50000baseKR2_Full_BIT,
},
{
.speed = SPEED_50000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT,
},
/* 40G */
{
.speed = SPEED_40000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_40000baseCR4_Full_BIT,
},
{
.speed = SPEED_40000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_40000baseKR4_Full_BIT,
},
{
.speed = SPEED_40000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_40000baseLR4_Full_BIT,
},
{
.speed = SPEED_40000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_40000baseSR4_Full_BIT,
},
/* 25G */
{
.speed = SPEED_25000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_25000baseCR_Full_BIT,
},
{
.speed = SPEED_25000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_25000baseKR_Full_BIT,
},
{
.speed = SPEED_25000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_25000baseSR_Full_BIT,
},
/* 20G */
{
.speed = SPEED_20000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_20000baseKR2_Full_BIT,
},
{
.speed = SPEED_20000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_20000baseMLD2_Full_BIT,
},
/* 10G */
{
.speed = SPEED_10000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_10000baseCR_Full_BIT,
},
{
.speed = SPEED_10000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_10000baseER_Full_BIT,
},
{ {
.speed = SPEED_10000, .speed = SPEED_10000,
.duplex = DUPLEX_FULL, .duplex = DUPLEX_FULL,
...@@ -72,25 +190,54 @@ static const struct phy_setting settings[] = { ...@@ -72,25 +190,54 @@ static const struct phy_setting settings[] = {
.duplex = DUPLEX_FULL, .duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_10000baseKX4_Full_BIT, .bit = ETHTOOL_LINK_MODE_10000baseKX4_Full_BIT,
}, },
{
.speed = SPEED_10000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_10000baseLR_Full_BIT,
},
{
.speed = SPEED_10000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_10000baseLRM_Full_BIT,
},
{
.speed = SPEED_10000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_10000baseR_FEC_BIT,
},
{
.speed = SPEED_10000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_10000baseSR_Full_BIT,
},
{ {
.speed = SPEED_10000, .speed = SPEED_10000,
.duplex = DUPLEX_FULL, .duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_10000baseT_Full_BIT, .bit = ETHTOOL_LINK_MODE_10000baseT_Full_BIT,
}, },
/* 5G */
{
.speed = SPEED_5000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_5000baseT_Full_BIT,
},
/* 2.5G */
{ {
.speed = SPEED_2500, .speed = SPEED_2500,
.duplex = DUPLEX_FULL, .duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_2500baseX_Full_BIT, .bit = ETHTOOL_LINK_MODE_2500baseT_Full_BIT,
}, },
{ {
.speed = SPEED_1000, .speed = SPEED_2500,
.duplex = DUPLEX_FULL, .duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_1000baseKX_Full_BIT, .bit = ETHTOOL_LINK_MODE_2500baseX_Full_BIT,
}, },
/* 1G */
{ {
.speed = SPEED_1000, .speed = SPEED_1000,
.duplex = DUPLEX_FULL, .duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_1000baseX_Full_BIT, .bit = ETHTOOL_LINK_MODE_1000baseKX_Full_BIT,
}, },
{ {
.speed = SPEED_1000, .speed = SPEED_1000,
...@@ -102,6 +249,12 @@ static const struct phy_setting settings[] = { ...@@ -102,6 +249,12 @@ static const struct phy_setting settings[] = {
.duplex = DUPLEX_HALF, .duplex = DUPLEX_HALF,
.bit = ETHTOOL_LINK_MODE_1000baseT_Half_BIT, .bit = ETHTOOL_LINK_MODE_1000baseT_Half_BIT,
}, },
{
.speed = SPEED_1000,
.duplex = DUPLEX_FULL,
.bit = ETHTOOL_LINK_MODE_1000baseX_Full_BIT,
},
/* 100M */
{ {
.speed = SPEED_100, .speed = SPEED_100,
.duplex = DUPLEX_FULL, .duplex = DUPLEX_FULL,
...@@ -112,6 +265,7 @@ static const struct phy_setting settings[] = { ...@@ -112,6 +265,7 @@ static const struct phy_setting settings[] = {
.duplex = DUPLEX_HALF, .duplex = DUPLEX_HALF,
.bit = ETHTOOL_LINK_MODE_100baseT_Half_BIT, .bit = ETHTOOL_LINK_MODE_100baseT_Half_BIT,
}, },
/* 10M */
{ {
.speed = SPEED_10, .speed = SPEED_10,
.duplex = DUPLEX_FULL, .duplex = DUPLEX_FULL,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment