]> 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)
commitf2fced5277d1fadba3c505098447b96f586b7942
tree7c32f3b4e0480258f7b163538bd325d364fc15e2
parent3391a454bc1d6d07751f05af050870cf8e20dac8
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: 545dbc958430 ("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