File tree 2 files changed +5
-0
lines changed
drivers/net/ethernet/mellanox/mlx5/core
2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -1427,7 +1427,9 @@ int mlx5_mdev_init(struct mlx5_core_dev *dev, int profile_idx)
1427
1427
memcpy (& dev -> profile , & profile [profile_idx ], sizeof (dev -> profile ));
1428
1428
INIT_LIST_HEAD (& priv -> ctx_list );
1429
1429
spin_lock_init (& priv -> ctx_lock );
1430
+ lockdep_register_key (& dev -> lock_key );
1430
1431
mutex_init (& dev -> intf_state_mutex );
1432
+ lockdep_set_class (& dev -> intf_state_mutex , & dev -> lock_key );
1431
1433
1432
1434
mutex_init (& priv -> bfregs .reg_head .lock );
1433
1435
mutex_init (& priv -> bfregs .wc_head .lock );
@@ -1474,6 +1476,7 @@ int mlx5_mdev_init(struct mlx5_core_dev *dev, int profile_idx)
1474
1476
mutex_destroy (& priv -> bfregs .wc_head .lock );
1475
1477
mutex_destroy (& priv -> bfregs .reg_head .lock );
1476
1478
mutex_destroy (& dev -> intf_state_mutex );
1479
+ lockdep_unregister_key (& dev -> lock_key );
1477
1480
return err ;
1478
1481
}
1479
1482
@@ -1491,6 +1494,7 @@ void mlx5_mdev_uninit(struct mlx5_core_dev *dev)
1491
1494
mutex_destroy (& priv -> bfregs .wc_head .lock );
1492
1495
mutex_destroy (& priv -> bfregs .reg_head .lock );
1493
1496
mutex_destroy (& dev -> intf_state_mutex );
1497
+ lockdep_unregister_key (& dev -> lock_key );
1494
1498
}
1495
1499
1496
1500
static int probe_one (struct pci_dev * pdev , const struct pci_device_id * id )
Original file line number Diff line number Diff line change @@ -759,6 +759,7 @@ struct mlx5_core_dev {
759
759
enum mlx5_device_state state ;
760
760
/* sync interface state */
761
761
struct mutex intf_state_mutex ;
762
+ struct lock_class_key lock_key ;
762
763
unsigned long intf_state ;
763
764
struct mlx5_priv priv ;
764
765
struct mlx5_profile profile ;
You can’t perform that action at this time.
0 commit comments