]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: SF_DEV, remove SF device on invalid state
authorParav Pandit <parav@nvidia.com>
Thu, 10 Jun 2021 15:39:53 +0000 (18:39 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 16 Jun 2021 22:36:42 +0000 (15:36 -0700)
commitc7d6c19b3bde66d7aebbe93e0f9e6d9ff57fc3fa
tree735e3d01afeb359033528aefab775105ffb02ed0
parentca36fc4d77b35b8d142cf1ed0eae5ec2e071dc3c
net/mlx5: SF_DEV, remove SF device on invalid state

When auxiliary bus autoprobe is disabled and SF is in ACTIVE state,
on SF port deletion it transitions from ACTIVE->ALLOCATED->INVALID.

When VHCA event handler queries the state, it is already transition
to INVALID state.

In this scenario, event handler missed to delete the SF device.

Fix it by deleting the SF when SF state is INVALID.

Fixes: 90d010b8634b ("net/mlx5: SF, Add auxiliary device support")
Signed-off-by: Parav Pandit <parav@nvidia.com>
Reviewed-by: Vu Pham <vuhuong@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/sf/dev/dev.c