aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGavin Li <gavinl@nvidia.com>2022-03-27 17:45:32 +0300
committerSaeed Mahameed <saeedm@nvidia.com>2022-05-09 22:54:00 -0700
commit8324a02c342a36336114a497130826612ed5520d (patch)
treee4360530a6b2deb6c0a3a226d2c32bd638d6174e /include
parentMerge branch 'nfp-support-corigine-pcie-vendor-id' (diff)
downloadlinux-dev-8324a02c342a36336114a497130826612ed5520d.tar.xz
linux-dev-8324a02c342a36336114a497130826612ed5520d.zip
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mlx5/driver.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index ff47d49d8be4..f327d0544038 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -632,6 +632,7 @@ enum mlx5_device_state {
enum mlx5_interface_state {
MLX5_INTERFACE_STATE_UP = BIT(0),
+ MLX5_BREAK_FW_WAIT = BIT(1),
};
enum mlx5_pci_status {