[MLX4] fixed a bug, that caused "Completion event for bogus CQ " message and the...
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 18 May 2008 13:44:34 +0000 (13:44 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 18 May 2008 13:44:34 +0000 (13:44 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1178 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

hw/mlx4/kernel/bus/net/cq.c

index ddc9abb..a320694 100644 (file)
 void mlx4_cq_completion(struct mlx4_dev *dev, u32 cqn)
 {
        struct mlx4_cq *cq;
+       struct mlx4_cq_table *cq_table = &mlx4_priv(dev)->cq_table;
+
+       spin_lock_dpc(&cq_table->lock);
+       cq = radix_tree_lookup(&cq_table->tree, cqn & (dev->caps.num_cqs - 1));
+       spin_unlock_dpc(&cq_table->lock);
 
-       cq = radix_tree_lookup(&mlx4_priv(dev)->cq_table.tree,
-                              cqn & (dev->caps.num_cqs - 1));
        if (!cq) {
                mlx4_warn(dev, "Completion event for bogus CQ %08x\n", cqn);
                return;