Commit d5c1c936 authored by David S. Miller's avatar David S. Miller

Merge branch 'amd-xgbe-next'

Tom Lendacky says:

====================
amd-xgbe: Remove baseT workaround for fixed speeds

The following series expands the speed/duplex settings array in phy.c
to support additional media types. With this expansion the workaround
in the amd-xgbe driver to set/remove baseT media types based on whether
auto negotiation is enabled can be removed.

This patch series is based on net-next.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents bfde3398 6964e970
...@@ -331,16 +331,6 @@ static int xgbe_set_settings(struct net_device *netdev, ...@@ -331,16 +331,6 @@ static int xgbe_set_settings(struct net_device *netdev,
(cmd->duplex != DUPLEX_FULL))) (cmd->duplex != DUPLEX_FULL)))
goto unlock; goto unlock;
if (cmd->autoneg == AUTONEG_ENABLE) {
/* Clear settings needed to force speeds */
phydev->supported &= ~SUPPORTED_1000baseT_Full;
phydev->supported &= ~SUPPORTED_10000baseT_Full;
} else {
/* Add settings needed to force speed */
phydev->supported |= SUPPORTED_1000baseT_Full;
phydev->supported |= SUPPORTED_10000baseT_Full;
}
cmd->advertising &= phydev->supported; cmd->advertising &= phydev->supported;
if ((cmd->autoneg == AUTONEG_ENABLE) && !cmd->advertising) if ((cmd->autoneg == AUTONEG_ENABLE) && !cmd->advertising)
goto unlock; goto unlock;
......
...@@ -375,10 +375,6 @@ int xgbe_mdio_register(struct xgbe_prv_data *pdata) ...@@ -375,10 +375,6 @@ int xgbe_mdio_register(struct xgbe_prv_data *pdata)
phydev->autoneg = pdata->default_autoneg; phydev->autoneg = pdata->default_autoneg;
if (phydev->autoneg == AUTONEG_DISABLE) { if (phydev->autoneg == AUTONEG_DISABLE) {
/* Add settings needed to force speed */
phydev->supported |= SUPPORTED_1000baseT_Full;
phydev->supported |= SUPPORTED_10000baseT_Full;
phydev->speed = pdata->default_speed; phydev->speed = pdata->default_speed;
phydev->duplex = DUPLEX_FULL; phydev->duplex = DUPLEX_FULL;
......
...@@ -138,10 +138,30 @@ struct phy_setting { ...@@ -138,10 +138,30 @@ struct phy_setting {
/* A mapping of all SUPPORTED settings to speed/duplex */ /* A mapping of all SUPPORTED settings to speed/duplex */
static const struct phy_setting settings[] = { static const struct phy_setting settings[] = {
{ {
.speed = 10000, .speed = SPEED_10000,
.duplex = DUPLEX_FULL,
.setting = SUPPORTED_10000baseKR_Full,
},
{
.speed = SPEED_10000,
.duplex = DUPLEX_FULL,
.setting = SUPPORTED_10000baseKX4_Full,
},
{
.speed = SPEED_10000,
.duplex = DUPLEX_FULL, .duplex = DUPLEX_FULL,
.setting = SUPPORTED_10000baseT_Full, .setting = SUPPORTED_10000baseT_Full,
}, },
{
.speed = SPEED_2500,
.duplex = DUPLEX_FULL,
.setting = SUPPORTED_2500baseX_Full,
},
{
.speed = SPEED_1000,
.duplex = DUPLEX_FULL,
.setting = SUPPORTED_1000baseKX_Full,
},
{ {
.speed = SPEED_1000, .speed = SPEED_1000,
.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