]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
qede: Support 1G advertisment.
authorSudarsana Reddy Kalluru <sudarsana.kalluru@cavium.com>
Sun, 21 May 2017 09:11:00 +0000 (12:11 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 21 May 2017 16:56:53 +0000 (12:56 -0400)
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>
drivers/net/ethernet/qlogic/qede/qede_ethtool.c

index 47ec4f3cfe797b85fa7f29282f0052ea76bb6f7e..6c76a12c4e0dd59189644f9455a329c656d937db 100644 (file)
@@ -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)) {