Skip to content

Commit b7e4a22

Browse files
committed
net/mlx5: SF, Stop waiting for FW as teardown was called
jira LE-2157 Rebuild_History Non-Buildable kernel-5.14.0-503.14.1.el9_5 commit-author Moshe Shemesh <[email protected]> commit 137cef6 Empty-Commit: Cherry-Pick Conflicts during history rebuild. Will be included in final tarball splat. Ref for failed cherry-pick at: ciq/ciq_backports/kernel-5.14.0-503.14.1.el9_5/137cef6d.failed When PF/VF teardown is called the driver sets the flag MLX5_BREAK_FW_WAIT to stop waiting for FW loading and initializing. Same should be applied to SF driver teardown to cut waiting time. On mlx5_sf_dev_remove() set the flag before draining health WQ as recovery flow may also wait for FW reloading while it is not relevant anymore. Signed-off-by: Moshe Shemesh <[email protected]> Reviewed-by: Aya Levin <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> (cherry picked from commit 137cef6) Signed-off-by: Jonathan Maple <[email protected]> # Conflicts: # drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c
1 parent 8e22087 commit b7e4a22

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
net/mlx5: SF, Stop waiting for FW as teardown was called
2+
3+
jira LE-2157
4+
Rebuild_History Non-Buildable kernel-5.14.0-503.14.1.el9_5
5+
commit-author Moshe Shemesh <[email protected]>
6+
commit 137cef6d55564fb687d12fbc5f85be43ff7b53a7
7+
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
8+
Will be included in final tarball splat. Ref for failed cherry-pick at:
9+
ciq/ciq_backports/kernel-5.14.0-503.14.1.el9_5/137cef6d.failed
10+
11+
When PF/VF teardown is called the driver sets the flag
12+
MLX5_BREAK_FW_WAIT to stop waiting for FW loading and initializing. Same
13+
should be applied to SF driver teardown to cut waiting time. On
14+
mlx5_sf_dev_remove() set the flag before draining health WQ as recovery
15+
flow may also wait for FW reloading while it is not relevant anymore.
16+
17+
Signed-off-by: Moshe Shemesh <[email protected]>
18+
Reviewed-by: Aya Levin <[email protected]>
19+
Signed-off-by: Saeed Mahameed <[email protected]>
20+
(cherry picked from commit 137cef6d55564fb687d12fbc5f85be43ff7b53a7)
21+
Signed-off-by: Jonathan Maple <[email protected]>
22+
23+
# Conflicts:
24+
# drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c
25+
diff --cc drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c
26+
index 5c054a0005dd,bc863e1f062e..000000000000
27+
--- a/drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c
28+
+++ b/drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c
29+
@@@ -91,15 -95,19 +91,25 @@@ mdev_err
30+
static void mlx5_sf_dev_remove(struct auxiliary_device *adev)
31+
{
32+
struct mlx5_sf_dev *sf_dev = container_of(adev, struct mlx5_sf_dev, adev);
33+
- struct devlink *devlink = priv_to_devlink(sf_dev->mdev);
34+
+ struct mlx5_core_dev *mdev = sf_dev->mdev;
35+
+ struct devlink *devlink;
36+
37+
++<<<<<<< HEAD
38+
+ mlx5_drain_health_wq(sf_dev->mdev);
39+
+ if (mlx5_dev_is_lightweight(sf_dev->mdev))
40+
+ mlx5_uninit_one_light(sf_dev->mdev);
41+
++=======
42+
+ devlink = priv_to_devlink(mdev);
43+
+ set_bit(MLX5_BREAK_FW_WAIT, &mdev->intf_state);
44+
+ mlx5_drain_health_wq(mdev);
45+
+ devlink_unregister(devlink);
46+
+ if (mlx5_dev_is_lightweight(mdev))
47+
+ mlx5_uninit_one_light(mdev);
48+
++>>>>>>> 137cef6d5556 (net/mlx5: SF, Stop waiting for FW as teardown was called)
49+
else
50+
- mlx5_uninit_one(sf_dev->mdev);
51+
- iounmap(sf_dev->mdev->iseg);
52+
- mlx5_mdev_uninit(sf_dev->mdev);
53+
+ mlx5_uninit_one(mdev);
54+
+ iounmap(mdev->iseg);
55+
+ mlx5_mdev_uninit(mdev);
56+
mlx5_devlink_free(devlink);
57+
}
58+
59+
* Unmerged path drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c

0 commit comments

Comments
 (0)