Files
linux/include/linux
Moshe Shemesh 7b19119f4c net/mlx5: Use devl_ API in mlx5e_devlink_port_register
As part of the flows invoked by mlx5_devlink_eswitch_mode_set() get to
mlx5_rescan_drivers_locked() which can call mlx5e_probe()/mlx5e_remove
and register/unregister mlx5e driver ports accordingly. This can lead to
deadlock once mlx5_devlink_eswitch_mode_set() will use devlink lock.
Use devl_port_register/unregister() instead of
devlink_port_register/unregister() and add devlink instance locks in the
driver paths to this function to have it locked while calling devl_ API
function.

If remove or probe were called by module init or module cleanup flows,
need to lock devlink just before calling devl_port_register(), otherwise
it is called by attach/detach or register/unregister flow and we can
have the flow locked. Added flag to distinguish between these cases.

This will be used by the downstream patch to invoke
mlx5_devlink_eswitch_mode_set() with devlink locked.

Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2022-07-12 10:26:23 +02:00
..
2022-06-08 14:04:14 -04:00
2022-06-29 13:21:51 -07:00
2022-06-29 13:21:51 -07:00
2022-06-07 10:20:42 -07:00
2022-06-28 10:37:25 -03:00
2022-06-03 06:52:57 -07:00
2022-06-09 21:53:09 -07:00
2022-06-09 21:53:12 -07:00
2022-06-09 21:53:09 -07:00
2022-06-06 09:52:17 +09:00
2022-06-19 10:38:26 +01:00
2022-06-10 11:29:48 +02:00
2022-06-24 16:24:38 -07:00
2022-06-13 13:47:15 +01:00
2022-05-31 12:45:10 -04:00
2022-06-13 09:54:52 -07:00