mlx4_core: Roll back round robin bitmap allocation commit for CQs, SRQs, and MPTs
[cascardo/linux.git] / drivers / net / ethernet / mellanox / mlx4 / mlx4.h
index e582a41..6ed9dfa 100644 (file)
@@ -783,6 +783,11 @@ enum {
        MLX4_PCI_DEV_FORCE_SENSE_PORT   = 1 << 1,
 };
 
+enum {
+       MLX4_NO_RR      = 0,
+       MLX4_USE_RR     = 1,
+};
+
 struct mlx4_priv {
        struct mlx4_dev         dev;
 
@@ -844,9 +849,10 @@ static inline struct mlx4_priv *mlx4_priv(struct mlx4_dev *dev)
 extern struct workqueue_struct *mlx4_wq;
 
 u32 mlx4_bitmap_alloc(struct mlx4_bitmap *bitmap);
-void mlx4_bitmap_free(struct mlx4_bitmap *bitmap, u32 obj);
+void mlx4_bitmap_free(struct mlx4_bitmap *bitmap, u32 obj, int use_rr);
 u32 mlx4_bitmap_alloc_range(struct mlx4_bitmap *bitmap, int cnt, int align);
-void mlx4_bitmap_free_range(struct mlx4_bitmap *bitmap, u32 obj, int cnt);
+void mlx4_bitmap_free_range(struct mlx4_bitmap *bitmap, u32 obj, int cnt,
+                           int use_rr);
 u32 mlx4_bitmap_avail(struct mlx4_bitmap *bitmap);
 int mlx4_bitmap_init(struct mlx4_bitmap *bitmap, u32 num, u32 mask,
                     u32 reserved_bot, u32 resetrved_top);