Lines Matching refs:eq_table

241 	struct mlx4_eq *eq = &priv->eq_table.eq[vec];  in mlx4_set_eq_affinity_hint()
855 writel(priv->eq_table.clr_mask, priv->eq_table.clr_int); in mlx4_interrupt()
858 work |= mlx4_eq_int(dev, &priv->eq_table.eq[i]); in mlx4_interrupt()
941 if (!priv->eq_table.uar_map[index]) { in mlx4_get_eq_uar()
942 priv->eq_table.uar_map[index] = in mlx4_get_eq_uar()
947 if (!priv->eq_table.uar_map[index]) { in mlx4_get_eq_uar()
954 return priv->eq_table.uar_map[index] + 0x800 + 8 * (eq->eqn % 4); in mlx4_get_eq_uar()
963 if (priv->eq_table.uar_map[i]) { in mlx4_unmap_uar()
964 iounmap(priv->eq_table.uar_map[i]); in mlx4_unmap_uar()
965 priv->eq_table.uar_map[i] = NULL; in mlx4_unmap_uar()
1018 eq->eqn = mlx4_bitmap_alloc(&priv->eq_table.bitmap); in mlx4_create_eq()
1068 mlx4_bitmap_free(&priv->eq_table.bitmap, eq->eqn, MLX4_USE_RR); in mlx4_create_eq()
1112 mlx4_bitmap_free(&priv->eq_table.bitmap, eq->eqn, MLX4_USE_RR); in mlx4_free_eq()
1117 struct mlx4_eq_table *eq_table = &mlx4_priv(dev)->eq_table; in mlx4_free_irqs() local
1120 if (eq_table->have_irq) in mlx4_free_irqs()
1124 if (eq_table->eq[i].have_irq) { in mlx4_free_irqs()
1125 free_cpumask_var(eq_table->eq[i].affinity_mask); in mlx4_free_irqs()
1127 irq_set_affinity_hint(eq_table->eq[i].irq, NULL); in mlx4_free_irqs()
1129 free_irq(eq_table->eq[i].irq, eq_table->eq + i); in mlx4_free_irqs()
1130 eq_table->eq[i].have_irq = 0; in mlx4_free_irqs()
1133 kfree(eq_table->irq_names); in mlx4_free_irqs()
1162 priv->eq_table.eq = kcalloc(dev->caps.num_eqs - dev->caps.reserved_eqs, in mlx4_alloc_eq_table()
1163 sizeof(*priv->eq_table.eq), GFP_KERNEL); in mlx4_alloc_eq_table()
1164 if (!priv->eq_table.eq) in mlx4_alloc_eq_table()
1172 kfree(mlx4_priv(dev)->eq_table.eq); in mlx4_free_eq_table()
1181 priv->eq_table.uar_map = kcalloc(mlx4_num_eq_uar(dev), in mlx4_init_eq_table()
1182 sizeof(*priv->eq_table.uar_map), in mlx4_init_eq_table()
1184 if (!priv->eq_table.uar_map) { in mlx4_init_eq_table()
1189 err = mlx4_bitmap_init(&priv->eq_table.bitmap, in mlx4_init_eq_table()
1199 priv->eq_table.uar_map[i] = NULL; in mlx4_init_eq_table()
1206 priv->eq_table.clr_mask = in mlx4_init_eq_table()
1207 swab32(1 << (priv->eq_table.inta_pin & 31)); in mlx4_init_eq_table()
1208 priv->eq_table.clr_int = priv->clr_base + in mlx4_init_eq_table()
1209 (priv->eq_table.inta_pin < 32 ? 4 : 0); in mlx4_init_eq_table()
1212 priv->eq_table.irq_names = in mlx4_init_eq_table()
1216 if (!priv->eq_table.irq_names) { in mlx4_init_eq_table()
1225 0, &priv->eq_table.eq[MLX4_EQ_ASYNC]); in mlx4_init_eq_table()
1227 struct mlx4_eq *eq = &priv->eq_table.eq[i]; in mlx4_init_eq_table()
1265 snprintf(priv->eq_table.irq_names + in mlx4_init_eq_table()
1270 eq_name = priv->eq_table.irq_names + in mlx4_init_eq_table()
1273 err = request_irq(priv->eq_table.eq[MLX4_EQ_ASYNC].irq, in mlx4_init_eq_table()
1275 priv->eq_table.eq + MLX4_EQ_ASYNC); in mlx4_init_eq_table()
1279 priv->eq_table.eq[MLX4_EQ_ASYNC].have_irq = 1; in mlx4_init_eq_table()
1281 snprintf(priv->eq_table.irq_names, in mlx4_init_eq_table()
1286 IRQF_SHARED, priv->eq_table.irq_names, dev); in mlx4_init_eq_table()
1290 priv->eq_table.have_irq = 1; in mlx4_init_eq_table()
1294 priv->eq_table.eq[MLX4_EQ_ASYNC].eqn); in mlx4_init_eq_table()
1297 priv->eq_table.eq[MLX4_EQ_ASYNC].eqn, err); in mlx4_init_eq_table()
1300 eq_set_ci(&priv->eq_table.eq[MLX4_EQ_ASYNC], 1); in mlx4_init_eq_table()
1306 mlx4_free_eq(dev, &priv->eq_table.eq[--i]); in mlx4_init_eq_table()
1323 mlx4_bitmap_cleanup(&priv->eq_table.bitmap); in mlx4_init_eq_table()
1326 kfree(priv->eq_table.uar_map); in mlx4_init_eq_table()
1337 priv->eq_table.eq[MLX4_EQ_ASYNC].eqn); in mlx4_cleanup_eq_table()
1350 mlx4_free_eq(dev, &priv->eq_table.eq[i]); in mlx4_cleanup_eq_table()
1356 mlx4_bitmap_cleanup(&priv->eq_table.bitmap); in mlx4_cleanup_eq_table()
1358 kfree(priv->eq_table.uar_map); in mlx4_cleanup_eq_table()
1384 priv->eq_table.eq[MLX4_CQ_TO_EQ_VECTOR(vector)].eqn); in mlx4_test_interrupt()
1398 priv->eq_table.eq[MLX4_EQ_ASYNC].eqn); in mlx4_test_interrupt()
1414 return test_bit(port - 1, priv->eq_table.eq[vector].actv_ports.ports); in mlx4_is_eq_vector_valid()
1426 priv->eq_table.eq[i].actv_ports.ports); in mlx4_get_eqs_per_port()
1440 return !!(bitmap_weight(priv->eq_table.eq[vector].actv_ports.ports, in mlx4_is_eq_shared()
1465 priv->eq_table.eq[requested_vector].actv_ports.ports)) { in mlx4_assign_eq()
1474 eq = &priv->eq_table.eq[requested_vector]; in mlx4_assign_eq()
1486 struct mlx4_eq *eq = &priv->eq_table.eq[i]; in mlx4_assign_eq()
1506 snprintf(priv->eq_table.irq_names + in mlx4_assign_eq()
1511 err = request_irq(priv->eq_table.eq[*prequested_vector].irq, in mlx4_assign_eq()
1513 &priv->eq_table.irq_names[*prequested_vector << 5], in mlx4_assign_eq()
1514 priv->eq_table.eq + *prequested_vector); in mlx4_assign_eq()
1523 eq_set_ci(&priv->eq_table.eq[*prequested_vector], 1); in mlx4_assign_eq()
1524 priv->eq_table.eq[*prequested_vector].have_irq = 1; in mlx4_assign_eq()
1529 priv->eq_table.eq[*prequested_vector].ref_count++; in mlx4_assign_eq()
1547 return priv->eq_table.eq[MLX4_CQ_TO_EQ_VECTOR(cq_vec)].irq; in mlx4_eq_get_irq()
1557 priv->eq_table.eq[eq_vec].ref_count--; in mlx4_release_eq()