]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Revert parameters on errors when changing MTU and LRO state without reset
authorMaxim Mikityanskiy <maximmi@mellanox.com>
Fri, 11 Dec 2020 14:05:01 +0000 (16:05 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 26 Jan 2021 23:39:01 +0000 (15:39 -0800)
commitbb577224d59fda498a47ffdc088f8126b38696e9
tree57cec9897cb9d9a28fcc43e872764608e8ff12d1
parent3be43c8ef310c82923612c7860dbfb9aeae65932
net/mlx5e: Revert parameters on errors when changing MTU and LRO state without reset

Sometimes, channel params are changed without recreating the channels.
It happens in two basic cases: when the channels are closed, and when
the parameter being changed doesn't affect how channels are configured.
Such changes invoke a hardware command that might fail. The whole
operation should be reverted in such cases, but the code that restores
the parameters' values in the driver was missing. This commit adds this
handling.

Fixes: d6390b964252 ("net/mlx5e: Fail safe mtu and lro setting")
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_main.c