]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Fix ethtool self test: link speed
authorAya Levin <ayal@mellanox.com>
Wed, 2 Oct 2019 13:53:21 +0000 (16:53 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Tue, 29 Oct 2019 23:27:20 +0000 (16:27 -0700)
commit036193afcc4e228f3523973a29a4d309740ebe62
tree250ae3ead74a4c118f521cfaf57630edf4dca474
parentdcb54827ace43dff10b068ff8c06acd7eeb224ac
net/mlx5e: Fix ethtool self test: link speed

Ethtool self test contains a test for link speed. This test reads the
PTYS register and determines whether the current speed is valid or not.
Change current implementation to use the function mlx5e_port_linkspeed()
that does the same check and fails when speed is invalid. This code
redundancy lead to a bug when mlx5e_port_linkspeed() was updated with
expended speeds and the self test was not.

Fixes: 4e355aaf8fe8 ("net/mlx5e: Move port speed code from en_ethtool.c to en/port.c")
Signed-off-by: Aya Levin <ayal@mellanox.com>
Reviewed-by: Moshe Shemesh <moshe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c