* Remove all allocated DMA memory and unmap memory IO regions. If MTRR
* is enabled, also remove it again.
*/
-static void __devexit i2o_pci_free(struct i2o_controller *c)
+static void i2o_pci_free(struct i2o_controller *c)
{
struct device *dev;
* If we know what card it is, set the size
* correctly. Code is taken from dpt_i2o.c
*/
- if(pdev->device == 0xa501) {
- if(pdev->subsystem_device >= 0xc032 &&
- pdev->subsystem_device <= 0xc03b) {
- if(c->base.len > 0x400000)
+ if (pdev->device == 0xa501) {
+ if (pdev->subsystem_device >= 0xc032 &&
+ pdev->subsystem_device <= 0xc03b) {
+ if (c->base.len > 0x400000)
c->base.len = 0x400000;
} else {
- if(c->base.len > 0x100000)
+ if (c->base.len > 0x100000)
c->base.len = 0x100000;
}
}
}
#endif
- if (i2o_dma_alloc(dev, &c->status, 4, GFP_KERNEL)) {
+ if (i2o_dma_alloc(dev, &c->status, 8, GFP_KERNEL)) {
i2o_pci_free(c);
return -ENOMEM;
}
struct device *dev = &c->pdev->dev;
struct i2o_message *m;
u32 mv;
- u32 *msg;
/*
* Old 960 steppings had a bug in the I2O unit that caused
* Because bus_to_virt is deprecated, we have calculate the
* location by ourself!
*/
- m = (struct i2o_message *)(mv -
- (unsigned long)c->out_queue.phys +
- (unsigned long)c->out_queue.virt);
-
- msg = (u32 *) m;
+ m = i2o_msg_out_to_virt(c, mv);
/*
* Ensure this message is seen coherently but cachably by