diff options
author | Saeed Mahameed <saeedm@mellanox.com> | 2014-10-27 12:37:39 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-29 00:18:00 +0300 |
commit | dcf972a334dd76975bf144ca57350c1f3132c947 (patch) | |
tree | 83ccd24288aaee20b640bb5f31c04d661bbbcd58 /drivers/net/ethernet/mellanox/mlx4/en_selftest.c | |
parent | a53e3e8c1db547981e13d1ebf24a659bd4e87710 (diff) | |
download | linux-dcf972a334dd76975bf144ca57350c1f3132c947.tar.xz |
ethtool, net/mlx4_en: Add 100M, 20G, 56G speeds ethtool reporting support
Added 100M, 20G and 56G ethtool speed reporting support.
Update mlx4_en_test_speed self test with the new speeds.
Defined new link speeds in include/uapi/linux/ethtool.h:
+#define SPEED_20000 20000
+#define SPEED_40000 40000
+#define SPEED_56000 56000
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/en_selftest.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_selftest.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_selftest.c b/drivers/net/ethernet/mellanox/mlx4/en_selftest.c index 49d5afc7cfb8..2d8ee66138e8 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_selftest.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_selftest.c @@ -129,11 +129,15 @@ static int mlx4_en_test_speed(struct mlx4_en_priv *priv) if (mlx4_en_QUERY_PORT(priv->mdev, priv->port)) return -ENOMEM; - /* The device supports 1G, 10G and 40G speeds */ - if (priv->port_state.link_speed != 1000 && - priv->port_state.link_speed != 10000 && - priv->port_state.link_speed != 40000) + /* The device supports 100M, 1G, 10G, 20G, 40G and 56G speed */ + if (priv->port_state.link_speed != SPEED_100 && + priv->port_state.link_speed != SPEED_1000 && + priv->port_state.link_speed != SPEED_10000 && + priv->port_state.link_speed != SPEED_20000 && + priv->port_state.link_speed != SPEED_40000 && + priv->port_state.link_speed != SPEED_56000) return priv->port_state.link_speed; + return 0; } |