]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Revert parameters on errors when changing trust state without reset
authorMaxim Mikityanskiy <maximmi@mellanox.com>
Thu, 14 Jan 2021 10:34:01 +0000 (12:34 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 26 Jan 2021 23:38:58 +0000 (15:38 -0800)
commit3be43c8ef310c82923612c7860dbfb9aeae65932
tree7c32f3b4e0480258f7b163538bd325d364fc15e2
parent091ae998635c7d89c0efee635e96f26817655bf4
net/mlx5e: Revert parameters on errors when changing trust state without reset

Trust state may be changed without recreating the channels. It happens
when the channels are closed, and when channel parameters (min inline
mode) stay the same after changing the trust state. Changing the trust
state is a hardware command that may fail. The current code didn't
restore the channel parameters to their old values if an error happened
and the channels were closed. This commit adds handling for this case.

Fixes: c2ad282a533c ("net/mlx5e: Change inline mode correctly when changing trust state")
Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c