diff options
author | Sudarsana Reddy Kalluru <sudarsana.kalluru@cavium.com> | 2017-05-21 12:11:00 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-21 12:56:53 -0400 |
commit | 9ac4c546ef109ff633c3d56acdc3c501a6e0f7a1 (patch) | |
tree | 7c2cd7b5e1b7b2aaf172ea12231dce55b63ed02b /drivers/net/ethernet | |
parent | b19601bbf1a1a230beb35ea77acbbfb5bbf542fa (diff) |
qede: Support 1G advertisment.
Some variants of adapters support the 1G speed capability. Need to
allow the configuration of 1G speed if adapter supports it.
Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c index 47ec4f3cfe79..6c76a12c4e0d 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c +++ b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c @@ -506,6 +506,14 @@ static int qede_set_link_ksettings(struct net_device *dev, params.autoneg = false; params.forced_speed = base->speed; switch (base->speed) { + case SPEED_1000: + if (!(current_link.supported_caps & + QED_LM_1000baseT_Full_BIT)) { + DP_INFO(edev, "1G speed not supported\n"); + return -EINVAL; + } + params.adv_speeds = QED_LM_1000baseT_Full_BIT; + break; case SPEED_10000: if (!(current_link.supported_caps & QED_LM_10000baseKR_Full_BIT)) { |