]> 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)
commit4eb01403cace067b9f8e123f8c0c8924178a87f5
tree8a096435452c12cf12f5af68de2faca46a6b1c9a
parentce03b8087bcd3b837b0b012f246d031a0aefa53b
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: 9e46c0ed7d3c ("net/mlx5: Implement vports admin state backup/restore")
Fixes: b07e557023da ("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