Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/mlx4/mlx4_core/mlx4_eq.c
Show First 20 Lines • Show All 1,529 Lines • ▼ Show 20 Lines | void mlx4_release_eq(struct mlx4_dev *dev, int vec) | ||||
/* once we allocated EQ, we don't release it because it might be binded | /* once we allocated EQ, we don't release it because it might be binded | ||||
* to cpu_rmap. | * to cpu_rmap. | ||||
*/ | */ | ||||
mutex_unlock(&priv->msix_ctl.pool_lock); | mutex_unlock(&priv->msix_ctl.pool_lock); | ||||
} | } | ||||
EXPORT_SYMBOL(mlx4_release_eq); | EXPORT_SYMBOL(mlx4_release_eq); | ||||
void | |||||
mlx4_disable_interrupts(struct mlx4_dev *dev) | |||||
{ | |||||
struct mlx4_priv *priv = container_of(dev, struct mlx4_priv, dev); | |||||
int i; | |||||
if (dev->flags & MLX4_FLAG_MSI_X) { | |||||
for (i = 0; i < (dev->caps.num_comp_vectors + 1); ++i) | |||||
disable_irq(priv->eq_table.eq[i].irq); | |||||
} else { | |||||
disable_irq(dev->persist->pdev->irq); | |||||
} | |||||
} | |||||
EXPORT_SYMBOL(mlx4_disable_interrupts); | |||||
void | |||||
mlx4_poll_interrupts(struct mlx4_dev *dev) | |||||
{ | |||||
struct mlx4_priv *priv = container_of(dev, struct mlx4_priv, dev); | |||||
int i; | |||||
if (dev->flags & MLX4_FLAG_MSI_X) { | |||||
for (i = 0; i < (dev->caps.num_comp_vectors + 1); ++i) { | |||||
mlx4_msi_x_interrupt(priv->eq_table.eq[i].irq, | |||||
priv->eq_table.eq + i); | |||||
} | |||||
} else { | |||||
mlx4_interrupt(dev->persist->pdev->irq, dev); | |||||
} | |||||
} | |||||
EXPORT_SYMBOL(mlx4_poll_interrupts); |