]> git.proxmox.com Git - mirror_ubuntu-eoan-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)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 12 Nov 2019 17:47:41 +0000 (18:47 +0100)
commit3495085dd3cb00727de6a538c3b99377a76bd910
tree1d3092f8d57020745966ea57de443c9a2576c70a
parent620972f83e745d3aa7f09b1692bfb707de4a19fb
net/mlx5e: Fix ethtool self test: link speed

BugLink: https://bugs.launchpad.net/bugs/1852111
[ Upstream commit 534e7366f41b0c689b01af4375aefcd1462adedf ]

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: 2c81bfd5ae56 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c