]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Add exit route when waiting for FW
authorGavin Li <gavinl@nvidia.com>
Sun, 27 Mar 2022 14:45:32 +0000 (17:45 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 10 May 2022 05:54:00 +0000 (22:54 -0700)
commit9bf4f291e7c3c01c4691cfcba2e80f61aec27144
treee4360530a6b2deb6c0a3a226d2c32bd638d6174e
parentb13009b105dfa7c24d26ab27fb51b535104c84f3
net/mlx5: Add exit route when waiting for FW

Currently, removing a device needs to get the driver interface lock before
doing any cleanup. If the driver is waiting in a loop for FW init, there
is no way to cancel the wait, instead the device cleanup waits for the
loop to conclude and release the lock.

To allow immediate response to remove device commands, check the TEARDOWN
flag while waiting for FW init, and exit the loop if it has been set.

Signed-off-by: Gavin Li <gavinl@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/main.c
include/linux/mlx5/driver.h