]> 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)
commitd79c9358e4e7234704c8184b2c13f6ee2abad941
tree57cec9897cb9d9a28fcc43e872764608e8ff12d1
parentf2fced5277d1fadba3c505098447b96f586b7942
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: 86249945daca ("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