@@ -1530,7 +1530,9 @@ int mlx5_mdev_init(struct mlx5_core_dev *dev, int profile_idx)
1530
1530
memcpy (& dev -> profile , & profile [profile_idx ], sizeof (dev -> profile ));
1531
1531
INIT_LIST_HEAD (& priv -> ctx_list );
1532
1532
spin_lock_init (& priv -> ctx_lock );
1533
+ lockdep_register_key (& dev -> lock_key );
1533
1534
mutex_init (& dev -> intf_state_mutex );
1535
+ lockdep_set_class (& dev -> intf_state_mutex , & dev -> lock_key );
1534
1536
1535
1537
mutex_init (& priv -> bfregs .reg_head .lock );
1536
1538
mutex_init (& priv -> bfregs .wc_head .lock );
@@ -1597,6 +1599,7 @@ int mlx5_mdev_init(struct mlx5_core_dev *dev, int profile_idx)
1597
1599
mutex_destroy (& priv -> bfregs .wc_head .lock );
1598
1600
mutex_destroy (& priv -> bfregs .reg_head .lock );
1599
1601
mutex_destroy (& dev -> intf_state_mutex );
1602
+ lockdep_unregister_key (& dev -> lock_key );
1600
1603
return err ;
1601
1604
}
1602
1605
@@ -1618,6 +1621,7 @@ void mlx5_mdev_uninit(struct mlx5_core_dev *dev)
1618
1621
mutex_destroy (& priv -> bfregs .wc_head .lock );
1619
1622
mutex_destroy (& priv -> bfregs .reg_head .lock );
1620
1623
mutex_destroy (& dev -> intf_state_mutex );
1624
+ lockdep_unregister_key (& dev -> lock_key );
1621
1625
}
1622
1626
1623
1627
static int probe_one (struct pci_dev * pdev , const struct pci_device_id * id )
0 commit comments