/* Switch back to polling (used when shutting down the device)  */
void mlx4_cmd_use_polling(struct mlx4_dev *dev)
/* Switch back to polling (used when shutting down the device)  */
void mlx4_cmd_use_polling(struct mlx4_dev *dev)
{
	struct mlx4_priv *priv = mlx4_priv(dev);
	int i;
	priv->cmd.use_events = 0;
	for (i = 0; i < priv->cmd.max_cmds; ++i)
		down(&priv->cmd.event_sem);
	kfree(priv->cmd.context);
	up(&priv->cmd.poll_sem);
}