OSDN Git Service

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)
commit3b83b6c2e024d85b770ddb1e19a513b5d7587f6f
tree8a096435452c12cf12f5af68de2faca46a6b1c9a
parentc0702a4bd41829f05638ec2dab70f6bb8d8010ce
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: 1ab2068a4c66 ("net/mlx5: Implement vports admin state backup/restore")
Fixes: 556b9d16d3f5 ("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