diff options
author | Lendacky, Thomas <Thomas.Lendacky@amd.com> | 2014-07-29 08:57:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-30 18:46:52 -0700 |
commit | f047604a3ff1a1d7c8bd4a43c72de3936d71f3c1 (patch) | |
tree | b6be5c759f18a8961bdabfbaacbed12ad1363419 /drivers/net/ethernet | |
parent | 23e4eef7cf56b5e36e76af9078f0012826c86b2f (diff) | |
download | linux-f047604a3ff1a1d7c8bd4a43c72de3936d71f3c1.tar.bz2 |
amd-xgbe: Update/fix 2.5GbE support
Update the amd-xgbe driver and phylib driver to better support
the 2.5GbE mode for the hardware. In order to be able establish
2.5GbE using clause 73 auto negotiation the device will support
speed sets of 1GbE/10GbE and 2.5GbE/10GbE.
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c index 4961666fa55f..6005b6021f78 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c @@ -327,10 +327,19 @@ static int xgbe_set_settings(struct net_device *netdev, (cmd->autoneg != AUTONEG_DISABLE)) goto unlock; - if ((cmd->autoneg == AUTONEG_DISABLE) && - (((speed != SPEED_10000) && (speed != SPEED_1000)) || - (cmd->duplex != DUPLEX_FULL))) - goto unlock; + if (cmd->autoneg == AUTONEG_DISABLE) { + switch (speed) { + case SPEED_10000: + case SPEED_2500: + case SPEED_1000: + break; + default: + goto unlock; + } + + if (cmd->duplex != DUPLEX_FULL) + goto unlock; + } cmd->advertising &= phydev->supported; if ((cmd->autoneg == AUTONEG_ENABLE) && !cmd->advertising) |