cxgb4: Don't disallow turning off auto-negotiation
authorHariprasad Shenai <hariprasad@chelsio.com>
Wed, 21 Oct 2015 09:09:51 +0000 (14:39 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Oct 2015 14:03:50 +0000 (07:03 -0700)
For {1, 10, 40} Gb/s. Prohibiting turning off autonegotiation isn't anywhere
in the standard.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c

index 1127642a2327198f8c6462eb8a34f05e94d5161f..1487c57ffa70e0b175dbd2451c5cc37fdce8d012 100644 (file)
@@ -629,10 +629,7 @@ static int set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
        if (cmd->autoneg == AUTONEG_DISABLE) {
                cap = speed_to_caps(speed);
 
-               if (!(lc->supported & cap) ||
-                   (speed == 1000) ||
-                   (speed == 10000) ||
-                   (speed == 40000))
+               if (!(lc->supported & cap))
                        return -EINVAL;
                lc->requested_speed = cap;
                lc->advertising = 0;