]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Verify dev is present for fix features ndo
authorRoy Novich <royno@nvidia.com>
Wed, 4 Jan 2023 09:16:21 +0000 (11:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:58:29 +0000 (11:58 +0100)
commit915b0efa2ac11d16ef73d6c039772c50886961a2
tree83a474c5629bf0a9782d4589fd829cb5dfd59784
parent37ec5c048cf9d133421595f0f3e6c82e6e4429b1
net/mlx5e: Verify dev is present for fix features ndo

[ Upstream commit 17df10c74676de8c8627c448d423b82f76af1777 ]

The native NIC port net device instance is being used as Uplink
representor.  While changing profiles private resources are not
available, fix features ndo does not check if the netdev is present.
Add driver protection to verify private resources are ready.

Fixes: bdbdde7f1648 ("net/mlx5e: Do not reload ethernet ports when changing eswitch mode")
Signed-off-by: Roy Novich <royno@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c