upgrade to fedora-2.6.12-1.1398.FC4 + vserver 2.0.rc7
[linux-2.6.git] / drivers / message / i2o / pci.c
index 6107058..e772752 100644 (file)
@@ -159,34 +159,36 @@ static int __devinit i2o_pci_alloc(struct i2o_controller *c)
        }
 
        if (i == 6) {
-               printk(KERN_ERR "i2o: I2O controller has no memory regions"
-                      " defined.\n");
+               printk(KERN_ERR "%s: I2O controller has no memory regions"
+                      " defined.\n", c->name);
                i2o_pci_free(c);
                return -EINVAL;
        }
 
        /* Map the I2O controller */
        if (c->raptor) {
-               printk(KERN_INFO "i2o: PCI I2O controller\n");
+               printk(KERN_INFO "%s: PCI I2O controller\n", c->name);
                printk(KERN_INFO "     BAR0 at 0x%08lX size=%ld\n",
                       (unsigned long)c->base.phys, (unsigned long)c->base.len);
                printk(KERN_INFO "     BAR1 at 0x%08lX size=%ld\n",
                       (unsigned long)c->in_queue.phys,
                       (unsigned long)c->in_queue.len);
        } else
-               printk(KERN_INFO "i2o: PCI I2O controller at %08lX size=%ld\n",
-                      (unsigned long)c->base.phys, (unsigned long)c->base.len);
+               printk(KERN_INFO "%s: PCI I2O controller at %08lX size=%ld\n",
+                      c->name, (unsigned long)c->base.phys,
+                      (unsigned long)c->base.len);
 
        c->base.virt = ioremap(c->base.phys, c->base.len);
        if (!c->base.virt) {
-               printk(KERN_ERR "i2o: Unable to map controller.\n");
+               printk(KERN_ERR "%s: Unable to map controller.\n", c->name);
                return -ENOMEM;
        }
 
        if (c->raptor) {
                c->in_queue.virt = ioremap(c->in_queue.phys, c->in_queue.len);
                if (!c->in_queue.virt) {
-                       printk(KERN_ERR "i2o: Unable to map controller.\n");
+                       printk(KERN_ERR "%s: Unable to map controller.\n",
+                              c->name);
                        i2o_pci_free(c);
                        return -ENOMEM;
                }
@@ -204,10 +206,10 @@ static int __devinit i2o_pci_alloc(struct i2o_controller *c)
        c->mtrr_reg1 = -1;
 
        if (c->mtrr_reg0 < 0)
-               printk(KERN_WARNING "i2o: could not enable write combining "
-                      "MTRR\n");
+               printk(KERN_WARNING "%s: could not enable write combining "
+                      "MTRR\n", c->name);
        else
-               printk(KERN_INFO "i2o: using write combining MTRR\n");
+               printk(KERN_INFO "%s: using write combining MTRR\n", c->name);
 
        /*
         * If it is an INTEL i960 I/O processor then set the first 64K to
@@ -216,14 +218,14 @@ static int __devinit i2o_pci_alloc(struct i2o_controller *c)
         */
        if ((pdev->vendor == PCI_VENDOR_ID_INTEL ||
             pdev->vendor == PCI_VENDOR_ID_DPT) && !c->raptor) {
-               printk(KERN_INFO "i2o: MTRR workaround for Intel i960 processor"
-                      "\n");
+               printk(KERN_INFO "%s: MTRR workaround for Intel i960 processor"
+                      "\n", c->name);
                c->mtrr_reg1 = mtrr_add(c->base.phys, 0x10000,
                                        MTRR_TYPE_UNCACHABLE, 1);
 
                if (c->mtrr_reg1 < 0) {
-                       printk(KERN_WARNING "i2o_pci: Error in setting "
-                              "MTRR_TYPE_UNCACHABLE\n");
+                       printk(KERN_WARNING "%s: Error in setting "
+                              "MTRR_TYPE_UNCACHABLE\n", c->name);
                        mtrr_del(c->mtrr_reg0, c->in_queue.phys,
                                 c->in_queue.len);
                        c->mtrr_reg0 = -1;
@@ -288,7 +290,7 @@ static irqreturn_t i2o_pci_interrupt(int irq, void *dev_id, struct pt_regs *r)
                if (unlikely(mv == I2O_QUEUE_EMPTY)) {
                        return IRQ_NONE;
                } else
-                       pr_debug("960 bug detected\n");
+                       pr_debug("%s: 960 bug detected\n", c->name);
        }
 
        while (mv != I2O_QUEUE_EMPTY) {
@@ -303,7 +305,7 @@ static irqreturn_t i2o_pci_interrupt(int irq, void *dev_id, struct pt_regs *r)
                 *      Ensure this message is seen coherently but cachably by
                 *      the processor
                 */
-               dma_sync_single_for_cpu(dev, c->out_queue.phys, MSG_FRAME_SIZE,
+               dma_sync_single_for_cpu(dev, mv, MSG_FRAME_SIZE * 4,
                                        PCI_DMA_FROMDEVICE);
 
                /* dispatch it */
@@ -425,12 +427,14 @@ static int __devinit i2o_pci_probe(struct pci_dev *pdev,
        /* Cards that fall apart if you hit them with large I/O loads... */
        if (pdev->vendor == PCI_VENDOR_ID_NCR && pdev->device == 0x0630) {
                c->short_req = 1;
-               printk(KERN_INFO "i2o: Symbios FC920 workarounds activated.\n");
+               printk(KERN_INFO "%s: Symbios FC920 workarounds activated.\n",
+                      c->name);
        }
 
        if (pdev->subsystem_vendor == PCI_VENDOR_ID_PROMISE) {
                c->promise = 1;
-               printk(KERN_INFO "i2o: Promise workarounds activated.\n");
+               printk(KERN_INFO "%s: Promise workarounds activated.\n",
+                      c->name);
        }
 
        /* Cards that go bananas if you quiesce them before you reset them. */
@@ -441,14 +445,14 @@ static int __devinit i2o_pci_probe(struct pci_dev *pdev,
        }
 
        if ((rc = i2o_pci_alloc(c))) {
-               printk(KERN_ERR "i2o: DMA / IO allocation for I2O controller "
-                      " failed\n");
+               printk(KERN_ERR "%s: DMA / IO allocation for I2O controller "
+                      " failed\n", c->name);
                goto free_controller;
        }
 
        if (i2o_pci_irq_enable(c)) {
-               printk(KERN_ERR "i2o: unable to enable interrupts for I2O "
-                      "controller\n");
+               printk(KERN_ERR "%s: unable to enable interrupts for I2O "
+                      "controller\n", c->name);
                goto free_pci;
        }
 
@@ -521,3 +525,4 @@ void __exit i2o_pci_exit(void)
 };
 
 EXPORT_SYMBOL(i2o_dma_realloc);
+MODULE_DEVICE_TABLE(pci, i2o_pci_ids);