linux-stable/include/linux/mlx5
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
..
cq.h net/mlx5: Use mlx5_cmd_do() in core create_{cq,dct} 2022-02-23 15:21:59 -08:00
device.h net/mlx5: Add bits and fields to support enhanced CQE compression 2022-06-13 14:59:06 -07:00
doorbell.h
driver.h net/mlx5: Use devl_ API in mlx5e_devlink_port_register 2022-07-12 10:26:23 +02:00
eq.h net/mlx5: Introduce API for bulk request and release of IRQs 2022-01-06 16:22:52 -08:00
eswitch.h net/mlx5: E-switch, Remove dependency between sriov and eswitch mode 2022-07-02 11:58:26 -07:00
fs.h net/mlx5: Add support EXECUTE_ASO action for flow entry 2022-06-13 14:59:06 -07:00
fs_helpers.h
mlx5_ifc.h net/mlx5: Add bits and fields to support enhanced CQE compression 2022-06-13 14:59:06 -07:00
mlx5_ifc_fpga.h net/mlx5_fpga: Drop INNOVA IPsec support 2022-04-09 08:23:47 +03:00
mlx5_ifc_vdpa.h vdpa/mlx5: Add support for reading descriptor statistics 2022-05-31 12:44:22 -04:00
mpfs.h
port.h IB/mlx5: Fix undefined behavior due to shift overflowing the constant 2022-04-06 10:15:03 +03:00
qp.h net/mlx5e: Fix build warning, detected write beyond size of field 2022-03-22 16:48:56 -07:00
rsc_dump.h
transobj.h
vport.h