]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Clear VF config when switching modes
authorDmytro Linkin <dmitrolin@mellanox.com>
Mon, 13 Jan 2020 11:46:13 +0000 (13:46 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 24 Jan 2020 20:04:32 +0000 (12:04 -0800)
commit651cd77d2a1774da5a251efc6448845a8261204d
tree8a096435452c12cf12f5af68de2faca46a6b1c9a
parent1828e9f5b5c0d0eb8ee0475ed8d5370ae33d6f7e
net/mlx5e: Clear VF config when switching modes

Currently VF in LEGACY mode are not able to go up. Also in OFFLOADS
mode, when switching to it first time, VF can go up independently to
his representor, which is not expected.
Perform clearing of VF config when switching modes and set link state
to AUTO as default value. Also, when switching to OFFLOADS mode set
link state to DOWN, which allow VF link state to be controlled by its
REP.

Fixes: 3f064ca28f45 ("net/mlx5: Implement vports admin state backup/restore")
Fixes: a0f7465da326 ("net/mlx5: Clear VF's configuration on disabling SRIOV")
Signed-off-by: Dmytro Linkin <dmitrolin@mellanox.com>
Signed-off-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c