/* Remove all allocated DMA memory and unmap memory IO regions. If MTRR is enabled, also remove it again.  */
static void i2o_pci_free(struct i2o_controller *c)
/* Remove all allocated DMA memory and unmap memory IO regions. If MTRR is enabled, also remove it again.  */
static void i2o_pci_free(struct i2o_controller *c)
{
	struct device *dev;
	dev = &c->pdev->dev;
	i2o_dma_free(dev, &c->out_queue);
	i2o_dma_free(dev, &c->status_block);
	kfree(c->lct);
	i2o_dma_free(dev, &c->dlct);
	i2o_dma_free(dev, &c->hrt);
	i2o_dma_free(dev, &c->status);
	if (c->raptor && c->in_queue.virt)
		iounmap(c->in_queue.virt);
	if (c->base.virt)
		iounmap(c->base.virt);
	pci_release_regions(c->pdev);
}