/* Switch back to polling (used when shutting down the device)  */
void mthca_cmd_use_polling(struct mthca_dev *dev)
/* Switch back to polling (used when shutting down the device)  */
void mthca_cmd_use_polling(struct mthca_dev *dev)
{
	int i;
	dev->cmd.flags &= ~MTHCA_CMD_USE_EVENTS;
	for (i = 0; i < dev->cmd.max_cmds; ++i)
		down(&dev->cmd.event_sem);
	kfree(dev->cmd.context);
	up(&dev->cmd.poll_sem);
}